אמר רב קיים אברהם אבינו כל התורה כולה שנאמר (בראשית כו, ה) עקב אשר שמע אברהם בקולי וגו'
ement, the Gemara cites that Rav said: Abraham our Patriarch fulfilled the entire Torah before it was given, as it is stated: “Because [ekev] Abraham hearkened to My voice and kept My charge, My mitzvot, My statutes and My Torahs” (Genesis 26:5). Rav Shimi bar Ḥiyya said to Rav: And say that the verse means that he fulfilled only the seven Noahide mitzvot and not the entire Torah. The Gemara asks: But isn’t there also circumcision that Abraham clearly observed, which is not one of the Noahide laws? Apparently, Abraham fulfilled more than just those seven. The Gemara asks: And say that he fulfilled only the seven mitzvot and circumcision. Rav said to him: If so, why do I need the continuation of the verse, that Abraham kept: My mitzvot and myTorah? That is a clear indication that he fulfilled mitzvot beyond the seven Noahide mitzvot, and apparently fulfilled the entire Torah.
(א) גרתי - דָּ"אַ גַּרְתִּי בְּגֵימַטְרִיָּא תרי"ג, כְּלוֹמַר, עִם לָבָן גַּרְתִּי וְתַרְיַ"ג מִצְוֹת שָׁמַרְתִּי וְלֹא לָמַדְתִּי מִמַּעֲשָׂיו הָרָעִים
(1) גרתי I HAVE SOJOURNED — I have become neither a prince nor other person of importance but merely a sojourner. It is not worth your while to hate me on account of the blessing of your father who blessed me (27:29) “Be master over thy brethren”, for it has not been fulfilled in me (Tanchuma Yashan 1:8:5). Another explanation: the word גרתי has the numerical value of 613 - תרי״ג - it is as much as to say, “Though I have sojourned with Laban, the wicked, I have observed the תרי״ג מצות, the 613 Divine Commandments, and I have learned naught of his evil ways.
(א) וישמור משמרתי -הנראה אלי מדעת רבותינו שלמד אברהם אבינו התורה כלה ברוח הקדש ועסק בה ובטעמי מצותיה וסודותיה ... ושמירתו אותה היה בארץ בלבד ויעקב בחוצה לארץ נשא האחיות וכן עמרם כי המצות משפט אלהי הארץ הן
(1) And he kept My charge: The language of Rashi: "To My voice" - when I put him to the test; "My charge" - precautionary decrees, for example, second degree prohibitions of [marriage between relatives] and the rabbinic prohibitions on Shabbat; "My commandments" -those matters which, had they not been written [in the Torah], they would [nevertheless] be fitting to be written, for example, robbery and murder; "My ordinances" - matters which the evil inclination and the idolaters argue against, for example the eating of pig and the wearing of garments made of a mixture of wool and linen (shaatnez) - for which there is no reason but that the King decreed His enactment upon His subjects; "and My laws" - to include [with the written Law also] the Oral Law, [and] the laws [given by God] to Moshe from Sinai. And if so, all [of Rashi's approach here], is built upon the opinion that Avraham observed and kept the Torah before it was given, and so did they say (Bereshit Rabbah 94:3) on the verse, "and Yosef gave them wagons (agalot)" (Genesis 45:21) - "As he separated from [Yaakov, while studying] the section of the beheaded calf (eglah)"; as he was occupied with Torah [study] in the same way as his fathers, and the Torah [however] was not [yet] given until now. And behold, it is written, "My charge, My commandments, My ordinances and My laws" - and there they said that he kept even the precise inferences of the Torah and he would teach it to his children, etc. And one can ask, "If so, how did Yaakov set up a pillar (Genesis 28:18), and marry two sisters - and according to the opinion of the rabbis (Bereshit Rabbah 74:11), four sisters; and Amram marry his aunt (Exodus 6:20); and Moshe, our teacher, set up twelve pillars (Exodus 24:4)? And how is it possible that they should act [as if what is forbidden] in the Torah is permissible, which Avraham, their father, forbade upon himself, and that God [gave] him reward upon the matter, and that is 'that he commanded his children and his household after him to walk in His ways?' And with Yaakov, they expounded (Bereshit Rabbah 79:6), that he kept the Shabbat and established boundaries (within which he would be allowed to walk on Shabbat). And it is possible that this would be with Shabbat, because it is equal to the whole entire Torah (Yerushalmi, Berakhot 1:5), since it testifies to the story of creation. And maybe [the intention of the rabbis is as follows:] "My charge" - second degree prohibitions of [marriage between relatives] for the Children of Noach; and "My commandments" - robbery and murder; "My ordinances" - [the prohibitions of eating] a limb from a living animal and interbreeding animals and grafting trees; "and My laws" - civil laws and the prohibitions of idolatry, as about all of these the Children of Noach are commanded. And he kept and did the will of his Creator and kept even the precise inferences and the stringincies of their commandments, and as they mentioned (Avodah Zarah 14b), "[The tractate of] Idolatry of Avraham, our father, was four hundred chapters," and they expostulated (Bereshit Rabbah 64:6) about, "the hundred fold" (Genesis 26:12), that the fathers were philanthropists of the peoples, to give tithes to the poor or to the priests of God, for example, Shem and Ever, and their students, like the matter of "and he was a priest to the Highest God" (Genesis 14:18). And what appears to me from the opinion of our rabbis is that Avraham learned the entire Torah from holy inspiration, and was occupied it its [study] and in the reasons for its commandments and its secrets, and he kept all of it as one who is not commanded and does. And his observance of it was only in the Land [of Israel]. And Yaakov married two sisters outside of the Land, and also Amram [was outside the land when he married his aunt], since the commandments are 'the law of the God of the land,' even though we are commanded [them] as an obligation on ourselves in every place (Kiddushin 36). And our rabbis already hinted to this secret (Sifrei, Devarim 43) and I will write about this at length (Ramban on Leviticus 18:25 and Ramban on Deuteronomy 11:18) with God's help. And the [prohibition of setting up a] pillar is a commandment that was innovated at a certain time, as they expounded (Sifrei) [on the verse], "in that the Lord, your God, hated it" (Deuteronomy 16:22) - "He hated it after it was beloved in the time of the forefathers." And with Yosef, they expounded (Bereshit Rabbah 92:4), that he kept the Shabbat even in Egypt, because it is equal to all of the commandments, since it is testimony about the creation of the world. And he would do this to teach his sons faith in the creation of the world to expunge from their hearts intentions of idolatry and the opinions of the Egyptians. And this was the intention [of the sages]. And on the level of the simple meaning, we can say that "My charge" is faith in Divinity, that he believed in the unique God and that he kept this charge in his heart and he differed from the idolaters about it and called in the name of the Lord to bring back many to the service [of God]; "My commandments" is like all that He had commanded him, in 'Go forth from your land,' and with the raising of his son [for a sacrifice] and the sending away of 'the maidservant and her son'; "My ordinances" is going in the ways of God, to be 'graceful and merciful' and 'to do righteousness and justice' and 'to command his children and his household' about [these things]; "and My laws" is circumcision on himself and on his children and servants, and all of the commandments of the Children of Noach, as they are the law to them.
(א) זו דינה שנבעלה לכנעני. - ואומר אני כי אברהם היה מיוחד לשמור כל התורה, ולפיכך אמרו עליו (קידושין פב. ) כי שמר כל התורה כולה בעבור שהוא מסוגל למצוות התורה. ולכך עמרם שנשא דודתו, ויעקב ב' אחיות - כי אלו הם מצות לא תעשה, ואם לא היו מצווים על מצוות לא תעשה - למה יקיימו אותם, וזהו באמת דעתי, והוא נכון. והשתא אין צריך ליתן טעם כלל למה נשא יעקב ב' אחיות, כי מצוות לא תעשה אין לחיוב מעצמו, רק מצות עשה. ואברהם בלבד הוא ששמר כל התורה כולה, בין עשה ולא תעשה. ולפי דעתי אם מקיים לא תעשה שלא נצטווה עליו הוא גריעותא, שאין לאסור עצמו בדבר שלא אסר אותו התורה.