The Ritva writes: A yavam acquires his yevamah at the beginning of cohabitation. This is because we have learned that a yavam does not require intent to acquire his wife; even if he would proclaim that he has no intention of acquiring her until the conclusion, he would acquire her at the onset of cohabitation.
The Ritva proves this: The Gemora above (20a) states: If a woman falls for yibum before a Kohen Gadol, she submits to chalitzah and not yibum. The Gemora infers that this halacha is applicable whether she falls for yibum from a state of erusin or nisuin. The Gemora asks: It is understandable why he can’t perform a yibum if she falls for yibum from a state of nisuin; there is a positive commandment to marry a virgin besides for the negative prohibition against marrying a widow. The positive commandment of yibum cannot override both commandments. However, if she falls for yibum from a state of erusin, there is merely a negative prohibition against marrying a widow; why don’t we say that the positive commandment of yibum should override this prohibition and we should permit the Kohen Gadol to perform a yibum? (The Gemora answers that there is a Rabbinical decree prohibiting this.)
The Ritva writes: If a yavam acquires the yevamah only at the conclusion of cohabitation, what is the Gemora’s question? As soon as he begins cohabitation, she has lost her virginity, and she is not considered his wife yet. How would he be permitted to conclude cohabiting; this would be transgressing two prohibitions, and the mitzvah of yibum cannot override two commandments? It is evident that the yavam acquires her at the beginning of cohabitation.
The Avnei Miluim asks the following question: Rav and Shmuel argue concerning an unintentional cohabitation of a yavam; regarding which matters does he acquire the yevamah? The halacha is in accordance to the second version in our Gemora, which states the following: Others say: There is no argument in a case where she fell for yibum from a state of erusin; everyone would agree that she may not eat terumah since she was not able to eat terumah when she was married to the first husband. Accordingly, what did the Ritva gain by stating that a yavam acquires his yevamah by the beginning of cohabitation since we do not require his intention; in a case where she falls for yibum from a state of erusin, an inferior cohabitation does not effect acquisition to render her a nesuah; she is only regarded as an arusah, and that is why she cannot eat terumah. If so, the Ritva’s original question returns; how can the Kohen Gadol perform a yibum on his yevamah from a state of erusin? As soon as he begins cohabitation, she loses her virginity, and he does not acquire her yet; how can he conclude cohabiting when he is transgressing two commandments?