Reference for Eruvin 4:6
הָיוּ שְׁנַיִם, מִקְצָת אַמּוֹתָיו שֶׁל זֶה בְּתוֹךְ אַמּוֹתָיו שֶׁל זֶה, מְבִיאִין וְאוֹכְלִין בָּאֶמְצַע, וּבִלְבַד שֶׁלֹּא יוֹצִיא זֶה מִתּוֹךְ שֶׁלּוֹ לְתוֹךְ שֶׁל חֲבֵרוֹ. הָיוּ שְׁלֹשָׁה, וְהָאֶמְצָעִי מֻבְלָע בֵּינֵיהֶן, הוּא מֻתָּר עִמָּהֶן וְהֵן מֻתָּרִין עִמּוֹ, וּשְׁנַיִם הַחִיצוֹנִים אֲסוּרִים זֶה עִם זֶה. אָמַר רַבִּי שִׁמְעוֹן, לְמָה הַדָּבָר דּוֹמֶה, לְשָׁלֹשׁ חֲצֵרוֹת הַפְּתוּחוֹת זוֹ לָזוֹ וּפְתוּחוֹת לִרְשׁוּת הָרַבִּים, עֵרְבוּ שְׁתֵּיהֶן עִם הָאֶמְצָעִית, הִיא מֻתֶּרֶת עִמָּהֶם וְהֵן מֻתָּרוֹת עִמָּהּ, וּשְׁתַּיִם הַחִיצוֹנוֹת אֲסוּרוֹת זוֹ עִם זוֹ:
If two were standing, part of the (four) cubits of the one within the (four) cubits of the other, they bring and eat in the middle, so long as one does not take out from his own (four) cubits to those of the other. [If they were standing six cubits from each other, two of the cubits of each being "swallowed" in those of the other, they may bring (food) and eat within those two cubits, so long as one does not stretch his hand with his loaf or his articles into the two outer cubits (of the other, having no possession therein)]. If there were three, with the middle one "swallowed" between them, [two of his cubits common to one, and two to the other], he is permitted with them [He may turn to one side and share with the one, and to the other, and share with the other], and they are permitted with him; and the two outer ones are forbidden with each other. R. Shimon said: To what may this be compared? To three courtyards opening one into the other and (all) opening into the public domain, [in which instance each is a domain in itself, there being no crossing from one to the other, so that they do not mutually forbid one another (see 6:9)] — If the two of them (the outer ones) made an eruv with the middle one, it (the middle one) is permitted with them and they are permitted with it, and the two outer ones are forbidden with each other. [And the rabbis differ with R. Shimon on this, saying that all are forbidden with each other. R. Shimon now says to the rabbis: Is not the instance of three men and the middle one "swallowed" between them, where you concur that he is permitted with them and they are permitted with him — is that instance not similar to the instance of three courtyards? Why, then, do you differ with me in that instance? And they respond: In the instance of three courtyards, since there are many (persons involved), if the two outer ones that are forbidden with each other would come to carry from one to the other, the (men in the) middle one would not be aware of it and would not warn them, thinking that it was one of the middle dwellers (who is permitted with each of the outer ones) who was carrying. But here, with three men, if one of the two outer ones came to take something into the two cubits of the outer one, the middle one would notice this and would warn him. The halachah is in accordance with R. Shimon in the instance of three courtyards, that the two outer ones alone are mutually forbidden.]