Niddah, Chapter 3, Mishnah 7. This chapter has been occupied with the woman who miscarries and with the question of which discharges carry the tumah of childbirth and which do not. Our mishnah takes up the cases where the woman simply cannot tell what left her body, and it teaches a principle that runs through this whole area of halachah: when the facts are unknown, she keeps the stringencies of every possibility at once.
By way of reminder, a woman who gives birth to a male is temeiah for seven days and then has thirty three days in which blood she sees is dam tohar, forty days in all. For a female the counts are doubled: fourteen days of tumah followed by sixty six days of dam tohar, eighty days in all.
She knows she miscarried, but not what
The opening case is "Hamapeles ve'ein yoda'as mah hu": a woman miscarries without knowing the nature of what she expelled. She has no doubt that a child emerged from her; what she cannot determine is its gender, whether the birth was of a son or of a daughter. For such a woman the mishnah rules "teishev lezachar velinekeivah", meaning that both sets of laws bind her at once, those of a mother of a boy and those of a mother of a girl, and wherever the two differ she follows whichever is more demanding.
In practice that comes out to fourteen days of tumah followed by twenty six days of taharah. The fourteen days of tumah come from the possibility that the child was a female, whose days of tumah run that long. The days of dam tohar are limited by the possibility that the child was a male, whose forty days end on the fortieth day; since the first fourteen are already days of tumah, only the stretch from day fifteen through day forty remains, which is twenty six days.
She does not even know whether it was a child
The mishnah then presses further: "ein yadua im valad hayah im lav", it is not known whether what emerged was a child at all. Perhaps it was a forming fetus, and perhaps it was nothing more than blood or some membrane that came out of her. Here she cannot rely on the laws of childbirth alone, because there may have been no birth whatsoever, and what she saw was ordinary blood which makes her a niddah.
The ruling accordingly is "teishev lezachar velinekeivah uleniddah": three separate possibilities weigh upon her at once, birth of a boy, birth of a girl, and no birth at all but a flow of niddah blood. Practically, this yields two results. For the first fourteen days her tumah is beyond question. Beyond that point, blood that appears to her receives no status of dam tohar, the blood of purity granted to a woman who has given birth; it is reckoned instead as the blood of a niddah, rendering her a niddah in every respect.
The lesson of the mishnah is the honesty of halachah in the face of the unknown. Where the identity of the discharge cannot be established, the woman is not left to guess. She simply carries every possibility together, and the practical result is a single clear path of tumah and taharah that satisfies all of them.