TT #661 · Parashas Ki Seitzei · Seventh Aliyah · Passuk 25:05
When brothers dwell together and one of them dies and has no son, the wife of the dead shall not be outside to a strange man; her husband’s brother shall come upon her and take her to himself as a wife and perform the duty of a husband’s brother for her.
Torah Temimah points to Yevamot 39b / 107b.
TT lemma: יְבָמָהּ יָבֹא עָלֶיהָ.
תַּנְיָא, אַבָּא שָׁאוּל אוֹמֵר: הַכּוֹנֵס אֶת יְבִמְתּוֹ לְשֵׁם נוֹי וּלְשֵׁם אִישׁוּת וּלְשֵׁם דָּבָר אַחֵר כְּאִלּוּ פּוֹגֵעַ בָּעֶרְוָה, וַחֲכָמִים אוֹמְרִים יְבָמָהּ יָבֹא עָלֶיהָ – מִכָּל מָקוֹם.
English: It was taught: Abba Shaul says, One who takes his yevamah for the sake of beauty, or for the sake of marriage, or for some other purpose is as if he has violated an ervah; but the Sages say “her yavam shall come upon her” — in any case.
On the daf / in context: Abba Shaul requires pure intent for the mitzvah of establishing a name; the Sages hold that the act itself fulfills the verse regardless of motive.
Dispute on the necessity of intent (Abba Shaul vs. Sages).
According to the Sages (normative view), yibbum is effective regardless of the yavam’s personal motive.