Someone whose brother by his father died and did not leave descendants, it is a commandment to perform levirate marriage with his wife, whether she is his wife from marriage or his wife from betrothal, as it is written: "When brothers dwell together and one of them dies and has no son, her yavam shall go in unto her" (Devarim 25:5)
It says in the Torah: "And a son is not to him" (Deuteronomy 25:5 is discussing when somebody does yibbum) one son and one daughter, or the seed of a son and the seed of a daughter, until the end of the generation, between this woman to another. Even if it was a seed for a bastard. Behold these exempt a wife from doing chalitza and yibbum. But his sons with a slave or a non-jew don't exempt (yibbum and chalitza), even if the son (of the slave or non-jew) is converted to freed (rambam perk 1 hilchot yibbum and chalitza). And there are people who say that the son of another (not his) female slave counts, but his female slaves son doesn't count to exempt.
Even if there is a child that is dying or injured [so badly] from lashes that it is impossible for him to live, he is covered.
If one died and left behind a pregnant wife: If she has a miscarriage, she becomes someone who needs to do yibbum. If she gives birth, and the fetus emerges alive into the world, even should it die in the hour after it was born, its mother is exempt from chalitza and from yibbum. But on a rabbinic level, [we require] that until it is known for certain that it can live out the month, and that it was born after nine full months. Rem"a: Some say that nowadays, even if it only entered the ninth month of pregnancy by just one day, it is considered a viable fetus. And even though we say in the Talmud that a pregnant woman for nine months cannot be a "pieced" pregnancy [i.e. eight months and a day, for it will die], many have already asked about this how empirical evidence contradicts this. Rather we must say that now, the matter has changed, and similarly for many things (Bet Yosef in the name of the Rshbetz). However, the months of pregnancy are each 30 days, and we don't count them like we count the year [some months 30 days, some months 31, some 29] (so implied ibid.). But if it is not known how long it was born for, if it lives for 30 days, that is considered a viable fetus and the wives of its father are exempt from chalitza and yibbum. Rem"a: And some say only when its hair and fingers grow in (Tur). And so it seems to me. And if it dies within 30 days, even on the 30th day, whether it died from disease, whether it fell off the roof or a lion ate it, that is considered a doubt either a fetal death or a viable fetus, and she needs to do chalitza on a rabbinic level, but not yibbum. Rem"a: And some say even if it was born dead, and even if there is what to doubt it would live out the month, she does chalitza and not yibbum (Tur in the name of the R"P).
If they only know that he came to full term by her word, she is not believed. [If] a yibbum woman who went to the marketplace and got married, and witnesses testify that the fetus she gave birth to after her husband died lived for thirty days, and other witnesses contradict them and say that it did not live for thirty days, she is permitted to her [new] husband and she is not required to do chalitza. And if there are no witnesses that testify that it lived for thirty days, and there is no clear testimony that it did not live thirty days, but there is a pernicious rumor, we do not prohibit her based on a rumor after the marriage.
One who says, "That is my son," or "I have sons," he is believed to exempt his wife [from yibbum or chalitza should he die], even if he is assumed to have brothers. Some say that if there are witnesses that he has brothers, he is not believed afterwards to say that he has sons.
If he says at the point of kiddushin [quasi-married but not yet consummated] (Rem"a: Or after that (so inferred from the Ran)) "I have sons,", he is not believed to prohibit her [from remarrying]. Some say that she does chalitza but not yibbum.
One witness is believed to testify that she gave her husband a child, so that she can be permitted to a non-kohen. Rem"a: Some disagree. (Bet Yosef in the name of the Raavad and the Rosh)
one who has relations with a woman (that is not his wife), between the time that she is single and married she became pregnant, and he (the man that had relations with her when she was single) said "she is pregnant through me" and even if she agrees with him, there is a doubt, (and he needs to divorce her, and in a case where Yibum is an option) she does Chalitza and she does not do Yibum. If they were imprisoned together that its surely from him , he does not have to divorce her (Mordichai Perek Katzad). Some say even in a case when there is another Prostitute thats alone with him.
a woman who's husband goes overseas, and comes someone (who is a reliable source) and says to her: "your husband died", its permissable for her to get married
If she and her husband and her son traveled to a sea state, and she came and said: my husband died and afterward my son died, she is trusted. But, if she said: my son died and then my husband died, she is not trusted to be allowed to (participate in) levirate marriage. Rather, she performs halitzah(the refusal service of the levirate marriage) and she does not perform the levirate service.
If she and her husband journey on their own and she comes and says: a son was given to me in this state and he died, and then my husband died, she is believed. But if she says, my husband died and then this son died, she is not believed, and she performs the refusal service and is not allowed levirate marriage. In what situation is this: when she is unfit for Kohanic status or if she says: we were in a cave when he died and there was no one there to testify. But if this is not the truth, she cannot perform the refusal service or levirate marriage until witnesses come.
If he husband and her associate wife journey to the sea district(a long journey), and two (witnesses) come and say to her: your husband died, behold she cannot perform the refusal service(of levirate marriage) or do levirate marriage until she knows whether the associate wife gave birth or not. And if she was forbidden, from the outset, for kohanic status, she can perform the refusal service after 9 months.