What is the meaning of とは?

indicates that a word or a phrase is to be defined or explained

synonym of (to, with)

short for とは思わなかった (to wa omowanakatta, did not think that ...)

Source: wiktionary.org