We begin Tractate Bechoros, chapter 1, Mishnah 1. The topic of the chapter is the mitzvah of peter chamor - the Torah obligation to redeem a firstborn male donkey. A Jew who owns a female donkey, and its first offspring is a male born naturally (and not, for example, by Caesarean section), is obligated by the Torah to redeem this offspring with a sheep - a goat or a sheep, of any kind and any age - and to give the sheep to a kohen.
Two separate aspects to the mitzvah:
A prohibition against deriving any benefit from the donkey until it is redeemed.
A monetary obligation to give the sheep - the Mishnah calls it a taleh - to the kohen.
One who does not want to redeem the donkey, or refuses to do so, is subject to the obligation of arufah: he breaks the donkey's neck, and the carcass is prohibited, but from then on benefit can be derived from it.
Full Jewish ownership:
The Mishnah begins by emphasizing that the mitzvah applies only to a donkey in full Jewish ownership, meaning that the Jew must be the owner not only of the offspring but also of the mother. The basis for this is in the verse (Numbers 3:13): "For every firstborn is Mine; on the day that I struck down every firstborn in the land of Egypt, I sanctified to Me every firstborn in Israel, from man to beast." From the words "every firstborn in Israel" they expound that the firstborn - a donkey, cow, goat, or sheep, as applicable (and as we will see later) - must be in the absolute ownership of a Jew, and the Mishnah also concludes explicitly with this point.
The cases listed by the Mishnah:
"Haloke'ach ubar chamoro shel nochri" - A Jew who buys from a gentile the rights to an unborn fetus, so that it will be his from the moment of its birth. Even though the born donkey belongs to the Jew, the mother was not in his ownership, and therefore the offspring is exempt from the obligations of peter chamor.
"V'hamocher lo" - And similarly the reverse, a Jew who sells to a gentile.
"V'hamishtatef lo" - A Jew and a gentile who bought a donkey in partnership, and the animal is exempt. And this is so even when the gentile's share is small, for example, if he stipulated to acquire only the animal's legs: since the gentile has some share in the donkey, it is exempt from peter chamor.
"V'hamekabel mimenu" - The Jew receives the donkey from the gentile to raise and care for it, and acquires the offspring as his wages.
"V'hanosen lo b'kabalah" - The Jew gives his donkey to a gentile so that he will raise it, and they share in the profits of the offspring.
Why is it forbidden to sell an animal to a gentile?
In passing, the Mishnah notes that it is forbidden to sell donkeys to gentiles, and this prohibition is rabbinic. The Torah protects a Jew's animal from working on Shabbos - the mitzvah of "shvisas behemtecha" (the resting of your animal), as even in Kiddush we mention "and your animal," that the animal too receives a day of rest. The Sages were concerned that the owner of the animal would consider: the donkey is a means of production, capital with monetary value, and during the six weekdays it yields a return on investment, while on Shabbos there is no possibility of working it. Because of this, he will come to rent it out to a gentile or sell it to him in a temporary sale, similar to the way we sell chametz on Pesach, and thus he will bypass the laws of his animal resting. Therefore, the Sages decreed not to sell an animal to a gentile at all, and this applies to any large animal and work animal - a camel, a horse, or a cow - lest he come to rent it to him on Shabbos.
What is the measure of the gentile's share?
The Gemara qualifies the exemption: the gentile's partnership exempts only when his share is something that, were it taken from the animal, would render it blemished. Thus, in the case of a cow where he gave the gentile its legs - if the legs were cut off, the animal would be blemished and disqualified from being a sacrifice. From here comes the distinction:
An external limb (such as the legs) - its absence is visible from the outside, and the animal is considered blemished.
The heart - an animal missing a heart is not considered blemished, since blemishes are determined by the animal's external appearance, and the absence of a heart is not visible. However, it is obvious that it is a tereifah and cannot survive like this, and therefore it is disqualified from being a sacrifice regardless. This logic applies all the more so to other internal organs.
The kidney - a donkey has two kidneys, and an animal missing one kidney is not a tereifah, nor is it blemished. Therefore, if the gentile's share is only a kidney, the donkey remains obligated in the laws of peter chamor.
Therefore, in all the cases enumerated by the Mishnah, there is an exemption from the firstborn obligation, and the same law applies to a goat, a cow, and a sheep. "Shenemar... beyisrael" - the verse states, "I sanctified to Me every firstborn in Israel"; in Israel, and not among gentiles. From the word "every", we learn that the animal must be entirely owned by a Jew, without any gentile ownership.
"Kohanim ulevi'im peturim mikal vachomer":
The following Mishnah (which appears in the Babylonian Talmud on page 3) establishes that a donkey owned by a kohen or a levi is also exempt from peter chamor, even though they are Israelites in every respect. The basis for this exemption is a kal vachomer (an a fortiori argument): The levi'im themselves exempted the firstborn Israelites from the mitzvah of redeeming the firstborn son (pidyon haben), as the verse states, "Take the Levites in place of all the firstborn among the children of Israel" - the levi'im took the place of the firstborn of Israel. Therefore, pidyon haben does not apply to a levi, and consequently, it does not apply to a kohen either, since kohanim are a subcategory of levi'im.
"Din hu sheyiftoru shel atzman" - if they themselves are exempt from pidyon haben, it is a kal vachomer that their property is exempt from redeeming a peter chamor. The specific linkage to peter chamor is derived from a separate verse that connects them (Numbers 18:15): "Ach padoh tifdeh et bechor ha'adam ve'et bechor habehemah hateme'ah tifdeh" - the impure animal, meaning donkeys, is redeemed in the same manner as the firstborn of Israel. Just as a levi and a kohen are exempt from redeeming a human firstborn, so too is the firstborn of their impure animals certainly exempt.
Important clarification:
It is worth emphasizing, and we will return to this later, that a cow, goat, or sheep owned by a levi or a kohen is obligated in the mitzvah of the firstborn. Their pure firstborn is offered as a firstborn sacrifice, except that they are not required to give it to someone else, and it remains with them. The exemption mentioned here is therefore limited to an impure animal, to peter chamor alone, by virtue of the verse cited above.
In summary: In this Mishnah, we learned the fundamentals of the mitzvah of peter chamor - the prohibition of benefiting from it until redemption, the monetary obligation to give the lamb to a kohen, and the obligation to break its neck for one who does not redeem it. We discussed the requirement for full Jewish ownership of both the mother and the offspring, derived from the verse "every firstborn in Israel", which explains the exemption for one who purchases the fetus of a gentile's donkey, one who sells to a gentile, one who partners with him, one who receives from him, and one who gives to him under a contract. We also learned the rabbinic decree not to sell a large animal to a gentile out of concern for the animal's Sabbath rest, the required extent of the gentile's share in a partnership to exempt the animal, and the exemption of kohanim and levi'im through a kal vachomer - an exemption that applies only to an impure animal.