(Gen. 2:4:) THESE ARE THE GENERATIONS OF THE HEAVENS AND THE EARTH. This text is related (to Prov. 3:19): THROUGH WISDOM THE LORD FOUNDED THE EARTH. You find that through wisdom the Holy One created heaven and earth. R. Azariah said in the name of Resh Laqish: On the first day he created heaven and earth.
Five days were left over. He created above and below on alternate days. On the second day he created the firmament above. On the third day: LET THE WATERS BE GATHERED below.
On the fourth day: LET THERE BE LIGHTS above. On the fifth day: LET THE WATERS SWARM below. The sixth day remained for creating. The Holy One said: If I create above, the earth will be angry; but if I create below, the heavens will be angry.
What did the Holy One do? He created Adam below with breath from above. Thus it says: THROUGH WISDOM THE LORD FOUNDED THE EARTH.