ARE WE CONCERNED LEST A CITY WAS SETTLED AND LATER SURROUNDED BY A WALL? [Kri'as ha'Megilah :walled cities]
(Beraisa): "V'Ish Ki Yimkor Beis Moshav Ir Chomah" teaches that it was already surrounded by a wall when it was settled, but not if the wall was built later.
Suggestion: Perhaps if Bnei Yisrael built a wall (and later settled there) it is considered a walled city!
Rejection: It says here "Chomah," just like it says there (about the cities of Og's kingdom). Just like there, they were built by Nochrim, also here.
Suggestion: Perhaps if Nochrim built a wall (after Bnei Yisrael conquered Eretz Yisrael, and later it was settled) it is considered a walled city!
Rejection: It says here "Chomah," just like it says there. Just like there, Nochrim built them before (Yisrael conquered them), also here.
Megilah 3b (R. Yehoshua ben Levi): A walled city which was inhabited and then enclosed by a wall is considered a village.
We learn from "If a man will sell Bayis Moshav Ir Chomah". The Yishuv (settlement of the city) occurred when it already had a wall.
5b: Chizkiyah read the Megilah in Teverya on both days, because he was unsure whether it had a wall from the days of Yehoshua.
Question: A verse says that Chamas, Rekes and Kineres were walled cities at that time. We hold that Rekes is Teverya!
Answer: One 'wall' of Teverya is the sea. Chizkiyah was unsure if this suffices.
Question: Certainly this is not considered a wall!
(Beraisa): "That has a wall" excludes a row of houses that serves as a wall; "around" excludes Teverya, whose wall is the sea.
Answer: The Beraisa discusses redeeming a house sold in a walled city. Chizkiyah was unsure about the Megilah;
Perhaps the distinction between open and walled cities depends on whether they are exposed. (Teverya is exposed);
Or, perhaps it depends on whether the city is protected! (Teverya is protected.)
Rif (Megilah 2a): A walled city that was settled and then surrounded by a wall is considered a village.
Rashi (3b DH she'Yashav): R. Yehoshua ben Levi taught about a walled city that was settled and then surrounded regarding redeeming Bayis Ir Chomah.
Ran (Megilah 2a DH v'Amar): Rashi said that he taught about Bayis Ir Chomah, since for Megilah it need not be surrounded and then settled. The Gemara said that Teverya is not a walled city for Bayis Ir Chomah, and Chizkiyah was unsure whether the Megilah depends on being exposed or being protected. This shows that the criteria for Megilah are unlike those for Bayis Ir Chomah. If it was settled and then surrounded, it is protected and not exposed, so they read on the 15th. Also, R. Yehoshua ben Levi taught that what is near a Krach is considered a Krach. We do not say so about Bayis Ir Chomah. This is a leniency of Megilah. This suggests that also the teaching about being surrounded first applies only to Bayis Ir Chomah. However, the Rif and the Gemara connote that he taught also about Megilah. If not, he should have said 'it is considered like Arei Chatzerim (and not 'villages')'! Rather, R. Yehoshua ben Levi argues with Chizkiyah. He holds that it is not a wall (for Megilah), just like for Bayis Ir Chomah. However, Chachamim were lenient if it is close and seen (from the city), since the Krach has a proper wall.
Rosh (Eruvin 4:10, citing Rabbeinu Meir) Stam cities are surrounded for Dirah. (This affects Kelim of a Nochri brought there on Shabbos.) It is not normal to surround with a wall until they build houses first!
Ran (DH Aval): Since a city that was settled and then surrounded is considered a village, how can we read on the 15th in a city surrounded from the days of Yehoshua? Perhaps it was settled and then surrounded! I answer that settlement of Nochrim is not considered settlement. It had a wall before Yehoshua conquered it and settled it. This is only in Eretz Yisrael. Since it is considered surrounded regarding Bayis Ir Chomah, it is considered surrounded regarding Megilah. However, in Chutz la'Aretz, we should be concerned! We can say that we follow the majority. Most cities are surrounded and then settled.
Tosfos (3b DH Krach): The Gemara brought the verse about selling a house in a walled city. This supports Rashi. However, why wasn't this taught in Erchin with laws of Bayis Ir Chomah? Also, if so it should have said 'it is considered like Arei Chatzerim'! Rather, he discusses Megilah. The verse connotes that the city was settled in the wall (i.e. after there was a wall). The Gemara brings the verse about selling a house to teach that the same wall that helps for Bayis Ir Chomah helps for Megilah, i.e. it was surrounded and then settled.
Question: Even though Teverya it is not a walled city, for it is open to the sea on one side, (perhaps) they read on the 15th, for it is protected. Also a city that was settled and then surrounded should read on the 15th, for it is protected!
Answer (Tosfos): Teverya is different. Since we find that the sea helps for it like a wall, also for Megilah it should help, since it was surrounded (by the sea on one side) before it was settled. We never find that a city settled and then surrounded is considered a walled city.
Question: The Gemara expounds that if the houses are in a circle and form a wall around the city, this is not considered a wall. Why is a verse needed? It was settled (before all the houses were built, i.e.) before it was surrounded by a wall?
Answer #1 (Tosfos): The verse teaches that it is not considered a wall even if we know that no one lived in the houses until all of them were built.
Answer #2 (Pri Chodosh OC 688:1 DH u'Mah she'Chasav Oh, and Gra OC 688:4): According to Rabbeinu Meir, (normally) it is considered a wall if they built the houses with intent to surround them with a wall later.
Machatzis ha'Shekel (688:2 DH v'Nireh): The Ran asked how we know the status of cities in Chutz la'Aretz, and answered that Stam cities are surrounded and then settled. Due to this question, Rabbeinu Meir concluded that it suffices if it was settled with intent to surround the city.
Shulchan Aruch (OC 688:1): A city surrounded from the days of Yehoshua reads on the 15th. , This is if it was surrounded and later settled, or initially settled with intent to surround it later, but not if we know that it was settled with intent not to surround it.
Beis Yosef (DH u'Mah she'Chasav Rabeinu): The Tur brings from Rabbeinu Meir that 'settled and then surrounded' is only if it was initially settled with intent not to surround it.
Bi'ur Halachah (DH Al, citing Turei Even): This is when no houses were built after it was surrounded. If houses were built afterwards, even without the previous houses, it is a Krach due to the new houses! Rather, we follow the majority. If most of the houses preceded the wall, they read on the 14th. If most were built after the wall, they read on the 15th. If half were built afterwards, this requires investigation.
Rema: Stam, it was surrounded and then settled.
Question (Magen Avraham 2): The Ran says so. However, in Siman 401 we say that Stam cities are surrounded for residence. Rabbeinu Meir says that it is not normal to surround before they build houses! This is why he requires (for a walled city to read on the 14th) that it was initially settled with intent not to surround it. The Rema is difficult.
Answer #1 (Taz 2): In Siman 401, we require only that it was surrounded for the sake of residence, i.e. and not for a fortress, which is for the sake of war. Then we say that first they build houses temporarily, for a mere beginning, and afterwards they surround. Then, they settle it with many buildings. This is called surrounded and then settled, for the first buildings were a mere start. The same applies here. We follow the surrounding, which was before the settlement. We ignore the first buildings, for the primary settlement was later. In Siman 401 we merely say that the beginning of building houses is only a sign that there will be a city here. Here it says that Stam, it was surrounded and then settled, i.e. the primary settlement came later. This is like the Ran says, that most cities are surrounded, and afterwards they settle them. He mentioned settlement, and not building houses, for this is primary.
Answer #2 (Kaf ha'Chayim 7, citing Pri Chodosh DH u'Mah she'Chasav b'Hagah): In Siman 401, the Mechaber means that in Stam cities, they build with intent to surround afterwards.
Rebuttal (Machatzis ha'Shekel 2 DH v'Da'as): The Magen Avraham asked a contradiction in the Rema. Here he rules like the Ran, who says that most cities are surrounded and then settled. If so, there is no source for Rabbeinu Meir's law (that intent suffices), and in Siman 401 the Rema rules like (the Mechaber, who rules like) Rabbeinu Meir!
Answer #3 (R. Akiva Eiger, citing Perach Shushan): The Ran means that first they build houses and later settle them, i.e. they do not live in them until after there is a wall.
Gra (5): We learn from Chizkiyah. We do not say that his Safek about Teverya was whether it was settled and later surrounded!
Mishnah Berurah (4): Most cities are settled and later surrounded, and even if they were not, in any case they are settled with intent to surround them later with a wall.
Eshel Avraham (2): The Mechaber (Sa'if 4) says that if there is a Safek (whether a city was surrounded from the days of Yehoshua), it reads on both days. We do not follow the majority (of cities that are not from the days of Yehoshua)! This is when there is a Safek about the tradition (how old the city is).
R. Akiva Eiger (citing Si'ach Yitzchak): The Ran (Kidushin 50b) cites the text of Ge'onim, which says that a majority that depends on custom (e.g. most men are Mekadesh after sending nuptial gifts), is not important. We do not rely on it, for it is prone to change. Also the majority who surround before settling depends on custom! The Sha'ar ha'Melech answered that the Ran said so about a custom of individuals. Individual are prone to change their ways. Kings or officers build cities. Si'ach Yitzchak answered that the Ran was concerned for a minority (dependent on custom) only regarding Eshes Ish, due to the severity of the Isur. The Ramban says so. This is why if we would follow the majority in monetary matters, we would rely on a majority who call a jug 'jug' (and not barrel - Bava Kama 27a), or on a majority who buy cattle for plowing (Bava Basra 92b).