Reference for Bekhorot 91:10
מתני׳ <big><strong>יש</strong></big> בכור לנחלה ואינו בכור לכהן בכור לכהן ואינו בכור לנחלה בכור לנחלה ולכהן ויש שאינו בכור לא לנחלה ולא לכהן
ONE WHICH FOLLOWS AN UNTIMELY BIRTH WHOSE HEAD CAME FORTH ALIVE<span class="x" onmousemove="('comment',' In a case of twins, one a non-viable child and the other a viable one, where the former put forth its head alive and withdrew it and its companion anticipated it in coming out, the latter child is considered a first-born with the privileges of inheritance, the former not having prejudiced it in this respect. For although the emergence of the head of an embryo is considered a genuine birth, yet since Scripture calls the first-born who inherits: The beginning of his strength (Deut. XXI, 17) which is interpreted to mean, a child over whose death his father's heart is grieved, and since the untimely birth cannot live, the condition of inheritance i.e., being a first-born over which a father grieves. does not exist. The latter offspring, however, is exempted from the redemption from a priest, for what matters here is the opening of the womb, and this was done by the first offspring.');"><sup>6</sup></span>