One who touches the flesh of an animal which died without ritual slaughter becomes impure, for it is written “Any who touches their dead flesh shall be impure” (Leviticus 11:24). The sages were divided about the status of a person who sticks his hand inside a pregnant animal and so touches the body of a fetus which has died. One sage argued that the person is not impurified and another said it depends — if the fetus is within an impure animal the person touching it is impurified, and if the pregnant animal is pure, the person is as well.
The scholars attempt to explain the logic of the two sages by stating that the sage who holds the person touching the dead fetus to be pure based his stand on an analogy: just as, had they slaughtered the animal the slaughter would also suffice for the fetus (the fetus which is extracted from the slaughtered animal does not require slaughter to be permitted for consumption; in Halacha it is called a ben pakuah). By analogy, just as the mother is pure, so is the fetus. When the fetus is in the womb of an impure mother, though the reasoning above is not applicable, it can be learned by induction (one of the methods of interpreting the Torah).
The logic of the second sage, who draws a distinction between a fetus in the womb of a pure animal and one in the womb of an impure animal, is that it is written in the Torah “And whatever walks upon their soles, among all manner of animals that walk on four, those are impure for you; any who touch their carcass will be impurified” (Leviticus 11:27). The words upon their soles imply animals without split hooves, who walk on the full sole, the impure animals. The scholars asked: if this is the case, if it all depends on the animals’ soles, what is the rule if a fetus without split hooves is in the womb of a cow? In this case, too, it should be pure, because the Scriptures were precise in stating walk on four, an animal without split hooves which walks on four hooves; an animal with split hooves would effectively have eight. (Each foot, split in two, would be counted twice.) If so, the scholars went on to ask, a fetal cow in the womb of a camel should not impurify, because an animal with eight hooves (the fetal cow) is in the womb of an animal with four (the camel). Answer: we learn from “whatever walks” that this includes the case above. The scholars then asked: what is the rule for a fetal cow with joined and solid hooves in the womb of a cow with joined and solid hooves, so a fetus with four hooves is in the womb of an animal with four hooves. A certain sage, Achdevoy the son of R’ Ami, asked: according to the method above, which draws a distinction between four hooves and eight, we should conclude that a fetal pig (which has split hooves) in the womb of a sow would not impurify, for it is a fetus with eight hooves in the womb of an animal with eight hooves, but this is inconceivable. Therefore the scholars rejected this whole method and tried to find a different logic.
(Babylonian Talmud, Tractate Chulin 70b)