One general indication that an animal has already given birth is the fact that it produces milk. With the exclusion of goats, almost all animals produce milk only after giving birth or close to that time. Once the mother has given birth, it is usually the newborn animal that nurses from its mother. The animal can recognize its offspring based on scent and usually does not allow other animals to nurse from her. There are rare occurrences, however, when a newborn animal may nurse from other lactating animals.
Given these facts, if someone observes a calf nursing from a cow can he be certain that she has already given birth and that any subsequent offspring would not have the sanctity of a firstborn?
Rabban Shimon ben Gamliel says: If one buys a nursing animal from a non-Jew, he need not fear that perhaps the offspring belongs to another animal.If he went among his herd and saw animals which had given birth for the first time nursing and animals which had not given birth for the first time nursing, we need not fear that perhaps the offspring of this one came to the other or perhaps the offspring of the other came to this one.
Rashi explains that it is clear that according to Rabban Shimon ben Gamliel the nursing animal is certainly the mother of the suckling animal, and we do not need to be concerned that there exists a minority of animals that will nurse the offspring of others.
An issue raised by the rishonim is whether the presence of milk in an animal is, in itself, an indication that the animal has given birth. Rabbenu Tam suggests that since Rabban Shimon ben Gamliel only discusses cases where there is a suckling animal attached to the mother it implies that milk by itself would not be enough of an indication that the mother gave birth. The Ramban disagrees and rules that according to Rabban Shimon ben Gamliel we do not concern ourselves with the possibility that an animal may be lactating without having given birth. He argues that the cases in the Mishnah are discussed in order to emphasize that even if we know that the animal was among the minority that give milk before giving birth, nevertheless, if there is an animal suckling from it we can be certain that the animal is her offspring.