שמירה "Birkat Ha-Mazon
"
Birkat Ha-Mazon
(י) וְאָכַלְתָּ֖ וְשָׂבָ֑עְתָּ וּבֵֽרַכְתָּ֙ אֶת־יְהוָ֣ה אֱלֹהֶ֔יךָ עַל־הָאָ֥רֶץ הַטֹּבָ֖ה אֲשֶׁ֥ר נָֽתַן־לָֽךְ׃
(10) When you have eaten your fill, give thanks to the LORD your God for the good land which He has given you.
דרש רב עוירא זמנין אמר לה משמיה דרבי אמי וזמנין אמר לה משמיה דרבי אסי אמרו מלאכי השרת לפני הקדוש ברוך הוא רבונו של עולם כתוב בתורתך אשר לא ישא פנים ולא יקח שחד והלא אתה נושא פנים לישראל דכתיב ישא ה׳ פניו אליך אמר להם וכי לא אשא פנים לישראל שכתבתי להם בתורה ואכלת ושבעת וברכת את ה׳ אלהיך והם מדקדקים [על] עצמם עד כזית ועד כביצה:

After citing the halakha that one who eats a quantity of food that does not satisfy his hunger is obligated by rabbinic law to recite Grace after Meals, the Gemara cites a related homiletic interpretation. Rav Avira taught, sometimes he said it in the name of Rabbi Ami, and sometimes he said it in the name of Rabbi Asi: The ministering angels said before the Holy One, Blessed be He: Master of the Universe, in Your Torah it is written: “The great, mighty and awesome God who favors no one and takes no bribe” (Deuteronomy 10:17), yet You, nevertheless, show favor to Israel, as it is written: “The Lord shall show favor to you and give you peace” (Numbers 6:26). He replied to them: And how can I not show favor to Israel, as I wrote for them in the Torah: “And you shall eat and be satisfied, and bless the Lord your God” (Deuteronomy 8:10), meaning that there is no obligation to bless the Lord until one is satiated; yet they are exacting with themselves to recite Grace after Meals even if they have eaten as much as an olive-bulk or an egg-bulk. Since they go beyond the requirements of the law, they are worthy of favor.

אמר רב יהודה מנין לברכת המזון לאחריה מן התורה שנאמר ואכלת ושבעת וברכת
Rav Yehuda said: From where is the mitzva by Torah law to recite Grace after Meals, derived? As it is stated: “And you shall eat and be satisfied and bless the Lord your God” (Deuteronomy 8:10).
אמר רב נחמן משה תקן לישראל ברכת הזן בשעה שירד להם מן יהושע תקן להם ברכת הארץ כיון שנכנסו לארץ דוד ושלמה תקנו בונה ירושלים דוד תקן על ישראל עמך ועל ירושלים עירך ושלמה תקן על הבית הגדול והקדוש הטוב והמטיב ביבנה תקנוה כנגד הרוגי ביתר דאמר רב מתנא אותו היום שניתנו הרוגי ביתר לקבורה תקנו ביבנה הטוב והמטיב הטוב שלא הסריחו והמטיב שניתנו לקבורה:
With regard to the origins of the four blessings of Grace after Meals, Rav Naḥman said:
Moses instituted for Israel the first blessing of: Who feeds all, when the manna descended for them and they needed to thank God.
Joshua instituted the blessing of the land when they entered Eretz Yisrael.
David and Solomon instituted the third blessing: Who builds Jerusalem, in the following manner:
David instituted “…on Israel Your people and on Jerusalem Your city…” as he conquered the city,
and Solomon instituted “…on the great and Holy Temple…” as he was the one who built the Temple.
They instituted the blessing: Who is good and does good, at Yavne in reference to the slain Jews of the city of Beitar at the culmination of the bar Kokheva rebellion. They were ultimately brought to burial after a period during which Hadrian refused to permit their burial. As Rav Mattana said: On the same day that the slain of Beitar were brought to burial, they instituted the blessing: Who is good and does good, at Yavne. Who is good, thanking God that the corpses did not decompose while awaiting burial, and does good, thanking God that they were ultimately brought to burial.
תנו רבנן סדר ברכת המזון כך היא ברכה ראשונה ברכת הזן שניה ברכת הארץ שלישית בונה ירושלים רביעית הטוב והמטיב ובשבת מתחיל בנחמה ומסיים בנחמה ואומר קדושת היום באמצע רבי אליעזר אומר רצה לאומרה בנחמה אומרה בברכת הארץ אומרה בברכה שתקנו חכמים ביבנה אומרה וחכמים אומרים אינו אומרה אלא בנחמה בלבד
On the topic of the blessings of Grace after Meals, the Gemara adds that the Sages taught in a baraita that the order of Grace after Meals is as follows: The first blessing is the blessing of: Who feeds all; the second is the blessing of the land; the third is: Who builds Jerusalem; and the fourth is: Who is good and does good. On Shabbat one begins the third blessing with consolation and ends with consolation and mentions the sanctity of the day with mention of Shabbat in the middle. Rabbi Eliezer says: If one wishes to recite the supplement for the sanctity of Shabbat in the blessing of consolation: Who builds Jerusalem, he recites it there; in the blessing of the land, he recites it there; in the blessing instituted by the Sages at Yavne, Who is good and does good, he recites it there. And the Rabbis say: He may only recite the mention of the sanctity of Shabbat in the context of the blessing of consolation.
תנו רבנן מנין לברכת המזון מן התורה שנאמר ואכלת ושבעת וברכת זו ברכת הזן את ה׳ אלהיך זו ברכת הזמון על הארץ זו ברכת הארץ הטובה זו בונה ירושלים וכן הוא אומר ההר הטוב הזה והלבנון אשר נתן לך זו הטוב והמטיב אין לי אלא לאחריו לפניו מנין אמרת קל וחומר כשהוא שבע מברך כשהוא רעב לא כל שכן
The Sages taught in a Tosefta: From where is it derived that Grace after Meals is from the Torah? As it is stated: “And you shall eat and be satisfied, and you shall bless the Lord, your God, for the good land that He has given you” (Deuteronomy 8:10). The Gemara explains: And you shall bless, that is the blessing of: Who feeds all. The Lord, your God, that is the zimmun blessing in which God’s name is invoked. For the land, that is the blessing of the land; good, that is the blessing: Who builds Jerusalem, and it also says: “This good mountain and Lebanon” (Deuteronomy 3:25), which is interpreted homiletically as referring to Jerusalem and the Temple. That He gave you, that is: Who is good and does good. However, I only have a Torah source for blessings after eating, i.e., Grace after Meals. From where is it derived that one is obligated to recite blessings before eating? You said that it can be derived through an a fortiori inference: When one is satisfied, he is obligated to recite a blessing and thank God for food; when he is hungry, all the more so that he should recite a blessing to offer thanks for the food he will eat.