ONE WHO PLANTED IN ANOTHER'S FIELD WITHOUT PERMISSION [Yored li'Sdei Chavero]
(R. Shmuel bar Nachmani): It says "Eleh Venei Se'ir ha'Chori Yoshvei ha'Aretz", for they were experts in Yishuv ha'Aretz (settling the land). They could tell which stretch of land is good for olives, which for vines, and which for figs.
Bava Metzi'a 101a (Rav): If Reuven planted trees on Shimon's field without permission, he has the lower hand. (He gets the lesser of the improvement or expenditures);
(Shmuel): We estimate how much people pay to plant such a field.
(Rav Papa): They do not argue. Rav discusses a field that is not normally planted, and Shmuel discusses a field that is normally planted.
Rav did not say so explicitly. It was inferred from the following case;
David planted Levi's field without permission. Rav said that he must estimate and pay. Levi said 'I do not want it.' Rav said that he must estimate and pay, but David has the lower hand. Levi refused.
Later, Rav saw Levi guarding the crops. Since he showed satisfaction that it was planted, he forced him to give David the upper hand.
(R. Yakov): If Reuven planted young trees in a field, he may not take them back.
Question: Why must he leave the trees?
Answer #1: It is for the settlement of Eretz Yisrael.
Answer #2: It weakens the land.
These answers argue about a field in Chutz la'Aretz.
Rif and Rosh (Bava Metzi'a 58a and 8:23): If Reuven built on Shimon's land, and Shimon fenced or guarded it, we force him to pay for the full building, and Reuven has the upper hand. We learn from the case of David and Levi. From the Yeshiva, they sent that just like Reuven can say 'I will take my beams or give me my expenditures', also Shimon can say 'take your beams.' This is better than what Rav Hai Gaon wrote in Sefer ha'Mekach. Even if it would be a Safek [whether the Halachah follows Rav Hai or the Yeshiva], Reuven cannot make Shimon pay due to a Safek. All the more so [he need not pay], for the Yeshiva's opinion is more reasonable!
Rambam (Hilchos Gezeilah 10:4): If Reuven planted Shimon's field without permission, if the field is normally planted, we estimate how much people pay to plant such a field, and Shimon pays this to him. If it is not normally planted, we estimate, and Shimon has the lower hand.
Magid Mishneh: He gets the lesser of the improvements and expenditures. Some say that he gets the smallest estimate of the appraisers.
Rambam (5): If Shimon said 'take your trees and leave', we heed him.
Magid Mishneh: The Rambam discusses a field not normally planted. Then, Shimon prevails. If it is normally planted, Shimon cannot say this. The Ramban and Rashba agree; it seems that the Rif agrees.
Kesef Mishneh: I see no proof that the Rif agrees.
Maharit (1:106): Meforshim derive from the episode that Rav accepted Levi's claim that he does not want to pay, that the owner can say 'I do not want what you did. Take it and leave.' The Rambam says so, after giving the law of a field that is normally planted and a field not normally planted. The Magid Mishneh says that the Rambam's last law applies only to a field not normally planted. The Rosh holds that it is even in a field normally planted. We say that we estimate how much people pay to plant such a field when the owner wants to keep the trees, but not if he does not want them. The Beis Yosef says that Talmidei ha'Rashba and the Rif agree. If not, one could force his neighbor to make a field into a garden, and houses in a Chatzer.
Maharit: Why did the Magid Mishneh say that the Rif holds like the Rambam? The Rif did not distinguish [between two kinds of fields]! Perhaps it is because the Rif equated this law to a building. If Reuven says 'I will take my beams', we heed him. Similarly, Shimon may say 'take [your beams].' Presumably, regarding a house, [in a place where] it is normal to build, if Shimon wants it, he pays the proper amount and Reuven cannot take back his beams. Since it is normal to build it, he is like the landowner's Shali'ach, on condition to receive his expenditures. From then, Shimon's land acquires for him. This is clear from Bava Basra 5a, regarding one who built a wall [between his Chatzer and his neighbor's] more than four Amos tall. We assume that he did not pay (for what is above four Amos). Through paying half the expenditure, he acquires half the wall, against the builder's will, since they both own the property. His property acquired for him.
Maharit: The Nimukei Yosef says that when the landowner said 'take your trees', he permitted the planter to weaken the land. Surely, the landowner may similarly say 'take' when the builder agrees! Rather, the Chidush is [for a place] where it is not normal to build a house. I explain the Yeshiva's ruling as follows. The builder can say 'I will take my beams [or give me my expenditures]', for surely he did not acquire to the landowner on condition that to forfeit his expenditures. The builder was not assured of receiving the proper amount [that one would pay to build it], and he has the lower hand. Here too, the landowner can say 'since you did so on your own volition, I will not pay you even the lower amount. Take your trees and go!' I say so to explain the Magid Mishneh.
Rebuttal (Ra'avad): We do not say so in Eretz Yisrael.
Beis Yosef (CM 375 DH ha'Yored): The Rambam rules like the latter answer [so Eretz Yisrael and Chutz la'Aretz are the same].
Magid Mishneh: We can say that this is only when the landowner wants the trees. If it is worth more to plant seeds, this is no claim (to say that he must leave the trees for settlement of Eretz Yisrael).
Migdol Oz: The Gemara does not distinguish like this [between Eretz Yisrael and Chutz la'Aretz]. If there were a distinction, the Gemara would have said so. However, it is logical that this is only if the field is normally planted. We can derive this from close inspection of the words. Rav Papa gave a general rule 'when it is not normally planted.' If he planted, why is Yishuv Eretz Yisrael a reason? It is destined to be uprooted and seeded. This is Yishuv Eretz Yisrael! We say in Shabbos that Bnei Chori were experts in Yishuv ha'Aretz [because they knew which land is good for olives, which for vines, and which for figs]! If it is proper for what he planted, this is so even in Chutz la'Aretz, we estimate how much one would pay... Therefore, the Rambam wrote only what is arranged in the Gemara, even though it is known from reasoning, like he is wont to do.
Rambam (ibid): If Reuven said 'I will take my trees', we do not heed him, for it weakens the land.
Ra'avad: This is why we do not heed him even in Chutz la'Aretz. The first opinion gives another reason why we do not heed him [in Eretz Yisrael].
Magid Mishneh: The Rambam rules like the latter version.
Rosh (22): Levi's field was normally planted. Rav said that David has the upper hand. Levi said that he did not want it planted, and David should take back his trees. We said that Reuven gets like planters receive (if it is normally planted), or he has the lower hand (if it is not normally planted) when Shimon wants to keep the trees. If not, Shimon can say 'take your trees', even if the field is normally planted. He can say 'I prefer to plant grain.'
Rosh: Most Meforshim say that the field was not normally planted. This is wrong. Surely, when Shimon does not want the trees, he can tell Reuven 'take your trees.' It follows that Rav taught that Reuven has the lower hand when Shimon wants to keep them!
Shulchan Aruch (CM 375:1): If Reuven planted Shimon's field without permission, if the field is normally planted, we estimate how much people pay to plant such a field, and Shimon pays this to him. If it is not normally planted, we estimate and Shimon has the lower hand.
Shulchan Aruch (2): If Shimon said 'take your trees and leave', we heed him.
Gra (2): Most Poskim learn this from the episode. Levi refused to pay anything, and Rav was quiet, until Levi showed that he wanted the trees. Most say that this is only for a field not normally planted. The Rosh says that it is in any case. The Nimukei Yosef explains that Rav did not know whether it is normally planted, therefore, the first time he did not specify that David has the lower hand.
Shulchan Aruch (ibid): If Reuven said 'I will take my trees', we do not heed him, for it weakens the land.
SMA (5): The Ir Shushan explains that uprooting the trees would weaken the land. Rashi explains that the trees already weakened the land. It seems that the Rambam and Mechaber agree.
Nesivos ha'Mishpat (2): It seems that this is only in a case when he can take back the trees like he gave. In a case when he cannot, e.g. he dyed a garment and one cannot remove the dye, he must pay him.