Reference for Yevamot 2:8
מִצְוָה בַגָּדוֹל לְיַבֵּם. וְאִם קָדַם הַקָּטָן, זָכָה. הַנִּטְעָן עַל הַשִּׁפְחָה וְנִשְׁתַּחְרְרָה, אוֹ עַל הַנָּכְרִית וְנִתְגַּיְּרָה, הֲרֵי זֶה לֹא יִכְנוֹס. וְאִם כָּנַס אֵין מוֹצִיאִין מִיָּדוֹ. הַנִּטְעָן עַל אֵשֶׁת אִישׁ, וְהוֹצִיאוּהָ מִתַּחַת יָדוֹ, אַף עַל פִּי שֶׁכָּנַס, יוֹצִיא:
It is a mitzvah for the elder brother to perform the yibum. [For we expound the verse (Deuteronomy 25:5): "And he shall take her as a wife in yibum (6): and it shall be the first-born" (He who performs the yibum shall be the first-born) "that she bears" (That yevamah must be capable of bearing — to exclude an eilonith) "shall be invested" (The first-born, the yavam, shall be invested) "in the name of his dead brother" (to inherit him, his other brothers not sharing with him)]. And if the younger were beforehand (to take her in yibum), he acquires her. If one were suspected of (relations with) a bondswoman, and she were freed, or with a gentile woman, and she became a proselyte, he may not marry her. If he did, she is not taken from him. If one were suspected of (relations with) a married woman, and they (beth-din) took her from him [her husband, because of this one, who caused her to be forbidden to him, and this one went and married her], even though he married her, he must send her away. [For the Torah forbids her also to him, just as she is forbidden to her husband, it being expounded (Numbers 5:13 and 14): "she be unclean," twice — once, vis-à-vis the husband; once, vis-à-vis the adulterer. And this applies only to one who is suspected of adultery; but if one is suspected of relations with an unmarried woman, it would seem that it is a mitzvah for him to marry her, as we find in respect to one who forces a virgin (Deuteronomy 22:29): "And to him shall she be as a wife."]