MOCKING THE DEAD [Lo'eg la'Rash]
16b: "They honored him (Chizkiyahu) in his death" - they learned by his grave;
R. Noson and Rabanan argued about whether they learned for three days or for seven, or according to another version, for 30 days.
Berachos 18a (Beraisa): One may not walk in a cemetery with Tefilin on his head, or learning from a Sefer Torah in his arm. If he did, he transgressed "Lo'eg la'Rash (one who mocks the deceased, who cannot perform Mitzvos) Cheref Osehu." This applies only within four Amos of the Mes. The four Amos around a Mes pertain to the Mes, it is forbidden to say Shema there.
(Rachbah): One who sees a Mes (being taken to burial) and does not accompany it (at least four Amos) transgresses "Lo'eg la'Rash".
Rif and Rosh (Berachos 11a and 3:5,6,8): One may not walk through a cemetery with Tefilin on his head, learn from a Sefer Torah in his arm, or pray. If he did, he transgressed Lo'eg la'Rash. This is within four Amos, which pertain to the Mes. One who sees a Mes and does not accompany it transgresses Lo'eg la'Rash.
R. Yonah (DH Lo, cited by Rosh): One may not learn even without a Sefer Torah. The Beraisa mentioned the normal case (holding a Sefer, for one may not say verses by heart). Tefilin and similar Mitzvos are forbidden.
R. Yerucham (ibid.): Even learning by heart is forbidden; we forbid Shema.
Rambam (Hilchos Tefilin 4:23): One may not walk in a cemetery with Tefilin on his head. One must remove it before coming within four Amos of a Mes or grave.
Rambam (Hilchos Kri'as Shma 3:2): One may not read Shema in a bathhouse, latrine, cemetery or near a Mes. If he distanced four Amos from the Mes or grave, it is permitted. Anyone who read Shema when it is forbidden must read again.
Rebuttal (Ra'avad): If he requires one who read near a Mes to read again, this is totally wrong.
Migdal Oz: The Gemara said that a Mes 'seizes' its four Amos, like it says about a latrine. One who read near a latrine must read again.
Kesef Mishneh: The Ra'avad and Ramach hold that since the Isur is only due to Lo'eg la'Rash, surely he need not read again. Perhaps the Rambam agrees. Alternatively, he holds that Chachamim fined anyone who read improperly, even b'Shogeg, to read again, so he will be careful next time.
Lechem Mishneh: The Ra'avad holds that since the Isur to read is not due to the place, he need not read again.
Nimukei Yosef (Bava Kama 6b DH Yeshiva): The Rosh says that they did not learn within four Amos of Chizkiyah's grave, due to Lo'eg la'Rash. The Ramah says that since it was to honor him, it was permitted within four Amos.
Rambam (Hilchos Sefer Torah 10:6): One may not hold a Sefer Torah in his arm and enter a cemetery, even if it is wrapped in cloths and in its case. One may not read in it until distancing four Amos of a Mes or grave.
Kesef Mishneh: The Rambam holds that holding a Sefer Torah even without reading it is a Mitzvah, therefore it is Lo'eg la'Rash.
Rambam (14:13): One may not go within four Amos of a grave with Tefilin on his head, a Sefer Torah in his arm, or pray there. Outside of four Amos is permitted.
Radvaz: Why did the Rambam change from the text of the Gemara, and forbid Tefilin in his hand? (This was the Radvaz' text of the Rambam.) He holds that even without fulfilling a Mitzvah, it disgraces the Mes. This is why he says that holding a Sefer Torah, even without reading, is Lo'eg la'Rash.
Kesef Mishneh: Our text of the Gemara forbids reading in a Sefer Torah. This is reasonable. Without reading, it is not Lo'eg la'Rash.
Lechem Mishneh: In Hilchos Sefer Torah, the Rambam forbids holding it or reading! Perhaps here he relies on what he wrote there. The Tur forbids only holding it and reading it.
Shulchan Aruch (OC 45:1): One may not enter a cemetery, or within four Amos of a Mes, with Tefilin on his head, due to Lo'eg la'Rash.
Taz (1): This implies that in a cemetery is forbidden even more than four Amos from a grave. Berachos 18a, and the Beis Yosef in Siman 23, forbid only within four Amos! The Tur decrees not to enter a cemetery wearing Tefilin lest one accidentally come within four Amos of a grave. We say so only to be stringent. If one entered, he would say Shema.
Rebuttal (Magen Avraham 1): One may distance four Amos from a cemetery (YD 282:4). This is the intent of the Gemara and the Beis Yosef in Siman 23.
Mishnah Berurah (1): We forbid four Amos from where the graves begin, unless a wall separates. Some permit within the cemetery more than four Amos from any grave. I say that one should be stringent within the area of graves. Letter of the law, an area designated for graves is permitted, but it is proper not to go within the wall around the cemetery with Tefilin on his head, lest he inadvertently come within four Amos of a grave.
Kaf ha'Chayim (1): The Bach permits one who is in a cemetery not within four Amos of a Mes. The Taz says that we decree to forbid. The Ma'amar Mordechai forbids because a Stam cemetery is full of graves. The Magen Avraham holds that letter of the law, it is forbidden.
Mishnah Berurah (2): Ateres Zahav says that the entire room in which the Mes rests is like four Amos. Magen Giborim disagrees.
Kaf ha'Chayim (2): The same restrictions apply if a Mes was brought near a person. Chachamim discussed the normal case.
Shulchan Aruch (ibid.): If the Tefilin are covered, it is permitted.
Beis Yosef (DH Asur): The Gemara forbids with Tefilin on his head, which are exposed. We are not concerned for Tefilin of the arm, which are covered. Similarly, if the head Tefilin are covered, they are permitted.
Taz (2): Also the straps, even on the finger, must be covered.
Shulchan Aruch (71:7): One may not read Shema within four Amos of a Mes or in a cemetery. If he read he was not Yotzei.
Taz (5): Here, (within four Amos of a) 'Beis ha'Kevaros' means a grave. It is only a decree not to read in a cemetery more than four Amos from a grave. Surely, b'Di'eved he was Yotzei!
Magen Avraham (4): (Regarding Shema,) the Gemara and Piskei ha'Rosh (Berachos 3:5) do not mention four Amos regarding a cemetery. (It is forbidden even if it is more than four Amos from a grave.)
Mishnah Berurah (15): All Divrei Kedushah are forbidden, due to Lo'eg la'Rash.
Mishnah Berurah (17): The Acharonim agreed that if one read Shema there, he must read again. If he blessed or prayed, he does not repeat them.
Shulchan Aruch (YD 282:4): One may not hold a Sefer Torah in his arm and enter a cemetery, even if it is wrapped in cloths and in its case. One may not read in it until distancing four Amos from the Mes or cemetery.
Shulchan Aruch (367:2): One may not walk in a cemetery or within four Amos of a Mes with Tefilin on his head, due to Lo'eg la'Rash, unless they are covered.
Shulchan Aruch (3): One may not walk in a cemetery or within four Amos of a Mes or grave with a Sefer Torah in his arm and reading it. He may not pray there.
Shach (3): Also Kaddish should not be said within four Amos.