We are studying Maseches Shabbos, chapter 13 mishnah 5, in which we learn the parameters of the melachah of trapping on Shabbos: what measure of confinement makes an animal considered trapped, and how that measure changes from creature to creature.
The view of Rabbi Yehudah:
"Rabbi Yehudah omer: hatzad tzippor lamigdal, utzvi labayis - chayav" - one who traps a bird and brings it into a migdal (this does not mean a tower in the literal sense, but a cupboard), and likewise one who traps a deer and brings it into a house, is liable for the melachah of trapping.
A deer cannot enter a cupboard at all, whereas a bird does enter one and is considered trapped in that small, confined space. As for the deer, even though a house is spacious and it can move about inside, it is considered trapped from the moment it has been limited to that area.
The view of the Chachamim:
"V'chachamim omrim: tzippor lamigdal, utzvi labayis v'lachatzer v'labeivarin" - the Chachamim agree that a bird is considered trapped specifically in a cupboard, that is, in a confined space; but a deer is considered trapped even in a larger area - in a house, in a courtyard, or in an enclosure. These spaces are sufficient to constitute trapping for a large creature such as a deer.
The view of Rabban Shimon ben Gamliel:
"Rabban Shimon ben Gamliel omer: lo kol habeivarin shavin" - not all enclosures are governed by the same rule. There are very large enclosures in which the deer is not considered trapped, since it is still difficult to catch it; and there are enclosures small enough that the deer feels confined and behaves accordingly.
"Zeh haklal: mechusar tzeidah - patur, v'she'eino mechusar tzeidah - chayav":
Still requiring trapping: if even after the animal has been confined to the smaller space one would still have to go on and trap it, he is exempt, because the first act of trapping is not considered trapping at all.
No longer requiring trapping: if in that confined space the animal is already restricted, and there is no need to work out how to catch it a second time, he is liable for the first act of trapping.
The halachah follows Rabban Shimon ben Gamliel, since his words come to explain the view of the Chachamim.