1) THE PROHIBITION FOR THE KOHEN GADOL TO LEAVE THE BEIS HA'MIKDASH
OPINIONS: The Mishnah relates an argument between Rebbi Meir and Rebbi Yehudah regarding whether or not the Kohen Gadol may leave the Beis ha'Mikdash. Rebbi Meir maintains that when a relative of the Kohen Gadol dies, he may join the burial procession and escort the dead by following the path of the procession as long as he cannot see them. He may do so until he reaches the city gates. Rebbi Yehudah states that the Kohen Gadol is not permitted to leave the premises of the Beis ha'Mikdash, because the verse says, "u'Min ha'Mikdash Lo Yetzei" (Vayikra 21:12).
If the Torah explicitly states that the Kohen Gadol may not leave the Beis ha'Mikdash, then how can Rebbi Meir argue? The Gemara later (19a) answers that Rebbi Meir interprets the word "Mikdash" in this verse to mean the status of Kedushah, holiness and purity, of the Kohen Gadol. The verse is saying that the Kohen Gadol must be careful not to go out from his state of Taharah by becoming Tamei when he leaves the Beis ha'Mikdash. By following the burial procession from a distance, he prevents himself from becoming Tamei. Rebbi Yehudah argues and says that even though "Mikdash" means the status of Kedushah of the Kohen, he is still not allowed to go out of the Beis ha'Mikdash for the burial procession, because if he goes out he might be overwhelmed with grief and he will run towards the dead person and become Tamei.
(a) The RAN infers from the discussion in the Gemara that the prohibition for the Kohen Gadol to leave the Beis ha'Mikdash is only mid'Rabanan, since the dispute involves whether or not the Kohen Gadol would be able to refrain himself if he becomes overwhelmed with grief. The Ran says that this is also the view of RASHI (19a, DH mi'Kedushaso), who explains that the verse is teaching that the Kohen Gadol must take protective measures to avoid becoming Tamei, and such protective measures are always enactments mid'Rabanan made for the sake of protecting a Mitzvah in the Torah.
This is also the view of the RAMBAN. The Ramban explains that the verse's simple intention is to teach that a Kohen Gadol who is an Onen (a close relative of the deceased before burial who normally is exempt from Mitzvos) may bring Korbanos while he is an Onen (see 84a).
(b) However, the RAMBAM in SEFER HA'MITZVOS (Shoresh 5) apparently maintains that the prohibition for the Kohen Gadol to leave the Beis ha'Mikdash is mid'Oraisa. He explains many verses which are explanations of previous Torah prohibitions, and not Torah prohibitions in themselves. He quotes the verse of "u'Min ha'Mikdash Lo Yetzei, v'Lo Yechalel Es Mikdash Elokav," and explains that "Lo Yechalel" ("he shall not desecrate the sanctuary of his G-d") is teaching the reason why the Kohen Gadol may not leave the Beis ha'Mikdash ("Lo Yetzei"), and it is not a prohibition in itself.
How, though, does the Rambam understand the Gemara (19a) which clearly indicates that the prohibition is only mid'Rabanan? The answer is that not all protective measures for the Mitzvos in the Torah are necessarily only mid'Rabanan. There can be protective measures which indeed the Torah itself mandates. The MARGOLIYOS HA'YAM cites many sources to support this. For example, RABEINU YONAH (in SHA'AREI TESHUVAH) says that the Torah prohibition against coming near to a person with whom marital relations is forbidden is essentially a protective measure that the Torah establishes in order to prevent one from transgressing the prohibition of having relations with that person. Similarly, the TAZ (YD 117:1) quotes the RASHBA who says that the Torah's prohibition against doing business with certain things is a protective measure, mid'Oraisa, so that one not come to eat those things. (Y. MONTROSE)

18b----------------------------------------18b

2) THE TESTIMONY OF THE KOHEN GADOL
QUESTION: Rav Yosef explains that when the Mishnah states that the Kohen Gadol may testify in court, it means that he may testify only for the king, for such testimony is not a disgrace to the Kohen Gadol's honor. The Gemara asks, how can Rav Yosef say that the Kohen Gadol may testify for a king in court, when the Mishnah itself says that a king is not judged in court? The Gemara concludes that Rav Yosef means that the Kohen Gadol may testify for the son of the king. It is not a disgrace to the Kohen Gadol's honor, because the king is present in the Beis Din when the Kohen Gadol gives his testimony.
TOSFOS and the RAN ask why Rav Yosef does not give a much simpler answer. The Gemara later (19a) says that when the Mishnah states that Beis Din may not judge a king, it means that Beis Din may not judge a king of Yisrael, but Beis Din may judge a king of Yehudah. Hence, Rav Yosef could have answered that the Mishnah refers to a Kohen Gadol who gives testimony in court for a king of Yehudah.
ANSWER: Tosfos answers that the Mishnah seems to refer to the same king throughout its discussion, and thus it is unlikely that one part of the Mishnah (the part that permits a Kohen Gadol to testify in court) refers to a different king (a king of Yehudah) than the other parts of the Mishnah..
However, the RAMBAM (Hilchos Klei ha'Mikdash 5:9) rules that the Kohen Gadol may testify for a king of Yisrael. The KESEF MISHNEH asks how can this be, if the Gemara here specifically states that a king of Yisrael is not judged in court and thus the Kohen Gadol cannot testify for him! The Kesef Mishneh suggests that when the Rambam says "a king of Yisrael," he means a king of the Jewish people and not specifically a king of Yisrael as opposed to a king of Yehudah, and he is actually referring to a king of Yehudah who may be judged in Beis Din.
The ARUCH LA'NER does not accept the answer of the Kesef Mishneh. He explains instead that it is known that the Rambam does not write Halachos which will never be applicable. When Mashi'ach comes, there will be only one king. That king will be from the House of David and will rule over the entire Jewish people. The Rambam, therefore, is saying that in the future, when the descendant of David ha'Melech is anointed as king over all of Yisrael, the Kohen Gadol will be able to testify for him, because he will be descended from Yehudah.
The MIRKEVES HA'MISHNEH agrees with the Aruch la'Ner, but he asks that the Rambam elsewhere (Hilchos Sanhedrin 2:5) also rules that we may not judge a king in Beis Din. If it is true that the Rambam does not record Halachos that will never be applicable, then how is this Halachah to be applied? The king from the House of David will be able to be judged in court! He answers that the Rambam is referring to the possibility that at any point in the present Galus, before the Mashi'ach comes, if a nation gives permission to the Jewish people to anoint their own king (who would not be from Shevet Yehudah), then the Halachah would apply and we would not be permitted to judge that king. (Y. MONTROSE)

OTHER D.A.F. RESOURCES
ON THIS DAF