MAKING A MECHITZAH ON SHABBOS TO PERMIT RELATIONS [Shabbos: Ohel Arai]
Gemara
Chachamim forbid making the third wall of a Sukah [on Shabbos or Yom Tov], but permit making the fourth wall.
Beitzah 22a Question (Aba bar Marsa): May one extinguish a Ner to permit relations [in the room]?
Answer (Abaye): He can go to another room. If he cannot, he may make a Mechitzah in front of the Ner. If he cannot, he may cover the Ner.
Question (Aba): If these are impossible, what is the law?
Answer (Abaye): It is forbidden.
Rishonim
Rambam (Hilchos Isurei Bi'ah 21:10): One may not have relations in front of a Ner. If on Shabbos there is a Ner burning and he has no other place, he should not have relations.
Magid Mishneh: This is when he has nothing to make a Mechitzah
Rambam (Hilchos Yom Tov 4:4): On Yom Tov one may not extinguish a lamp to permit relations. He may cover it or make a Mechitzah between himself and the lamp.
Rosh (Shabbos 17:8): R. Tam forbids making a Mechitzah that permits Tiltul or is Machshir a Sukah. This is why we distinguish between the third and fourth walls. If it is a mere addition, it is permitted.
Mordechai (Shabbos 311): Maharam made a Mechitzah 10 Tefachim tall in front of the Seforim every night, for sometimes he needed to urinate at night. Before Shabbos, he would roll it up and leave a Tefach spread, for on Shabbos one may make a Mechitzah only for mere Tzeni'us. We learn from Eruvin 102a. Rav permitted extending a Mechitzah to shade rams only if it was already open a Tefach.
Poskim
Shulchan Aruch (OC 240:11): One may not have relations in front of a Ner even if he darkens with his cloak.
Rema: However, it is permitted if he makes a Mechitzah 10 Tefachim tall in between, even though light goes through, e.g. a sheet. Alternatively, one may put a Kli over the Ner.
Rema (OC 315:1): One may not make a Mechitzah in front of the Neros to permit relations, unless it was spread a Tefach before Shabbos. Then, one may increase it on Shabbos.
Taz (514:2): Aba asked whether one may extinguish. Why did Abaye initially say that he can go to another room? This is obvious! Rather, the Halachah follows R. Yehudah, who permits Machshirim, but we do not publicly teach that. Therefore, he did not want to explicitly forbid. Maharam requires making a Mechitzah in front of Seforim before Shabbos. This is a stringency. Abaye permitted a Mechitzah to permit, but we forbid! If letter of the law it is forbidden, Yom Tov is like Shabbos! Rather, since letter of the law one may extinguish, this is not considered a Mechitzah that permits.
Note: If he wants the Ner to continue burning, the only way to permit relations is through a Mechitzah. Perhaps then all agree that it is a Mechitzah that permits.
Mishbetzos Zahav: The Ramban says that even R. Yehudah forbids Machshirim mid'Rabanan.
Magen Avraham (3): The Darchei Moshe (3, DH Vilon) brought from the Beis Yosef that Maharam calls a Mechitzah in front of Seforim [to permit urinating] a Mechitzah that permits. This is difficult, for Beitzah 22a permits making a Mechitzah in front of a Ner to permit relations. It is unreasonable to distinguish Shabbos from Yom Tov regarding this. Perhaps the Gemara permits in front of light of a Ner or in front of Seforim only the way Maharam did. There is a printing mistake; I did not want to correct it myself. The Rambam permits a Mechitzah between himself and the lamp. Semag, R. Yerucham, Hagahos Maimoniyos, Tosfos, the Ra'avad, Roke'ach and Rikanti agree. Rashi says that he makes a Mechitzah with a sheet. This connotes that it is on Yom Tov. If it were on a weekday, a full Mechitzah is permitted!
Magen Avraham (3): Maharam used to make a Mechitzah 10 Tefachim tall. I.e. this permits even if the Seforim are exposed above the Mechitzah, for it is as if he is in another Reshus, like it says [about Keri'as Shema] in 79:2. One may not make such a Mechitzah on Shabbos, for he makes it a separate Reshus. He must tie it so the wind will not move it. However, when the Mechitzah is as tall as all the Seforim, surely it need not be 10 Tefachim tall, for it is like a cover. One may hang it on Shabbos, since it is not for a Mechitzah, rather, for a mere cover and modesty.
Question (Eshel Avraham): We require two covers for Seforim!
Machatzis ha'Shekel: The Magen Avraham discusses when there is another cover in front of the Seforim, so it is like a Kli within a Kli.
Note: This is difficult. The Magen Avraham connotes that whenever it is as tall as the Seforim, it need not be 10 and one may hang it on Shabbos!
Kaf ha'Chayim (17): Eliyahu Rabah never permits a Mechitzah above 10 Tefachim. Machatzis ha'Shekel permits this when there is another cover, for then the Heter does not require a 10 Tefachim Mechitzah. This refers to Seforim like Gemaros. There is no way to permit a Sefer Torah without a Mechitzah.
Magen Avraham (3): Likewise, one may not make a Mechitzah 10 Tefachim tall in front of a Ner, unless it blocks the Ner, for then it is like a mere cover. Surely, if a Mechitzah a Tefach wide sticks out from the side in front of Seforim, one may hang a sheet in front of it, for this is adding to an Ohel (313:1).
Kaf ha'Chayim (7): Eshel Avraham says that excrement depends only on being covered, so one may cover it even if he makes a Mechitzah. Orchos Chayim and Tosefes Shabbos agree. I am unsure. Covering permits also Seforim, yet one may not make a Mechitzah in front of Seforim!
Taz (2): Surely one may put two covers on Seforim [to permit relations or eliminating]. This is not called a Mechitzah. Similarly, one may put a Kli over a Ner [to block the light, to permit relations].
Mishnah Berurah (10): The Magen Avraham forbids the Mechitzah only if it is 10 Tefachim tall and the Ner can be seen above it. One darkens with his garment, and this permits relations. (The Shlah says to be very careful to avoid this Heter for relations.) Since the Ner can be seen, the Heter depends on a Mechitzah 10 tall. It is as if the Ner is in a different room. One must tie it so it would not blow in a wind. If not, it is not considered a Mechitzah! If a Mechitzah covers a Ner or Seforim, it is like a mere cover. It need not be 10 tall, nor tied at the bottom. (Acharonim say that when making such a Mechitzah on Shabbos, there must be another cover on the Seforim, so it is as if they are in a Kli within a Kli.) Some Acharonim forbid even a Mechitzah that covers, for in any case it permits. In pressed circumstances one may rely on the Magen Avraham. All permit covering Seforim with a mere cover, i.e. a Kli within a Kli. This is not a Mechitzah at all.
Bi'ur Halachah (DH Im): Nishmas Adam (44:5) says that if on Shabbos a man's lust is overcoming him, and a Ner is burning [in the only available room], and if he does not have relations he will have an emission, he may rely on those who permit Mechitzas Arai, and erect a folding Mechitzah, even if it was not spread before Shabbos. They do not consider it to be a Mechitzah that permits, since he could hide the Ner in other ways, e.g. cover it with a Kli. In such a case, one may permit even if the light can be seen above the Mechitzah. If his lust is not overcoming him, Chalilah to rely on this!
Kaf ha'Chayim (21): If one transgressed and made a Mechitzah in front of Seforim or a Ner, since the Isur is only mid'Rabanan, relations are permitted.
Shulchan Aruch (EH 25:5): One may not have relations in front of a Ner even if he darkens with his cloak. If it was Shabbos and he has no other room, he should not have relations.
Source (Gra DH Afilu): We learn from Beitzah 22a. Abaye did not say that it suffices to darken with his cloak.
Beis Shmuel (5): We are not concerned if light shines in from another room. However, he must darken with his Talis. A transparent Mechitzah in front of Seforim does not help. The Torah says that matters of Ervah depend on visibility, and the Seforim can be seen. Covering suffices. One does not need a Mechitzah.
Kaf ha'Chayim (OC 240:71): Olas Tamid and the Zohar permit darkening with a cloak even regarding a Ner. On Shabbos, when one may not make a Mechitzah, one may rely on this, in particular if she will not become [and is not already] pregnant. They must be covered from head to toe with a totally opaque covering.