Eruvin, Chapter Five, Mishnah 9. This mishnah is largely a continuation of the previous one. At the end of the previous mishnah, the Sages and Rabbi Akiva disagreed about a person who placed his eruv in another city: does that city take on the status of his own city, so that the count of two thousand amos begins only outside the city, or must he measure from the spot where the eruv is lying? Rabbi Akiva held that the measuring begins from the place of the eruv itself, and the city is not considered as his four amos.
Rabbi Akiva's argument:
Rabbi Akiva turns to the Sages: "Ei atem modim li b'nosen eruvo bame'arah, she'ein lo mimkom eruvo ela alpayim amah" - do you not agree with me that one who places his eruv inside a cave that has walls has only two thousand amos from the place of the eruv? The cave is not considered his location; rather, the measuring is done from the spot where the eruv lies inside the cave, and not from its walls.
The Sages' response:
The Sages answered him: "Eimasai? Bizman she'ein bah diyurin" - your words are correct only regarding a cave that has no dwelling. And one must be precise about the intent here: it does not mean that no one actually lives there, but that it is not at all fit or suitable for dwelling - that is, a cave that has no walls or partitions surrounding it.
But "aval yesh bah diyurin - mehalech es kulah v'chutzah lah alpayim amah" - that is, it has walls in which one could live: he may walk through the entire cave, and beyond it another two thousand amos, for the measuring begins only after the walls of the cave. In such a case the cave is no different from a city, and the Sages do not agree with Rabbi Akiva.
"Nimtza kal tochah me'al gabah":
From the way the cave functions it emerges that "kal tochah me'al gabah" - there is a greater leniency in placing the eruv inside the cave than in placing it on top of it. If the eruv was placed on top of the cave, there are no partitions there at all, and even the Sages agree with Rabbi Akiva in such a case that we measure two thousand amos from the eruv itself, since there are no partitions from which to begin measuring. But when the eruv lies inside the cave, the law is more lenient, and the measuring begins after the partitions of the cave.
"Ul'moded she'amru":
In any event, the mishnah adds: "Ul'moded she'amru - nosnin lo alpayim amah" - on this point the Sages agree with Rabbi Akiva's position. In the previous mishnah the Sages conceded and said that one who measures his two thousand amos from the place of his eruv is given only two thousand amos, "she'afilu sof midaso kalah bame'arah" - and even if the end of the measurement falls in the middle of a cave, and regarding this point even a cave that has dwelling and in which people live, and even a city. If the measurement ends in the middle of that place, that is where his techum stops and he may not continue further.
In summary: in this mishnah Rabbi Akiva argued from the case of one who places his eruv in a cave, that he has only two thousand amos from the place of the eruv, and the Sages distinguished: a cave that is not fit for dwelling - we measure from the place of the eruv; but a cave that has dwelling, meaning that it has partitions - he may walk through all of it and two thousand amos beyond it, just like the law of a city. From here we learn that "kal tochah me'al gabah," since on top of the cave there are no partitions at all. Even so, one who measures two thousand amos and whose measurement ends inside a cave or a city - that is where his techum ends.