MUST ONE BLESS FOR THINKING DIVREI TORAH? [Birkas ha'Torah: Hirhur k'Dibur]
Gemara
Bruriyah saw a Talmid learning quietly. She kicked him, and said 'it says "Aruchah va'Kol u'Shmurah." If Torah is arranged in your 248 limbs, it will endure. If not, it will not!'
(Beraisa): R. Eliezer had a Talmid who used to learn quietly. After three years he forgot his learning.
Shmuel (to Rav Yehudah): Open your mouth when you learn written or oral Torah, so you will remember it and live a long time. We read "Ki Chayim Hem l'Motz'eihem ul'Chol Besaro Marpei" like 'Motza'eihem' (those who say the words).
(R. Ami): "Ki Na'im Ki Sishmerem b'Vitnecha Yikonu Yachdav Al Sefasecha" teaches that Divrei Torah are pleasant when one guards them in his stomach (remembers them);
This is when "Yikonu Yachdav Al Sefasecha." (He says the words clearly and audibly.)
Shabbos 150a (R. Yochanan): R. Yehoshua ben Korchah expounds "mi'Mtzo Cheftzecha v'Daber Davar" - Dibur (talking, i.e. about Melachah) is forbidden, but Hirhur (thoughts) are permitted.
Inference (Rav Acha bar Rav Huna): Dibur is unlike Hirhur.
Question (Rav Acha): Does R. Yochanan hold like this?! He forbids thinking about Torah in a bathhouse or bathroom, due to "v'Hayah Machanecha Kodesh";
Regarding this it says "v'Lo Yir'eh Vecha Ervas Davar"! (Why didn't he likewise expound to forbid Dibur and permit thoughts?)
Answer: We expound "Ervas Davar" to teach Rav Yehudah's law:
(Rav Yehudah): One may not recite Shma facing a naked Nochri.
Berachos 20b (Mishnah): A Ba'al Keri must think in his mind Keri'as Shema, but not [even think] the blessings before and after it.
(Ravina): Our Mishnah teaches that Hirhur k'Dibur. If it were not, there is no reason to have Hirhur!
Question: If Hirhur were like Dibur, it would be permitted to say the words!
Answer: This is like we find at Sinai. (Bnei Yisrael became Tahor in order to hear the Torah.)
(Rav Chisda): Hirhur is not like Dibur. If it were like Dibur, he should say the words!
Question: If it is not like Dibur, there is no reason to have Hirhur!
Answer (R. Elazar): He should not be idle while everyone else is saying Shema.
Question: If so, he could think about any Divrei Torah!
Answer (Rav Ada bar Ahavah): He should engage in the same matter as the Tzibur.
Avodah Zarah 44b (Mishnah): A Nochri Min asked Raban Gamliel why he is bathing in the bathhouse of Afroditi (an idol).
Raban Gamliel: We do not answer [matters of Torah] in a bathhouse.
After he left, he told him: I did not come to her domain...
Question: How could Raban Gamliel say this there? ('We do not answer... ' is a Halachah!)
(Rabah bar bar Chanah): One may not think about Torah in a bathhouse.
(Abaye): One may not say Divrei Torah there, even in other languages.
Answer (Beraisa): After he left, he said 'we do not answer in a bathhouse.'
Rishonim
Tosfos (20b DH v'Rav): R. Chananel explains that the Halachah follows Rav Chisda. Since Rav Ada and R. Elazar explain his words this shows that we hold like him. One is not Yotzei Keri'as Shema through Hirhur.
Tosfos (44b DH Tana): The Rashbam explains that after R. Gamliel left, he said 'since we do not answer in a bathhouse, I could not answer you until now that I left.' Therefore, the Mishnah is not difficult. (The Beraisa explains it.) In some texts, the Beraisa says 'after he left, he said 'we do not answer in a bathhouse.' I.e. he said only this to him. R. Elchanan asked that the Mishnah records a full answer after he left! The Ri says that the Nochri asked him in the inner room. He did not answer there at all. In the middle room, he said 'we do not answer in a bathhouse', to avoid enmity. It is permitted there, like giving Shalom. In the outer room, where Divrei Torah are permitted, he answered him.
Poskim
Shulchan Aruch (OC 47:3): One who writes Divrei Torah, even if he does not say them, must bless [Birkas ha'Torah].
Source: Avudraham, cited in Beis Yosef DH Kasav.
She'alas Ya'avetz (2:140): Someone inherited a ring with Hash-m's name on it. The Rosh permits writing Hash-m's name where it will not come to disgrace. Chavos Ya'ir (57) said that even if elsewhere, writing is like Dibur, like the Avudraham, who obligates Birkas ha'Torah before writing Divrei Torah, [here it is permitted]. Megilah 18b proves that it is not like Dibur. If one was writing a Megilah, he is Yotzei Kri'as ha'Megilah only if he said every verse. This supports YD 221:10, based on Teshuvas ha'Ge'onim, which permits writing to someone with whom he may not speak [due to a vow]. The stringent opinion permits only writing on the table [and the other person comes to read it]. This is a mere decree and stringency.
R. Akiva Eiger (Teshuvah 1:29): Chavos Ya'ir says that a written Shevu'ah is valid. He learns from OC 47:3, which obligates blessing before writing Divrei Torah. Shev Yakov says that it says regarding Talmud Torah "v'Shinantam l'Vanecha", to exclude Hirhur. It does not exclude writing, through which one can teach his children.
Shulchan Aruch (4): One who thinks Divrei Torah need not bless.
Question (Taz 2 and Gra DH Hirhur): This contradicts Sa'if 3, which obligates blessing for writing Divrei Torah.
Beis Yosef (DH Kasav): The Agur (2) permits thinking Divrei Torah before Birkas ha'Torah, for Hirhur is not like Dibur regarding Berachah, just like for Keri'as Shema and Tefilah. Also Tosfos (20b) says so. Similarly, a Ba'al Keri may think Keri'as Shema.
Gra (DH Hirhur): Also Shabbos 150a shows that Hirhur Lav k'Dibur.
Taz (3): Since Hirhur Lav k'Dibur, people who learn from looking in a Sefer must be careful to say some Divrei Torah with their mouths after blessing on it.
Mishnah Berurah (5): This refers to people who do not have our custom to say Birkas Kohanim or other Divrei Torah right after the Berachah. See 62:3. (One must say Shema audibly to his ears. If he did not, he was Yotzei if he said the words with his lips.)
Bi'ur Halachah (DH ha'Meharher): The Chayei Adam tried to answer the Gra's question. Binyan Olam agreed with the Gra. He connotes that the Gra holds that Hirhur of Torah is totally like Dibur. He says that the Rema (681) permits learning through Hirhur [from a Sefer while the Tzibur says Piyutim, for it is not k'Dibur], for he holds like the Shulchan Aruch, but the Gra would forbid, for it is a Hefsek in Birkos Keri'as Shema. I disagree. The Gra agrees that Hirhur of Divrei Torah is not k'Dibur, just he holds that it is a Mitzvah - "v'Hagisa". His words connote like this, if one analyzes them. If not, what was the question (150a) 'does R. Yochanan really hold that Hirhur Lav k'Dibur?! He forbids thinking about Torah in a bathhouse!' If everyone holds that Hirhur k'Dibur regarding Divrei Torah, it is forbidden in a bathhouse no matter how we expound "Ervas Davar"!
Rema: Likewise, one may give a ruling without giving the reason.
Gra (DH v'Hu): Also the Ran (Avodah Zarah 19b DH Tana) says like the Ri (in Tosfos 44b), but he permits Hirhur in the middle room. As long as he does not give the reason [why we don't answer in the inner room], this is like Hirhur. Therefore, whenever Hirhur is permitted, also this (answering without a reason), like the Rema says below (85:2). (The Gra also cites Rema 84:1, who permits Hirhur in the middle room.) Here is difficult, for he blesses on the Mitzvah. Is there no Mitzvah without Dibur?! It says "v'Hagisa (Bo Yomam va'Laylah)", i.e. in the heart - "v'Hegyon Libi"! All the more so one must bless for giving a ruling! One must bless for written Torah, or when reading b'Tzibur!
Damesek Eliezer: I would answer that we do not find a Berachah for mere Hirhur. If one thinks about love and fear of Hash-m, should he bless?! The Gra (8:2) gives general rules of Berachos. One is that we bless only on actions. I support the Shulchan Aruch's ruling from the Gra (47:9), who holds that one blesses after leaving the bathhouse or bathroom, or waking up. If so, we must say that R. Gamliel's answer in the middle room (a ruling without the reason) was permitted without Birkas ha'Torah. It is difficult to say that he blessed b'Hirhur. Also, if one must bless on Hirhur, why is a Ba'al Keri Meharher Keri'as Shema, without the Berachos, for they are only mid'Rabanan? The Gra holds that Ahavah Rabah, which is Birkas ha'Torah, is mid'Oraisa! (One must bless for Hirhur.) It is difficult to say that he became a Ba'al Keri during the day, after he blessed Birkas ha'Torah. Also, the Gra would hold that Keri is a Hefsek to require another Birkas ha'Torah afterwards! It is no less than leaving the bathroom.
Note: Presumably, R. Gamliel did not intend for learning, or even to give a ruling, when he answered the Nochri. He answered just for Darchei Shalom. Perhaps the Ba'al Keri was already Yotzei Birkas ha'Torah through Hirhur, for it is mid'Oraisa! Indeed, if he was not, he may be Meharher Ahavah Rabah, for it is Birkas ha'Torah.
Mishnah Berurah (6): One may give a ruling between litigants, not in the way of learning. To learn a law in a Sefer without the reason, one must bless. This is no less than writing.
Aruch ha'Shulchan (10): I say that the Beis Yosef holds that there is no contradiction. Surely, it is a Mitzvah to think about Torah, but the primary Mitzvah is verbal. Many verses call speech "Hegyon", e.g. "u'Leshoni Tehegeh Tzidkecha." When it refers to thought, it mentions the heart, e.g. "v'Hegyon Libi." In Birkas ha'Torah, we say "Ha'arev Na... b'Finu uv'Fiyos Amcha... Also "La'asok" is verbal. In Eruvin, we are stringent about one who learns quietly. Birkas ha'Torah was enacted only for verbal learning. However, writing is different, for it is the primary preservation of Torah. Nowadays, even oral Torah lasts primarily due to writing. If not for this, it would be forgotten. One thinks, and expresses it externally through writing. Therefore, one must bless for writing Divrei Torah. The Midrash connotes that writing is like speech.
Mishnah Berurah (7): The Gra is stringent to forbid Hirhur before Birkas ha'Torah. All permit a Mitzvah through an action before Birkas ha'Torah, even though he surely thinks about the law of the Mitzvah, for whatever one does not intend for the Mitzvah of learning does not need a Berachah (Gra 47:9).
Kaf ha'Chayim (7): Minchas Aharon says that learning in a Sefer is different, for surely he will say some of the words. Therefore, one must bless.
Kaf ha'Chayim (8): If he says the reason, he must bless.
Kaf ha'Chayim (9): Minchas Aharon says that this refers only to Isur v'Heter, but not a monetary ruling. The Rema (Darchei Moshe 85:1, citing the Ran) explicitly says so. He also requires blessing for a difficult question of Isur v'Heter that requires looking in a Sefer. Yafeh l'Lev disagrees. One should be stringent when possible.