On Pesachim 117b, the gemara discusses the structure of prayer and kiddush. Within the context of this discussion, the gemara recites the opinion of R' Acha Bar Yaakov, who states that we must remember the geulah from Egypt when saying Kiddush.
R' Acha proves his point this by contrasting two pesukim, both of which use the word "remember."
The first pasuk cites was from Devarim 16:3 which states that "you should remember leaving Egypt, all the days of your life." The second pasuk is from the Aseres Hadibros in Yisro (Shemos 20:8) which states "remember the Shabbos day to make it holy."
Tosafos (d'h L'maan) quotes a medrash which adds additional proof to the limud. Tosafos states that while the Jews were in Egypt, the Egyptians enslaved them with avodas parech. (This term is also mentioned in the haggadah). Tosafos writes that using the "at bash" exegetical tool, we see that parech is equal to Vav, Gimmel, Lamud, which together are 39. Tosafos explains that while the Jews were in Egypt, they were forced to do parech work. Once they were redeemed from Egypt, the Jews were told to observe the laws against doing the 39 melachos of Shabbos.
If you have seen this post being carried on another site, please feel free to click www.kosherbeers.blogspot.com/ to find other articles on the kosherbeers blogsite. Hey its free and you can push my counter numbers up!