אברבנאל
"ושכתבו את התורה על האבנים" שהוא כלו כמעשה אבותיהם כאשר עמדו על הר סיני וקבלו את התורה. בצורף שקיים מה גם כן מצות, "וכתבתם אל מזוזות ביתך ובשעריך."
ולכן צוה שכאשר יעברו את הירדן יכתבו
את התורה אל האבנים שזה כדמות מזוזה
בשער שנכנסין בו.
Abrabanel on Parshat Ki Tavo
"Write the Torah on the stones" -- all this is similar to the actions of the previous generation when standing at Mt. Sinai when they received the Torah. It combines with fulfilling the mitzvah, "You shall write them upon the doorposts of your house and upon your gates." Therefore they are commanded that when they cross over the Jordan, they should write the Torah on the stones, in the manner of a mezuzah on the 'gate' through which they are entering.
נמצאת אתה אומר שלשה מיני אבנים היו אחד שהקים משה בארץ מואב שנאמר (דברים א, ה) "בעבר הירדן בארץ מואב הואיל משה באר וגו'." ולהלן הוא אומר (דברים כז, ח) "וכתבת עליהן את כל דברי התורה הזאת בַּאֵר הֵיטֵב." ואתיא באר באר. ואחד שהקים יהושע בתוך הירדן שנאמר (יהושע ד, ט) "ושתים עשרה אבנים הקים יהושע בתוך הירדן." ואחד שהקים בגלגל שנאמר (יהושע ד, כ) "ואת שתים עשרה האבנים האלה אשר לקחו וגו'."
ת"ר כיצד כתבו ישראל את התורה רבי יהודה אומר על גבי אבנים כתבוה שנאמר (דברים כז, ח) "וכתבת על האבנים את כל דברי התורה הזאת וגו'." ואחר כך סדו אותן בסיד אמר לו רבי שמעון לדבריך היאך למדו אומות של אותו הזמן תורה אמר לו בינה יתירה נתן בהם הקב"ה ושיגרו נוטירין שלהן וקילפו את הסיד והשיאוה ועל דבר זה נתחתם גזר דינם לבאר שחת שהיה להן ללמד ולא למדו ר' שמעון אומר על גבי סיד כתבוה וכתבו להן למטה (דברים כ, יח) "למען אשר לא ילמדו אתכם לעשות ככל וגו'." הא למדת שאם היו חוזרין בתשובה היו מקבלין אותן.
In consequence [of what is related in the Scriptures], you must conclude that there were three sets of stones: one which Moses caused to be erected in the land of Moab, as it is said: "Beyond Jordan, in the land of Moab, began Moses to declare etc.," and elsewhere it states: "Thou shalt write upon the stones all the words of this law very plainly." And the inference is drawn from the use of the analogous word. The second set was that which Joshua caused to be erected in the midst of the Jordan, as it is said: "And Joshua set up twelve stones in the midst of Jordan." The third set was that which he caused to be erected in Gilgal, as it is said: "And those twelve stones which they took."
Our Rabbis taught: How did the Israelites inscribe the Torah? — R. Judah says: They inscribed it upon the stones, as it is stated: 'Thou shalt write upon the stones all the words of this law etc.' After that they plastered them over with plaster. R. Simeon said to him, According to your explanation, how did the nations of that period learn the Torah! He replied to him, The Holy One, blessed be He, endowed them with exceptional intelligence; and they sent their scribes who peeled off the plaster and carried away [a copy of the inscription]. On that account was the verdict sealed against them [to descend] to the pit of destruction, because it was their duty to learn [Torah] but they failed to do so. R. Simeon says: They inscribed it upon the plaster and wrote below, "That they teach you not to do after all [their abominations]." Hence you learn that if they turn in penitence they would be accepted.