We can answer all questions from last week by explaining two foundational concepts in writing a Torah. The first yesod is from the Divrei Yatziv that says there are two reasons for writing a Torah. The first is that it is a proof of the Shira, Ha’azinu. The second is that one will be able to learn it. The posuk therefore says it twice; first in the command where Hashem says, “Now write this Shira” and then it says, “Teach it to the Yidden.” At the completion, the posuk again says, “Moshe wrote the Shira” and thereafter it says, “And he taught it to the Yidden.” The other yesod is that one is able to serve Hashem in two ways. A person may do things because he is used to it since that is what he saw by his parents. The other way is to serve Hashem out of love or fear.
With this we can differentiate whether one needs the whole Torah to be written, or whether it is sufficient if he has the Shira still intact while the rest of the Sefer Torah may have rotted. If the mitzvah is just for Shirah, then it would not suffice since we need to have the whole Torah written, but if the reason is for learning purposes, then of course one may write parts of the Torah, like a chumash, so that children can learn.
The reason the Gemara in Sanhedrin says that one would not be yotzei the mitzvah if he inherited a Sefer Torah is because that shows the person is doing it just mitzvas anashim melumada, which the posuk in Yeshaya says can cause one to forget the Torah that he learned. It is important for a person to write his own Sefer, thereby showing that he wants to learn, whether it is mi’ahava or mi’yirah.
The same difference would be regarding women writing a Sefer. If it is being written for learning purposes, then women would be able to write it since they have sections in the Torah that apply to them. However, if it is being written as an eidus for the Shirah, then a woman would not be able to write one since they have no chiyuv of U’lemaditem.
The Sha’agas Aryeh in siman 36 asks, in today’s day and age, where we don’t have the knowledge of which words are malei and which words are chaseir, why would we write a Sefer Torah, if it is not kosher to begin with? The reason is, if one buys the Torah, the Gemara calls that as if he is a chotef min hashuk. The Rambam says that if one writes a Torah with the intention of completing it later, the Sefer Torah is Kosher. In the event when he buys it, he knows that there are chaseiros and yeseiros we don’t know about, but he is ready to have it fixed when Mashiach comes, then he is yotzei the mitzvah and that is like a chotef min hashuk since he invests in something but does not know if he will make money. When Moshiach comes he will have completed the Mitzvah.
In the event someone has a Sefer Torah written, it is like he accepted it from Har Sinai. We know that a person who can’t do a mitzva is considered an oness and is patur. As long as a person writes the Sefer Torah properly, according to our mesorah, he is yotzei the mitzvah right now. This contrasts with the case of a person buying a Torah with which he will not be yotzei until Moshiach comes.
The Chasam Sofer’s question can be answered by explaining that since the ikkar mitzvah is to learn from the Torah, then whatever yeseiros and chaseiros would make a difference lehalacha we have a kabala to know which are the correct yeseiros and chaseiros. That is why we may write tefillin and mezuzos and the parsha of Sotah. That is why, halacha le’maaseh, if there is a chaseir or a yeser that won’t make a nafka mina in teich or halacha. It doesn’t passel such a Sefer Torah.
We also see why the malach switched from the posuk of Torah tziva lanu , which is a posuk proving that we just inherited the Torah. We are not doing the Torah mi’yirah or me’ahava. Once we have the posuk of Ve’ata kisvu, which shows it is as if we were mekabel the Torah, that is what the malach was showing was needed in order not to be chayev misa.
May we all be zocheh to write and learn the Torah properly!