155 Yevamot 10/3-5

(ג) הָאִשָּׁה שֶׁהָלַךְ בַּעֲלָהּ וּבְנָהּ לִמְדִינַת הַיָּם, וּבָאוּ וְאָמְרוּ לָהּ, מֵת בַּעְלֵךְ וְאַחַר כָּךְ מֵת בְּנֵךְ, וְנִשֵּׂאת, וְאַחַר כָּךְ אָמְרוּ לָהּ, חִלּוּף הָיוּ הַדְּבָרִים, תֵּצֵא, וְהַוָּלָד רִאשׁוֹן וְאַחֲרוֹן מַמְזֵר. אָמְרוּ לָהּ, מֵת בְּנֵךְ וְאַחַר כָּךְ מֵת בַּעְלֵךְ, וְנִתְיַבְּמָה, וְאַחַר כָּךְ אָמְרוּ לָהּ, חִלּוּף הָיוּ הַדְּבָרִים, תֵּצֵא, וְהַוָּלָד רִאשׁוֹן וְאַחֲרוֹן מַמְזֵר. אָמְרוּ לָהּ, מֵת בַּעְלֵךְ, וְנִסֵּת, וְאַחַר כָּךְ אָמְרוּ לָהּ, קַיָּם הָיָה וּמֵת, תֵּצֵא, וְהַוָּלָד רִאשׁוֹן מַמְזֵר, וְהָאַחֲרוֹן אֵינוֹ מַמְזֵר. אָמְרוּ לָהּ, מֵת בַּעְלֵךְ, וְנִתְקַדְּשָׁה, וְאַחַר כָּךְ בָּא בַעְלָהּ, מֻתֶּרֶת לַחֲזֹר לוֹ. אַף עַל פִּי שֶׁנָּתַן לָהּ אַחֲרוֹן גֵּט, לֹא פְסָלָהּ מִן הַכְּהֻנָּה. אֶת זוֹ דָרַשׁ רַבִּי אֶלְעָזָר בֶּן מַתְיָא, וְאִשָּׁה גְּרוּשָׁה מֵאִישָׁהּ (ויקרא כא), וְלֹא מֵאִישׁ שֶׁאֵינוֹ אִישָׁהּ:

(ד) מִי שֶׁהָלְכָה אִשְׁתּוֹ לִמְדִינַת הַיָּם, וּבָאוּ וְאָמְרוּ לוֹ, מֵתָה אִשְׁתְּךָ, וְנָשָׂא אֶת אֲחוֹתָהּ, וְאַחַר כָּךְ בָּאת אִשְׁתּוֹ, מֻתֶּרֶת לַחֲזֹר לוֹ. הוּא מֻתָּר בִּקְרוֹבוֹת שְׁנִיָּה, וּשְׁנִיָּה מֻתֶּרֶת בִּקְרוֹבָיו. וְאִם מֵתָה רִאשׁוֹנָה, מֻתָּר בַּשְּׁנִיָּה. אָמְרוּ לוֹ, מֵתָה אִשְׁתְּךָ, וְנָשָׂא אֶת אֲחוֹתָהּ, וְאַחַר כָּךְ אָמְרוּ לוֹ, קַיֶּמֶת הָיְתָה, וּמֵתָה, הַוָּלָד רִאשׁוֹן מַמְזֵר, וְהָאַחֲרוֹן אֵינוֹ מַמְזֵר. רַבִּי יוֹסֵי אוֹמֵר, כָּל שֶׁפּוֹסֵל עַל יְדֵי אֲחֵרִים, פּוֹסֵל עַל יְדֵי עַצְמוֹ. וְכָל שֶׁאֵין פּוֹסֵל עַל יְדֵי אֲחֵרִים, אֵינוֹ פוֹסֵל עַל יְדֵי עַצְמוֹ:

(ה) אָמְרוּ לוֹ, מֵתָה אִשְׁתְּךָ, וְנָשָׂא אֲחוֹתָהּ מֵאָבִיהָ, מֵתָה, וְנָשָׂא אֲחוֹתָהּ מֵאִמָּהּ, מֵתָה, וְנָשָׂא אֲחוֹתָהּ מֵאָבִיהָ, מֵתָה, וְנָשָׂא אֲחוֹתָהּ מֵאִמָּהּ, וְנִמְצְאוּ כֻלָּן קַיָּמוֹת, מֻתָּר בָּרִאשׁוֹנָה, בַּשְּׁלִישִׁית, וּבַחֲמִישִׁית, וּפוֹטְרוֹת צָרוֹתֵיהֶן, וְאָסוּר בַּשְּׁנִיָּה וּבָרְבִיעִית, וְאֵין בִּיאַת אַחַת מֵהֶן פּוֹטֶרֶת צָרָתָהּ. וְאִם בָּא עַל הַשְּׁנִיָּה לְאַחַר מִיתַת הָרִאשׁוֹנָה, מֻתָּר בַּשְּׁנִיָּה וּבָרְבִיעִית, וּפוֹטְרוֹת צָרוֹתֵיהֶן, וְאָסוּר בַּשְּׁלִישִׁית וּבַחֲמִישִׁית, וְאֵין בִּיאַת אַחַת מֵהֶן פּוֹטֶרֶת צָרָתָהּ:

(3) [If] a woman had a husband and a son who went overseas, and they [a witness] came to her and said, "Your husband died and then your son died", [whereupon] she re-married, following which they said, "The events were reversed" - she leaves [her second husband] and the first and the last child are Mamzerim. [If] they said to her, "Your son died and then your husband died," [whereupon] she underwent Yibum, following which they said, "The events were reversed" - she leaves [her second husband] and the first and the last child are Mamzerim. [If] they said to her, "Your husband died", [whereupon] she re-married, following which they said to her, "He was alive [when you remarried] and [then] died, she leaves and the first child is a Mamzer but the last child is not a Mamzer. If they said to her, "Your husband died" and she became betrothed, and then her [first] husband arrived she is permitted to return to him. Even if the latter [husband] gave her a bill of divorce, he has not disqualified her from [subsequently marrying] a priest. This was how Rabbi Elazar ben Matya interpreted [the verse] (Vayikra 21:7), "[A priest shall not marry] a woman divorced from her husband," - [but he may marry a woman divorced] from a man who was not her husband.

(4) [If] a man had a wife who went overseas, and they [a witness] came to him and said, "Your wife died" [whereupon] he married her sister, and then his wife arrived, she may return to him. He is permitted [to marry] the relatives of the second one [wife], and the second one is permitted [to marry] his relatives. And if the first one died, he is permitted [to marry] the second one. [If] they [a witness] said to him "Your wife died" [whereupon] he married her sister, and then they said "She was alive [when you remarried] and [then] died," the first child is a Mamzer but the last child is not a Mamzer. Rabbi Yose says: Whoever disqualifies [a woman] for other people disqualifies for himself [as well], and whoever does not disqualify for other people does not disqualify for himself [either].

(5) [If] they [a witness] said to him, "Your wife died" [whereupon] he married her paternal sister. She [the second wife] died [whereupon] he married her [the second wife's] maternal sister. She [the third wife] died [whereupon] he married her [the third wife's] paternal sister. She [the fourth wife] died [whereupon] he married her [the fourth wife's] maternal sister. [If] they were all found alive he is permitted [to marry] the first, third and fifth women and they exempt their rivals [from Yibum should the man die], and he is forbidden [to marry] the second and fourth women, and relations [of the Yavam with] either one does not exempt her rival. And if he had relations with the second one after the death of the first one, he is permitted [to marry] the second and fourth women, and they exempt their rivals; but he is forbidden [to marry] the third and the fifth women and relations [of the Yavam with] either one does not exempt her rival.