Eruvin, Chapter 9, Mishnah 2. This mishnah addresses the question of when one may carry vessels out of a house into a courtyard or onto a roof, even though that courtyard or roof is connected to another courtyard or another roof.
The principle underlying the mishnah:
When there is an opening: Two courtyards or two roofs whose owners did not make an eruv together, and there is an opening between them - one may carry vessels out of the house into his courtyard or onto his roof, provided that he does not transfer them into the other courtyard or onto the other roof. Within his own domain, however, it is permitted.
When there is no opening: When there is no opening between one courtyard and the next, or between one roof and the next, but rather the whole area is completely breached and forms one continuous space - one may not carry objects out of the house even onto his own roof or into his own courtyard, since the place is breached and each area places a restriction on the other.
The case in the mishnah:
The mishnah discusses a case in which there is an opening on one side only, while the other side is straight and has no opening at all. Such a situation arises when a large area opens into a small one: from the perspective of the small area the walls run straight into it and it has no doorposts, while the large area retains walls on both sides of the breach leading into the small area.
The wording of the mishnah: "Gag gadol samuch le'katan - ha'gadol mutar ve'ha'katan asur" - on the large roof one may bring up vessels from the house, since it has the form of an opening; but on the small roof it is forbidden, for it has no opening at all, and its entire side opens straight and smoothly onto the large roof.
And likewise with courtyards: "Chatzer gedolah she'nifretzah le'ketanah - ha'gedolah muteret ve'ha'ketanah asurah, mipnei she'hi ke'pitchah shel gedolah" - the large one is permitted because it has something of an opening, since walls remain on both sides of the breach leading into the small courtyard, and the breach is regarded as the doorway of the large courtyard; the small one, however, is forbidden.
The Gemara's precision - a breach that occurred on Shabbos:
The Gemara establishes that the prohibition regarding the small area applies specifically to a breach that occurred before Shabbos. But if the partitions were breached on Shabbos itself, so that the small area was left without the form of an opening only on Shabbos - it is permitted, since at the onset of Shabbos it began in a permitted state.
A courtyard breached into a public domain:
From here the mishnah moves on to a different halachah: a courtyard whose wall was breached into a public domain - whether there is no wall there at all, or whether the breach is wider than ten amos so that it no longer has the status of an opening - and even if the wall fell on Shabbos. The Tannaim disagree about this law:
Rabbi Eliezer: "Ha'machnis mi'tocho li'reshus ha'yachid, o mi'reshus ha'yachid le'socho - chayav" - he is liable to bring a chatas, like anyone who carries into a public domain, since a courtyard that is completely open to the public domain has the status of a public domain, and such carrying is forbidden by Torah law.
And the Sages say: "Mi'tocho li'reshus ha'rabim, o mi'reshus ha'rabim le'socho - patur" - in their view the courtyard has the status of a karmelis, which is intermediate between a private domain and a public domain, and it does not have the status of a public domain.
The Gemara's conclusion:
The Gemara concludes that this is not the actual explanation of the mishnah. Even Rabbi Eliezer agrees that the courtyard as a whole does not have the status of a public domain but rather of a karmelis, and the dispute is narrowed to the place where the partition fell: Rabbi Eliezer holds that this area is 'the sides of the public domain,' and its status is that of a public domain; the Sages hold that the sides of the public domain, including that area where the wall stood, do not have the status of a public domain.
And although Rabbi Eliezer uses the expression "mi'tocho" - "mi'tocho li'reshus ha'yachid" - he does not mean from within the courtyard, but rather from the place of the partition. He used this expression because that is how the Sages phrased it, for they are speaking of transferring from the place where the wall stood into the public domain; and since they used this wording - even though their statement is cited afterward - he too adopted their phrasing.
In summary: In this mishnah we learned that an area which has the form of an opening may be used for carrying out of the house into it, while a completely breached area is forbidden. A large roof adjacent to a small one, and a large courtyard breached into a small one - the large ones are permitted, because the breach serves as their doorway, and the small ones are forbidden; and all this applies to a breach that preceded Shabbos. We also learned the dispute between Rabbi Eliezer and the Sages concerning a courtyard breached into a public domain, and the Gemara's conclusion that the dispute concerns only the law of 'the sides of the public domain' - the place of the wall that fell.