Today's daf is sponsored by the Greenstone cousins in honor of Lana Kerzner's birthday. "With love to our dear cousin Lana. Your commitment to learning is a profound tribute to the legacy of our parents, a testament to the values they instilled in us. May the merits of this learning bring you peace, joy, and health this year and every year, not only for yourself but as a blessing to all those around you."
There are various halakhot relevant to males that do not apply to a tumtum (one whose genitals are covered up and it is unclear if they are male or female) whose skin is then perforated and is found to be a male. He cannot inherit as a firstborn, he cannot become a ben sorer u'moreh, his brit milah does not override Shabbat, and his mother does not have laws of impurity of a woman who gave birth. A difficulty is raised against two of these laws from a Mishna in Nidda 28a.
A braita is brought to support the position that a tumtum described above cannot inherit a double portion as a firstborn. The braita also derives that one cannot be a firstborn if it is doubtful whether or not he is the firstborn. The Gemara then explains why this was stated - to explain that if two brothers are born at around the same time (from two different mothers) but it was dark and it was impossible to determine who was born first, no one receives the double portion. Rava held otherwise - they could each write an authorization that "If I am the firstborn, I give you my share," and they can jointly receive the double portion. However, Rav Pappa raised a difficulty with Rava's position and Rava retracted.
A father is believed to say a particular son is the firstborn but what if there is a chazaka that a different child is the firstborn? Shmuel ruled that the two brothers write an authorization as mentioned above. The Gemara explains Shmuel's position that he was unsure whether the ruling is like Rabbi Yehuda, who believes a father in that case, or the rabbis who do not accept the father's testimony when there is a chazaka. If the rabbis don't accept the father's testimony, for what purpose did the verse in the Torah use the language of "yakir"? If the father could have given the son a double portion as a gift, it would have been effective, so of course then we can believe the father that this is the firstborn?! The answer is that the father could have only given a double portion as a gift to the son for property in his possession at the time or possibly for items that would later be in his possession (according to Rabbi Meir), but it would not have covered property that would be brought into the father's possession as he was dying. For this situation, the verse taught "yakir."
Regarding believing a father about the status of his son, Rabbi Yochanan describes a situation in which a father says that a person is his son and then says that he is his Caananite slave. He is not believed to render the person a slave as he would never have called his slave his son in the first place. However, if he first called him his slave and then his son, we accept his last words as it's possible he meant originally that the son served him like a slave. The reverse is true for one who made a statement in front of the tax authorities. They raise a difficulty against Rabbi Yochanan from a braita, but resolve it.