Niddah 29 - Abortion of Unknown Nature
If a woman aborted, but she does not know whether it was a male or a female child, although she is positive that it was a fetus, and not an empty inflated sack, she has to observe both set of laws, for a male birth and for a female birth. That means that she is ritually impure for two weeks, like for a female child, and not one week, like for a male.
Now this is followed by the period of ritual purity, even if she sees blood. However, the purity for a male child would start after a week and continue for forty days. Since she already observed two weeks, she is left with only twenty six days of purity. Also, we can not give her the eighty days of purity, as she would have for a female child, and this explains why we use forty days in this calculation. Thus, she receives the stringencies of both possibilities.
If it is not even known if it was a child or not, since the discharge was lost before its nature could be determined, she does not receive neither the forty pure days for a male, nor eighty for a female.
Art: Jean Beauduin - A Pensive Moment