The term "Histakel Be'Oraisa Uvara Alma" is often invoked when discussing chassidus or metaphysics. Literally translated, it means "[Hashem] gazed in[to] the Torah and created the world."
While the exact interpretation of this phrase has been debated, I'm currently interested in his etymology - when and where does this phrase first appear in Jewish literature? Is it unique to Judaism, a cognate from another culture or are there cognates that sprang from it?