1) RETROACTIVE REMOVAL OF "ZIKAH"
The Gemara records a dispute with regard to whether "Yesh Zikah" or "Ein Zikah" -- is the bond of Zikah between the Yevamah and the Yavam comparable to the bond of marriage? Rav Huna in the name of Rav maintains "Ein Zikah," and Rav Yehudah maintains "Yesh Zikah."
The Gemara points out that Rav Yehudah does not explicitly state "Yesh Zikah." Rather, his opinion is inferred from another Halachic ruling. Rav Yehudah rules that if a Yevamah dies before she does Yibum, the Yavam is forbidden to marry her mother. The reasoning behind this ruling is "Yesh Zikah" -- a bond of Zikah linked the Yavam to the Yevamah, and just as one may not marry the mother of his wife, he may not marry the mother of his Yevamah. The Gemara explains that the reason why Rav Yehudah did not explicitly say "Yesh Zikah" is that had he said "Yesh Zikah" one might have assumed that there is Zikah only when both the Yevamah and Yavam are alive (and only when the Yevamah is alive is the Yavam forbidden to marry her mother), but after the Yevamah dies there is no Zikah and the Yavam may marry her mother. One might have thought that after the Yevamah's death, any bond of Zikah is removed retroactively, since the Yavam no longer can do Yibum or Chalitzah with her. Rav Yehudah teaches that the bond of Zikah remains and is not removed at all (and certainly not retroactively).
The Acharonim point out that although the Gemara rejects the possibility that the Zikah is uprooted retroactively, it is not such a remote possibility (as is implied by Tosfos 17b, DH Aval). The Gemara discusses certain cases in which the Zikah is uprooted retroactively, while in other cases it seems to be a subject of debate among the Amora'im. (See OR SAME'ACH in Kuntrus Zikah, and YASHRESH YAKOV.)
(a) RASHI (17b, DH v'Leima) explains that if a man dies childless and his wife falls to his two brothers for Yibum, and one of the brothers betroths (with Kidushin) the sister of the Yevamah (thereby rendering the Yevamah an Ervah of "Achos Ishto" to him), Beis Din tells that brother to delay doing Nisu'in with the sister because she is "Achos Zekukaso," the sister of the woman who has a bond of Zikah with him and is thus prohibited to him mid'Rabanan. Rather, he should wait until the other brother does Yibum (or Chalitzah), at which time "the Zikah is removed" (as Rashi writes) and the first brother may fully marry the Yevamah's sister. The Gemara (18b) explains that this ruling follows the opinion of Rav Yehudah that "Yesh Zikah," and that is why the sister of the Yevamah ("Achos Zekukaso") is prohibited to the brother.
This explanation is problematic. The Gemara teaches that even after the Yevamah dies, the Yavam remains forbidden to her mother because the Zikah does not fall away. Likewise, in the case which Rashi discusses, even after the other brother does Yibum (or Chalitzah), the first brother should remain prohibited to the sister of the Yevamah, just as one is prohibited to the sister of a woman he divorced.
It is clear that doing Yibum removes the Zikah retroactively from the other brothers (and from the Tzaros as well). When the Gemara earlier (10b) says that according to Rebbi Yochanan, the brother who does Yibum (or Chalitzah) acts as the Shali'ach on behalf of all the brothers, that does not mean that it is considered as though the other brothers actually perform the Yibum. Rather, the brother who does Yibum does it for himself, but his act removes the Zikah from the other brothers -- and from the Tzaros of the Yevamah -- even retroactively.
When the Gemara here says that Zikah is not removed retroactively, it means that only Yibum or Chalitzah removes the Zikah retroactively from the other brothers and the other Tzaros, but not death. The death of the Yevamah or the Yavam cannot remove the Zikah retroactively.
(b) According to the RASHBA, all of the questions which the Gemara (18a) asks -- when it challenges the view of Rav Yehudah that a brother is forbidden to marry the mother of a Yevamah after the Yevamah dies -- are not intended to prove that Rav Yehudah is incorrect and that "Ein Zikah." Rather, the Gemara agrees that "Yesh Zikah," but it seeks to prove that Zikah is retroactively removed when the Yavam or Yevamah dies.
If the Zikah is removed retroactively, then the Mishnah earlier (17a) is easy to understand. The Gemara questions the opinion that "Yesh Zikah" from the end of the Mishnah. The Mishnah implies that if Levi is born before Shimon does Yibum, and Shimon dies without doing Yibum, Levi must do Yibum or Chalitzah with Shimon's wife.
The Gemara asks, why is Shimon's wife not considered a "Tzaras Ervah b'Zikah" (the Tzarah of a woman who is an Ervah through Zikah), since the wife of Reuven who was forbidden to Levi (because of "Eshes Achiv she'Lo Hayah b'Olamo") was Zekukah to Shimon? The Gemara attempts to prove with this question that the Zikah is removed retroactively when Shimon dies. If the Zikah was removed retroactively, then Shimon's wife was not a "Tzaras Ervah b'Zikah" since there was no Zikah, as it was removed retroactively when Shimon died.
Similarly, the Gemara asks a contradiction in the opinion of Rebbi Meir. In one case, Rebbi Meir says that if Levi was born before Shimon died and then Shimon died without doing Yibum with Reuven's wife, Levi is allowed to do Yibum with Shimon's wife. This means that Shimon's wife is not considered a "Tzaras Ervah b'Zikah" to Levi; the Zikah (of Reuven's wife to Shimon) does not make her a Tzarah of Shimon's wife. In another case, however, Rebbi Meir says that when two sisters fall to Yibum from two different brothers, the brothers must do Chalitzah and are not allowed to do Yibum. This ruling implies that each woman is considered "Achos Zekukaso" and is prohibited to each brother, and that is why neither one may do Yibum.
The Rashba explains that here, too, the Gemara seeks to prove that Zikah is retroactively removed when the Yavam dies. That is why in the first case, when the Yavam (Shimon) died, there was no Zikah and Shimon's wife was not a "Tzaras Ervah" through Zikah. In contrast, in the second case none of the Yevamim died, and since Chalitzah or Yibum will be done the Zikah remains in force and the two sisters are prohibited to the brothers because of "Achos Zekukaso" and, therefore, they must do Chalitzah.
(c) Although the Gemara answers its questions (18a) and rejects the proofs that Zikah is removed retroactively, the OR SAME'ACH (ibid.) demonstrates at length that the Yerushalmi in numerous places maintains that the initial suggestion of the Gemara here -- that Zikah is removed retroactively even by the death of the Yevamah or Yavam -- is true. The Yerushalmi maintains contrary to the Bavli that Zikah is removed retroactively after the death of the Yavam or Yevamah.
RAV MEIR ARIK (in TAL TORAH, Yerushalmi Yevamos 1:1, 3b) offers a beautiful explanation for the Yerushalmi in Kidushin (3:5, 31b) based on the Yerushalmi here. The Mishnah there (see Kidushin 62a, Yevamos 92b) states that if a man says to a married woman, "I hereby betroth you to me from after your husband dies" or "from after your Yavam does Chalitzah with you," the Kidushin does not take effect; a man cannot make Kidushin take effect at a future time with a "Davar she'Lo Ba l'Olam." The woman cannot be betrothed now because she is presently married, or Zekukah, to another man.
The Gemara in the Yerushalmi explains that the Mishnah mentions specifically that the man says to the woman, "after your Yavam does Chalitzah with you," and not, "after your Yavam dies," because in the latter case the Kidushin would take effect after the Yavam dies (since it was possible for the Kidushin to take effect even before he dies).
What is the difference between after the Yavam does Chalitzah and after the Yavam dies? In both cases, the woman at the time of the Kidushin is a "Davar she'Lo Ba l'Olam" and Kidushin cannot take effect with her (as the Bavli indeed says in both cases).
The answer is that the Yerushalmi maintains that the Zikah is removed retroactively when the Yavam dies. When the Yavam dies and the Zikah falls away retroactively, it becomes known that the Yevamah was able to marry someone else from the time that her original husband died, even though she did not know it at the time. Consequently, she was not a "Davar she'Lo Ba l'Olam" and Kidushin was able to take effect. In contrast, when the Yavam performs Chalitzah the Zikah is not removed retroactively, and thus Kidushin cannot take effect until after the Chalitzah. (This approach also demonstrates that the Zikah is removed retroactively not only with regard to the bond between the Yevamah and the Yavam, but it is removed even with regard to the Yevamah's prohibition to marry someone else.)