One can infer: But if were not for this decree, the beam would have to be returned to the owner as is, notwithstanding its change in name. Rav Yosef said: This is not a genuine change in name, as a beam retains its name even after it is inserted into a building. As it is taught in a baraita with regard to two obscure terms: The verse states: “And there were narrow windows and palm trees on the one side and on the other side, on the sides of the porch; there were also the tzalot of the house, and the ubbim” (Ezekiel 41:26). Tzalot of the house”; these are the casings [hamaltetin]. “And the ubbim”; these are the beams [hamerishot]. This shows that a beam can retain its name even after it has been built into a house. הא לאו הכי הדר בעיניה אמר רב יוסף מריש שמו עליו דתניא (יחזקאל מא, כו) צלעות הבית אלו המלטטין והעובים אלו המרישות
Rabbi Zeira said a different answer: With regard to a change in name, a change in which the item can revert to its original state is not considered enough of a change for the thief to acquire the stolen item. Since the joist can be removed and revert to being called a beam, it is not considered a true change of name. רבי זירא אמר שינוי החוזר לברייתו בשינוי השם לא הוי שינוי
The Gemara asks: And is a change in name in which the item does not revert to its original state really considered a change? But there is the case of a water duct, where it was initially called a log [ketzitzta] and now it is called a duct, and it is taught in a baraita: A duct that one hollowed out and afterward attached to the ground or to a building invalidates a ritual bath through the water it channels to the bath. The water in a ritual bath must be gathered directly from rain or a stream, not drawn with vessels. If one hollowed out a log and used it to channel water into the bath, this is considered drawn water, as he used a vessel. ושינוי השם שאינו חוזר לברייתו מי הוי שינוי והרי צינור דמעיקרא קציצתא והשתא צינורא ותניא צינור שחקקו ולבסוף קבעו פוסל את המקוה
By contrast, if one attached it first and afterward hollowed it out, it does not invalidate the ritual bath. Before the log was hollowed out, it was already attached to and considered part of the ground, and therefore the act of hollowing it out does not turn it into a vessel. קבעו ולבסוף חקקו אינו פוסל את המקוה
The Gemara states its question: And if you say that a change in name is considered a matter of significance, i.e., it is considered a real change in the item, then even if one attached the log first and afterward hollowed it out, the ritual bath should also be invalid. Since hollowing out the log leads to a change in name, it should be considered a new vessel at that point. ואי אמרת שינוי השם מילתא היא אפי' קבעו ולבסוף חקקו נמי ליפסל

Koren Talmud Bavli (Koren Publishers)

The Koren Talmud Bavli is a groundbreaking edition of the Talmud that fuses the innovative design of Koren Publishers Jerusalem with the incomparable scholarship of Rabbi Adin Steinsaltz.

The Gemara answers: The halakha that drawn water may not be used for a ritual bath is different, as it applies by rabbinic law, and consequently the Sages were lenient in this case. The Gemara asks: If so, then even in the first clause, where the log was hollowed out before being attached, it should be permitted as well. The Gemara answers: There is a difference between the two cases. There, in the first clause, the log had the status of a vessel while it was still detached. Here, in the second case, it did not have the status of a vessel while it was detached, but only after it became attached to the ground, and therefore the Sages were lenient. שאני שאיבה דמדרבנן היא אי הכי אפילו דרישא נמי התם איכא תורת כלי עליו בתלוש הכא אין תורת כלי עליו בתלוש
The Gemara raises an objection against Rav Yosef’s opinion that the owner’s despair that he will recover his stolen items does not effect acquisition for the thief, from a baraita: With regard to a thief, a robber, and one who forces people to sell him items against their will, their consecration of the items they obtained in these manners is a valid consecration; and the teruma that they separate from the produce they obtained in these manners is valid teruma; and the tithes that they separate from those foods are valid tithes. Consecrations, terumot, and tithes must be performed by the owner of the item in question. Since there was no physical change in these items, this shows that the thief is considered the new owner merely by virtue of the owner’s despair of recovery. מיתיבי הגנב והגזלן והאנס הקדישן הקדש ותרומתן תרומה ומעשרותן מעשר
The Sages say, in answer to this question: There, in those cases involving consecrations, terumot, and tithes, there is a change in name of the stolen item, as initially the stolen food was called untithed produce, i.e., produce from which teruma and tithes have not been separated, and now it is called teruma or tithe. With regard to consecration, it was initially called non-sacred property, and now it is called consecrated property. אמרי התם איכא שינוי השם דמעיקרא טיבלא והשתא תרומה הקדש מעיקרא חולין והשתא הקדש
Rav Ḥisda says that Rabbi Yonatan says: From where is it derived that a change in a stolen item causes the thief to acquire it? As it is stated: “And he shall return the stolen item that he took by robbery” (Leviticus 5:23). What is the meaning when the verse states the seemingly superfluous phrase “that he took by robbery”? It teaches that only if the item is in the same state as when he took it by robbery it he must return it. But if not, he is required to pay only money; the stolen item remains his to keep. אמר רב חסדא א"ר יונתן מניין לשנוי שהוא קונה שנאמר (ויקרא ה, כג) והשיב את הגזלה מה ת"ל אשר גזל אם כעין שגזל יחזיר ואם לאו דמים בעלמא בעי שלומי
The Gemara asks with regard to this derivation: But this phrase: “That he took by robbery,” is required to exclude the case of an item stolen by one’s father, i.e., that when a son returns an item or money that his father had stolen, he does not add one-fifth to the principal amount of that which his father stole. The passage in question addresses one who stole and took a false oath. This individual is obligated to add one-fifth to the amount he stole (see Leviticus 5:21–24). The apparently redundant phrase “that he took by robbery,” teaches that the requirement to add one-fifth applies only to the sinner himself, not to his heirs (see 104b). האי אשר גזל מיבעי למעוטי גזל אביו שאינו מוסיף חומש על גזל אביו
The Gemara answers: If so, if the verse teaches only that halakha, let the Merciful One write merely: And he shall return his stolen item, as from that phrase alone it could be derived that an heir does not have to add one-fifth. Why do I need the Torah to write the expression “that he took by robbery”? One may therefore conclude two conclusions from this verse: A son need not add one-fifth, and a change in a stolen item effects acquisition for the thief. א"כ ניכתוב רחמנא והשיב את גזילו אשר גזל למה לי למכתב ש"מ תרתי
And there are those who say a different version of the above statement: Rav Ḥisda says that Rabbi Yonatan says: From where is it derived that a change in a stolen item does not cause the thief to acquire it? As it is stated: “And he shall return the stolen item that he took by robbery” (Leviticus 5:23), from which it may be inferred that he must return it in any case, even if it has undergone a change. The Gemara asks: But it is written “that he took by robbery,” which indicates that, on the contrary, the item need be returned only if it is in a similar state to when it was stolen. The Gemara answers: That phrase is required to teach another halakha: One adds one-fifth upon returning his own stolen item concerning which he had taken a false oath, but he does not add one-fifth upon returning something stolen by his father. ואיכא דאמרי אמר רב חסדא א"ר יונתן מניין לשנויי שאינו קונה שנאמר והשיב את הגזילה מ"מ והא כתיב אשר גזל ההוא מיבעי ליה על גזילו שלו מוסיף חומש ואין מוסיף חומש על גזל אביו:
Ulla says: From where is it derived that the owner’s despair of recovering his stolen item does not cause the thief to acquire it? As it is stated in the criticism of the Jewish people for bringing inferior animals as offerings: “And you have brought that which is stolen, and the lame, and the sick” (Malachi 1:13). From the juxtaposition of these cases it may be derived that a stolen animal is similar to a lame animal: Just as a lame animal has no rectification at all with regard to its disqualification as an offering, אמר עולא מניין ליאוש שאינו קונה שנאמר (מלאכי א, יג) והבאתם גזול את הפסח ואת החולה גזול דומיא דפסח מה פסח דלית ליה תקנתא כלל