Shulchan Arukh, Orach Chayim Siman 402
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
חריץ מלא מים מכונסי' שהוא בין שני תחומי שבת מקצתו בתחום עיר זה ומקצתו בתחו' עיר אחרת שתי העיירות אסורות למלאות ממנו אפי' בתוך התחום שהמי' שבתוך התחו' קוני' שביתת העיר ומתערבי' אלו עם אלו וצריך לעשו' מחיצה בסוף התחומין להפסיקן ואפילו היא תלויה שאינה מגעת לקרקע החריץ ושל קנים בעלמא סגי: הגה ובור של תבן העומדת בין שני תחומין אלו מאכילין מכאן ואלו מאכילין מכאן ואין חוששין שמא יקח א' מחלק חבירו: (גמרא פרק חלון) ואם המים מושכי' אין צריך שום תיקון שאינם קונים שביתה והרי הם כרגלי הממלא:
When water collected within a trench located between the Shabbos limits of two towns, and filled it, with part of [the trench] located in the Shabbos limits of one town and part in the Shabbos limits of the other, [the residents of] both towns are forbidden to draw [water] from it [on Shabbos], even though [the residents of] each [town] are drawing water from within their own Shabbos limits. [The rationale is that] the residents within a techum (Sabbath limit) acquire ownership of the city, and these residents can intermingle with each other. However, it is necessary to make a partition at the end of the boundaries to separate them. Even if the partition is suspended and does not touch the ground of the ditch, it is still valid. As for the ownership of the non-permanent structures, it is considered insignificant. Rema: And a pit of straw standing between these two domains, those eat from here and these eat from here, and there is no concern that one will take from the portion of his fellow. (Chulin) And if the water is drawn, no correction is needed, as they do not acquire a dwelling and they are like the feet that fill [the space].