A MECHITZAH MADE ON SHABBOS [Shabbos: Mechitzah made on Shabbos]
Gemara
(Abaye): Any Mechitzah made on Shabbos, whether Shogeg or Mezid, is a valid Mechitzah.
Question: Rav Nachman taught that it is a Mechitzah only for [Chiyuv for] throwing [to there from Reshus ha'Rabim, for mid'Oraisa it is a Mechitzah], but it does not permit carrying inside!
Answer: He refers only to Mezid.
43b: Nechemyah brei d'Rav Chanilai accidentally walked outside the Techum.
Rav Nachman: Have people stand in lines to make Mechitzos, and he may re-enter the Techum.
Shabbos 101b (Beraisa): If ships were tied to each other, and they became separate, if they were tied again, they are permitted like before, whether they were tied b'Shogeg, b'Mezid, through Ones, or mistakenly.
Similarly, if mats were spread [for Mechitzos; some texts - in Reshus ha'Rabim,] and they were rolled up, and they were spread again, they permit like before, whether this was b'Shogeg, b'Mezid, b'Ones, or mistakenly.
Any Mechitzah made on Shabbos, whether Shogeg or Mezid, is valid.
Question: Rav Nachman taught that it is a Mechitzah only for throwing, but not for carrying!
Answer: He refers only to Mezid.
Rishonim
Rif (Shabbos 36b): The Gemara answers that Rav Nachman discusses Mezid.
Rambam (Hilchos Shabbos 16:22): A Mechitzah made on Shabbos is a Mechitzah. If it was made b'Shogeg, one may carry in it on that Shabbos, as long as it was not made with the Da'as (knowledge or consent) of the Metaltel (the one who carries). If he intended that it be made on Shabbos to permit carrying, even if the one who made it was Shogeg, he may not carry in it on that Shabbos. Likewise, if it was made b'Mezid, it is forbidden even for one who did not intend to carry.
Magid Mishneh: Nechemyah left the Techum, and Rav Nachman said to make a Mechitzah of people to permit him to re-enter the Techum. The Gemara brought a Beraisa that forbids making a wall of people, and asked from a Beraisa that permits. We answered that it is permitted only if he does not know about it. /the Rambam equates other Mechitzos b'Shogeg to Mechitzos of people. Just like there is no Isur to make a Mechitzah of people, also other Mechitzos b'Shogeg. Even so, had the wall been made with Nechemyah's Da'as, even though the people in the wall did not know about it, it would have been forbidden for him to enter. Mid'Rabanan, it is not a wall. The same applies to a wall made b'Shogeg with intent to carry. So I explain the Rambam. The Rashba permits any wall made b'Shogeg, even if it was with intent to carry. He rejects the Rambam.
Rosh (Shabbos 11:2): Rashi explains that 'the initial Heter returns' does not apply to Mezid. This is difficult. If so, why did the Beraisa mention Mezid? This is the primary Chidush! Rashi also said that Rav Nachman refers to the Seifa of the Beraisa. This is difficult. If so, Rav Nachman's teaching should have been brought in the primary place of this Beraisa, in Eruvin (20a)! R. Tam explains that Rav Nachman discusses a Stam Mechitzah made on Shabbos b'Mezid. He does not discuss the Beraisa. Since we brought the Beraisa regarding Rav Safra's teaching, we challenge Rav Nachman from it. The Beraisa is Machshir a Mechitzah that divides Chatzeros and permits each Chatzer to be Me'arev by itself. A Mechitzah made on Shabbos is valid even in Reshus ha'Rabim, and all the more so to divide Chatzeros, [in the latter case] it is even if he was Mezid. Rav Nachman discusses a different matter, i.e. a Mechitzah in Reshus ha'Rabim that made a Reshus ha'Yachid. We challenge Rav Nachman from the Seifa. 'Any Mechitzah made on Shabbos is valid' connotes even for carrying, like the Reisha. We answer that Rav Nachman discusses Mezid for a Mechitzah in Reshus ha'Rabim. The mats return to the initial Heter even b'Mezid [for it is Reshus ha'Yachid even without them].
Ran (Shabbos 36b DH a'Mezid): The primary Perush is like R. Tam. We answer that Rav Nachman refers to Mezid, i.e. not in the case of the Beraisa, rather for a general Mechitzah made on Shabbos. Initially, we thought that it does not matter whether or not it was first made on Shabbos. We answer that it matters, and Rav Nachman discusses Mezid of a normal case [when it is first made on Shabbos].
Poskim
Shulchan Aruch (OC 362:3): A Mechitzah made on Shabbos is Kosher, if it was made b'Shogeg.
Mishnah Berurah (16): This is even if he did not rely on it from before Shabbos.
Kaf ha'Chayim (23): The primary opinion permits even if he did not rely on it from before Shabbos, even though the Korban Nesan'el says that the Rif disagrees.
Shulchan Aruch (ibid.): If it was made b'Mezid, it is a Mechitzah to be stringent, to obligate one who throws to there from Reshus ha'Rabim, but not to permit carrying in it.
Magen Avraham (4): The Rosh and Ran do not contradict each other. The Rosh says that R. Tam says that Rav Nachman discusses in general. Why didn't he say that he discusses the Seifa, 'any Mechitzah made on Shabbos, whether Shogeg or Mezid, is valid', and that it discusses Reshus ha'Rabim? Rav Nachman teaches that it is a Mechitzah for throwing, but not for carrying! Rather, we must say like the Rosh said, that the Seifa is like the Reisha, and permits carrying. Rav Nachman must discuss a Mechitzah in Reshus ha'Rabim, when there was no Mechitzah there initially. The Seifa discusses a Mechitzah that fell. It is permitted if he rebuilt it on Shabbos, even b'Mezid, like the Ran says in the name of R. Tam. The Rosh inferred that also in the Reisha it fell during the week, for if not, once Shabbos was permitted, it is permitted (374:2)! Therefore, the Rosh says that it was Reshus ha'Yachid without the Mechitzah, but Rav Nachman discusses a wall that made Reshus ha'Yachid. The Beraisa mentions mats spread in Reshus ha'Rabim, due to the Seifa.
Machatzis ha'Shekel (DH uv'Zeh): The Rosh adds that even if it fell on Shabbos, if it makes Reshus ha'Yachid, the Heter does not return. The Ran could agree to this.
Magen Avraham (4): The Rosh, Ran, Tur and Shulchan Aruch agree that if a Mechitzah made Reshus ha'Yachid and fell during the week, if it was rebuilt on Shabbos, it is forbidden.
Magen Avraham (5): This is only if it was not made l'Da'as the Metaltel, like the Rambam, and unlike the Rashba.
Mishnah Berurah (19): No one may rely on the Mechitzah on Shabbos.
Kaf ha'Chayim (26): Perhaps one may rely on it the next Shabbos.
Kaf ha'Chayim (27): Mid'Oraisa it is a Mechitzah. Chachamim fined, lest one benefit from Melachah of Shabbos.
Shulchan Aruch (ibid.): This is if initially there was no Mechitzah. If there was a Mechitzah, and it was removed, and made again, even b'Mezid, the initial Heter returns.
Beis Yosef (DH u'Mah she'Chasav v'Hani): Tosfos (101b DH Ki) explains R. Tam like the Rosh. The boats were Reshus ha'Yachid even without the Mechitzos, and likewise regarding the mats. Also R. Yerucham says so. The Tur explains R. Tam like the Ran, that it depends on whether or not the Mechitzah existed before Shabbos. Why does the Tur favor the Ran against the Rosh?! Perhaps he explains the Rosh like the Ran. The Rambam forbids Stam a Mechitzah made b'Mezid. He did not distinguish. This connotes like Rashi. It seems that the Rif agrees.
Taz (1): There are two ways to explain the stringency of Mezid according to R. Tam. One is like the Ran, Tur and Shulchan Aruch, that if initially it was Reshus ha'Rabim, a Mechitzah made b'Mezid does not permit carrying like in Reshus ha'Yachid. This is a fine. However, if before Shabbos a Mechitzah made Reshus ha'Rabim into Reshus ha'Yachid, and an Eruv was made with another Reshus ha'Yachid, and it fell on Shabbos, it reverted to Reshus ha'Rabim. One could not carry in it, or to the other Reshus ha'Yachid. If b'Mezid he rebuilt the Mechitzah, the initial Heter returns. This is a leniency.
Taz (1): The second Perush of R. Tam is like the Rosh. Even if there was a Mechitzah before Shabbos, if it fell on Shabbos, and b'Mezid he rebuilt it, it is forbidden, unless it was Reshus ha'Yachid even without the Mechitzah. The Mechitzah merely enabled each Chatzer to be Me'arev by itself. If the Mechitzah made Reshus ha'Rabim into a Reshus ha'Yachid, it does not help if he rebuilds it b'Mezid, for this pertains to an Isur Torah. The Beis Yosef says that the Rosh could agree to the first way. This is wrong. The Rosh says that Rav Nachman discusses a Mechitzah in Reshus ha'Rabim. It does not help even if it was there before Shabbos, fell and was rebuilt. The first Perush says that it helps! The Bach omitted "in Reshus ha'Rabim" from the text of the Tur and Rosh, to enable the Tur to be like the Rosh. In any case it was Reshus ha'Yachid; the wall that fell divided the Chatzeros. This cannot be. The Tur says that they made an Eruv together!
Gra (DH v'Hani): Regarding boats, we cannot say that it is only for throwing, for in any case one is exempt for throwing! (There is no Reshus ha'Rabim there.) The Tur is stringent like the answers of the Rosh and Ran, like he normally does. Also R. Yerucham is stringent like the Rosh and like R. Tam.
Mishnah Berurah (20): The same applies if there was a Mechitzah, and it fell before Shabbos.
Shulchan Aruch (ibid.): E.g. if two or three surrounded themselves with mats in Reshus ha'Rabim, and divided between themselves with mats, and were Me'arev together, they may pass from one to the other. If the mats were rolled up, they are forbidden. If they were spread again, even b'Mezid, the initial Heter returns.
Gra (DH b'Reshus): The Bach says that the text [of the Tur and Shulchan Aruch] should say "in Reshus ha'Yachid", like Tosfos and the Rosh. He struggled to establish it like the Rosh. His Perush is poor, and so is the Magen Avraham's.
Mishnah Berurah (22): The Mechaber could have taught the law regarding one person. He teaches that rebuilding the Mechitzah permits even if people were Me'arev together.
Mishnah Berurah (26): Most Poskim hold that the Heter does not return if a Mechitzah makes Reshus ha'Yachid. If it was Reshus ha'Yachid without it, the Heter returns, even if he transgressed Torah law to build it, but not if it was made initially on Shabbos.