MUST ONE EXPLICITLY SAY THAT HE WRITES LISHMAH? [Sefer Torah: Lishmah]
27a (Reish Lakish): The Beraisa is Machshir when he was silent. The Mishnah discusses when he said (that he intends Chutz li'Zmano).
46b (Mishnah): There are six intents in Korbanos: which Korban it is, whose Korban it is, l'Shem Hash-m, l'Shem the fire, l'Shem a smell, and to be pleasing;
R. Yosi says, even if one had no intent (and slaughtered), it is Kosher. Chachamim enacted to do so, for it all depends on the intent of the one offering the Korban.
Bava Metzia 44a (Beraisa - Beis Shamai): "Al Kol Devar Pesha" obligates for intent like for action;
Gitin 45b: There was a Nochri in Tzidan who used to write Sefarim. R. Shimon ben Gamliel permitted buying from him.
Question: R. Shimon requires tanning the hide l'Shem Sefarim. Surely the writing must be Lishmah!
Answer (Rabah bar Shmuel and Rav Ashi): R. Shimon permitted buying from a convert who reverted to being a Nochri because he feared for his life.
54b: A scribe said 'the Sefer Torah that I wrote for Ploni is Pasul because I did not write the occurrences of Hash-m's name Lishmah.
R. Ami: If Ploni has the Sefer Torah, you are not believed to disqualify it, but you forfeit your wages through your admission. Since the names are not Lishmah, the Sefer is worthless.
Question: Why can't he overwrite the names with intention to sanctify them?
Answer #1: R. Ami holds like Chachamim who argue with R. Yehudah.
(Mishnah - R. Yehudah): If a scribe needed to write Hash-m's name, but he thought that he needs to write 'Yehudah', and he omitted the 'Daled' (so he accidentally wrote Hash-m's name), he overwrites the letters with intent to make them Kodesh;
Chachamim say, this is not a nice writing of Hash-m's name.
Answer #2: R. Ami could even hold like R. Yehudah. R. Yehudah permits overwriting His name once, but not every place it occurs, for such a Sefer appears spotted.
Kidushin 41b: Terumah can be separated through thought alone.
Rambam (Hilchos Tefilah 1:15): If one writes a Sefer Torah, Tefilin or Mezuzah, and at the time he did not intend, and wrote an Azkarah Lo Lishmah, it is Pasul.
Rosh (Hilchos Sefer Torah 3,4): R. Baruch was unsure whether one must say with his lips that he tans the leather l'Shem Sefer Torah or Tefilin, or if intent suffices. Regarding Pigul it says "Lo Yeratzeh (some texts - Lo Yechashev "), and speech is required (Zevachim 27a). Terumah is taken without speech, through mere intent. Regarding Shlichus Yad, it says "Al Kol Devar Pesha", and one who intends to make unauthorized use of the deposit is liable. Therefore, it is good to say at the beginning that he tans Lishmah. This suffices. Also when he begins to write a Sefer Torah, he says 'I write this l'Shem Kedushas Toras Moshe', and this suffices. However, when writing names of Hash-m he must think l'Shem Kedushas ha'Shem. Even though the entire Torah must be written Lishmah, writing Hash-m's name is a higher level.
Rashi (Menachos 2a DH Kol): An example of a Minchah Lo Lishmah is when he said (about a Minchah in a Machavas) 'I do Kemitzah l'Shem Marcheshes.'
Tosfos (Avodah Zarah 27a DH Ki): We do not say that Stam, a Sefer Torah is considered to be Lishmah. Therefore, when a scribe begins to write, he says 'I write this l'Shem Toras Yisrael, and the Azkaros l'Shem Kedushah.' It seems that the scribe who said that he did not write the Azkaros Lishmah meant that he did not specify that he writes them Lishmah. If Stam were Kosher, he should have said that he wrote them Lo Lishmah. Also, if Stam were Kosher, a Nochri could write, just like he can circumcise. The Gemara connotes that a verse disqualifies a Nochri. Really, it is needed to disqualify a woman or child. In any case a Nochri is Pasul, because Stam it is not Lishmah.
Mordechai (Hilchos Tzitzis 949): The Ri asked why we need a verse to disqualify a Nochri from writing a Sefer Torah. It must be Lishmah (and he does not write Lishmah)! The scribe said that he did not write the Azkaros Lishmah, and this sufficed to disqualify the Sefer Torah. He did not need to specify that he wrote them Lo Lishmah, for Lishmah is required! We can say that the Tana (who needs a verse) does not require Lishmah. R. Elchanan answered that Stam, Torah is considered Lishmah. One cannot infer from the scribe. We say that a Get written Lo Lishmah is Pasul (we did not say that a Get not written Lishmah is Pasul), even though a Get must be written Lishmah! When something is not Stam Lishmah, such as a Get, one must say with his lips that he does it Lishmah. Likewise, when something is Stam Lishmah, such as a Minchah, it is Lo Lishmah only if he says so with his lips, like Rashi (Menachos 2a) says. Therefore, one who begins to write must say 'I write this Sefer Torah Lishmah.' Rashi holds that a Stam Sefer Torah is Lishmah. Why should it be Pasul? Presumably, it is written to read or learn from it. It is not worse than Kodshim, which require l'Shem six things, and even so if he did not explicitly say so, it is Kosher. However, surely he must explicitly say that he writes the Azkaros Lishmah. This is why in Gitin it mentions the Azkaros. According to the other Perush, we can say that he mentioned the Azkaros because he did not want to overtly say that he is evil. Regarding the Azkaros, he can say that he forgot to write them Lishmah. The scribe intended to write 'Yehudah' l'Shem Sefer Torah, and this is not good enough for Hash-m's name.
Shulchan Aruch (YD 274:1): When a scribe begins to write a Sefer Torah, he says 'I write this l'Shem Kedushas Sefer Torah.'
Beis Yosef (DH v'Rabbeinu): When a scribe begins to write, he says 'I write this l'Shem Kedushas Yisrael, and the Azkaros l'Shem Kedushah', for perhaps intent is not enough. The Tur, Semag, and Sefer ha'Terumah say so, and the Mordechai in the name of Ri of Orleans. Rashi holds that Stam suffices for the Sefer, for Stam he writes it to read or learn from it, but he agrees that one must explicitly say that he writes the Azkaros Lishmah. He proves this from the Halachah of a scribe who thought that he is writing Yehudah. This is not a proof. There it is Pasul because he intended to write Yehudah, which is not in that place in the Sefer. This is like intent to write a word that is not in the Sefer.
Be'er ha'Golah (1): It seems that b'Di'eved, intent suffices, for the Rambam and Semag say that Pigul is through intent without speech, and the Ra'avad did not disagree.
Taz (1): Semag says that one should also say that the Azkaros are l'Shem Kedushah. This is proper, for perhaps he will forget afterwards to be Mekadesh the name in its place.
Birkei Yosef: One who proofreads (and corrects) must also intend for Kedushas Sefer Torah. The declaration of the first scribe does not help for the second.
Gra (1): Gitin 45b connotes that Stam does not suffice.
Shulchan Aruch (276:2): Even though one said when he began to write a Sefer Torah that he writes l'Shem Kedushas Sefer Torah, every time he writes a name (of Hash-m) that may not be erased, he must say that he writes it l'Shem Kedushas ha'Shem. If he did not, it is Pasul.
Beis Yosef (DH Af): We conclude in Gitin 54b that it does not help to write over them. Even though the Rosh and Tur say 'one must intend for Kedushah', it seems that the Rosh requires that one say so with his lips.
Shulchan Aruch (OC 32:19): When a scribe begins to write Tefilin, he says with his lips 'I write l'Shem Kedushas Tefilin.' In addition, every time he writes an Azkarah, he must say that he writes it l'Shem Kedushas 'Rosh says that when writing Azkaros, one must intend for Kedushas ha'Shem. It seems that this is imprecise. Really, he must say so with his lips, just like at the beginning of the writing. Why should it be different? Also the Tur wrote in Hilchos Sefer Torah that one must intend for Kedushas ha'Shem. He just cited the Rosh. Orchos Chayim says 'he must say with his lips that he intends Lishmah. If not, it cannot be fixed. Sefer ha'Terumah says that he must say so with his lips only at the beginning, but he must intend for every Azkarah. Also the Rambam says so.' This is astounding. The Rambam wrote like the Gemara. One cannot prove whether he holds that intent suffices! Also, Sefer ha'Terumah was unsure if intent suffices.
Beis Yosef (DH Kosav): Ri Askandri says that some say that one must say at the beginning of each Parshah that he writes Lishmah. The Poskim say that it suffices once, before writing all the Parshiyos.
Mishnah Berurah (92): If one letter was written not l'Shem Tefilin, it is Pasul, and it does not help to write over it Lishmah. Letter of the law it suffices once, before writing all the Parshiyos. However, it is better to say so at the beginning of each Parshah.
Mishnah Berurah (93): Likewise, one must say so before fixing isolated letters. Since the Tefilin are Pasul without this, it must be Lishmah.
Mishnah Berurah (95): B'Di'eved, if he merely thought, it does not help.
Mishnah Berurah (96): Some say that it is good to say at the beginning also that all the Azkaros are l'Shem Kedushas ha'Shem, for perhaps he will forget to be Mekadesh them.
Bi'ur Halachah (DH bi'Tchilas): The Taz (in YD) said that b'Di'eved, one may rely on what he said at the beginning. Why did he omit that Lechem Chamudos disagrees? The Birkei Yosef is stringent b'Di'eved! One may rely on the Taz if he is unsure whether he was Mekadesh an Azkarah.
Mishnah Berurah (97): If he writes two Azkaros without anything in the middle, it suffices to be Mekadesh once.
Rema: Some say that it suffices to intend that the Azkaros are Lishmah, since he said with his lips at the beginning. One can be lenient b'Di'eved.
Gra (57): The Gemara connotes that Hash-m's name is improper when he intended to write something else (Yehudah), but had he intended for the correct word (even without special intent for His name), it would be Kosher.
Radvaz (1:154, cited in R. Akiva Eiger): The Rishonim concluded that every matter of Kedushah, such as a Sefer Torah, requires speech. This is because Kedushah does not take effect through thought. It takes effect only through speech, which makes a great impact. Get has Kedushah because it is called a Sefer and it says 'like the law of Moshe and Yisrael.' One must say that he writes Megilas Sotah Lishmah, in order that Hash-m's name erased into the water will work properly. B'Di'eved, I admit that intent without speech suffices for all these matters.
Mishnah Berurah (92): It he did not even intend for Kedushah of an Azkarah, even b'Di'eved he was not Yotzei.