Daf 35b
The gemara discusses the case of a yavam who performs chalitzah with a yevamah who is pregnant but subsequently miscarries.
R. Yochanan said that she does not require chalitzah from the brothers after she miscarries. Reish Lakish said that she does require chalitzah from the brothers. R. Yochanan said she does not require chalitzah from the brothers, because chalitzah performed with a pregnant yevamah is called a valid chaliztah, and relations with a pregnant yevamah is called valid relations. And Reish Lakish said that she does require chalitzah from the brothers, because chalitzah performed with a pregnant yevamah is not called a valid chalitzah, and relations with a pregnant yevamah is not called valid relations.
The first thing to note is R. Yochanan's statement that she does not require chalitzah from the brothers. Why did he not state simply that she does not require chalitzah? Rashi answers this by explaining that the chalitzah that was performed was an excellent chalitzah. Rashi means that not only is the chalitzah valid in that it is good enough to break the bond of yibum between the yevamah and the brother who performed the chalitzah, but it is also good enough to break her bond with all the other brothers, and she is completely free to remarry.
But since Rashi explained that these words were used with purposeful intent, how then are we to explain what Reish Lakish means when he said that she does require chalitzah from the brothers, which seems to imply that she requires chalitzah from one of the other brothers, but that the first chalitzah was good enough to break the bond of yibum with the brother who performed it. Tosafos answers that in the case of Reish Lakish these words "from the brothers"were not stated purposefully, and that also the bond of yibum with the first brother has not been broken.
Tosafos then suggests an alternative explanation from that of Rashi, and explains that the phrase "from the brothers", both in the case of R. Yochanan and Reish Lakish, means from the brothers of the dead husband. In other words, it means "from any of the brothers". The Vilna Gaon brings a support for this explanation from the Mishnah on 79b, which talks about "a barren woman to whom the brothers performed chalitzah", which clearly means any of the dead husband's brothers.
The second thing to note, is that both of them mention the law of one who has relations with a pregnant yevamah, which is not relevant here. The answer to this is that the dispute about chalitzah with a pregnant yevamah did not originate with R. Yochanan and Reish Lakish, but rather it was an old, unresolved dispute, which concerned both chalitzah and relations with a pregnant yevamah. And now, when these two Amoraim are coming to state their opinion about the need for performing chalitzah again after a miscarriage, based upon logic and posukim as the gemara goes on to explain, they quote in full the side of the dispute which their opinion must be following.
The gemara continues by bringing the logic upon which these Amoraim based their opinions. R. Yochanan argued that if Eliyohu Hanovi would come at the time of the chalitzah and tell us that she will surely miscarry, would she not be suitable for chalitzah? Therefore, now also, when we see that she has miscarried, the matter is revealed rectroactively. But Reish Lakish disagrees, and said that we don't say that the matter is revealed rectroactively.
Notice that R. Yochanan did not say simply that when we see that she has miscarried, the matter is revealed retroactively, but rather the argument is based upon the possibility that we could know at the time of the chalitzah that she is suitable for chalitzah, this knowledge being provided by Eliyohu Hanovi. Therefore, when we see that she has miscarried, the matter is revealed retroactively that if Eliyohu Hanovi would have come at the time of the chalitzah, he would have told us that she will surely miscarry and thus was suitable for chalitzah.
Notice also that Reish Lakish does not disagree with the first part of R. Yochanan's argument, that if Eliyohu Hanovi would come at the time of the chalitzah and tell us that she will surely miscarry, then she would be suitable for chalitzah. His only disagreement is whether we say retroactively that Eliyohu Hanovi would have told us this.
Their dispute hinges upon the question of whether the foetus has the status of a child or not. If it has, then the dead husband is not at that point childless, and so she is not suitable for chalitzah. There are three possible scenarios to which this question applies, and the dispute of our gemara is only about the third scenario.
The first scenario is an imaginary one, in which there are no prophets who could possibly come and tell us the fate of this foetus. In such a case everyone would agree that the foetus has the status of a child until she miscarries, and so she was not suitable for chalitzah. It does not help when we see later that she miscarries, because this does nothing to change the status of the foetus at the time of chalitzah.
The second scenario is where Eliyohu Hanovi actually comes and tells us at the time of chalitzah that she will definitely miscarry. Here, everyone agrees that the foetus at that point already does not have the status of a child, and thus she is suitable for chalitzah.
The third scenario is where we see later that she miscarries. Here, R. Yochanan says that this reveals to us that we could have been informed of this at the time of the chalitzah by Eliyohu Hanovi, and so the foetus already did not have the status of a child at that time. But Reish Lakish disagrees, and says that since we did not actually know at that time that she would miscarry, then this foetus already gained the status of a child, and our subsequent knowledge cannot change this status retroactively.
The gemara continues by bringing the posukim upon which they based their opinion. The posuk concerning yibum and chalitzah says that when a man with a brother dies ובן אין לו (and he does not have a child), then in order to remarry his wife must do chalitzah with the surviving brother(s). R. Yochanan held that the Torah says quite simply that the requirement for chalitzah is when he does not have a child, and behold, he doesn't, and so she was always suitable for chalitzah. But Reish Lakish held that we have to take account of the exposition of the posuk, which the gemara brought on daf 22b, ובן אין לו - עיין עליו, investigate him, and since at the time of chalitzah she was pregnant with a possibly viable foetus, he was not at the point without a child, and so she was not suitable for chalitzah. (I must point out that my understanding and thus my explanation of this last part of the gemara is currently very inadequate).