MISTAKEN HAFARAH [Hafarah: mistaken]
Gemara
(Mishnah): In the following cases, a man can go back and annul a vow after he learns of his mistake. (If he already affirmed or annulled it, this was invalid):
His wife vowed, and he thought that his daughter vowed, or vice-versa;
She vowed to bring a Korban, and he thought that she vowed to be a Nezirah, or vice-versa;
She vowed from figs, and he thought that she vowed from grapes, or vice-versa.
Question: We must say that "he will annul her" requires that he know whose vow he annuls. If so, we should similarly learn from "(David tore his clothing) for Sha'ul and for Yonason" that one must know for whom he tears. This is not true!
(Beraisa #1): If they told a man that his father died, and he tore, and later he learned that rather his son died, he was Yotzei (the Mitzvah to tear).
Answer: In the Beraisa, the man was told only that a relative died. He thought that it was his father, but he did not say that he tears for his father;
Hafarah is invalid when he specified (that he annuls his wife's vow, and really, his daughter's vowed, or vice-versa).
Support (Beraisa #2): If they told a man that his father died, and he tore, and later he learned that it was his son who died, he was not Yotzei;
If they told him that a relative died, and he thought that it was his father, and he tore, and later he learned that it was his son who died, he was Yotzei.
(The Reisha contradicts Beraisa #1. We must answer like above (b), that Beraisa #1 is imprecise. Really, the case is like the Seifa of Beraisa #2.)
Rejection (Rav Ashi): If he learned of his mistake Toch Kedei Dibur (within the time needed to say three or four words), he was Yotzei. If he learned after this, he was not Yotzei.
In Beraisa #2, he found out after Toch Kedei Dibur. In Beraisa #1, he found out within Toch Kedei Dibur.
Support (Beraisa #3): If a sick person (Levi) fainted and it appeared as though he died, and Yakov tore, and afterwards Levi really died, Yakov was not Yotzei.
(R. Shimon ben Pazi): Yakov was Yotzei only if Levi died Toch Kedei Dibur of Kri'ah (tearing).
Rishonim
The Rif brings the Gemara verbatim.
Rosh (Nedarim 11:2): The Mishnah discusses when he found out after Kedei Dibur. If he found out Toch Kedei Dibur and wanted to annul the actual vow, his first Hafarah worked. If they told a man that a woman in his house vowed, and he thought that it was his wife and annulled it, and he found out that it was his daughter, even if he found out after Kedei Dibur, it is annulled, on condition that he desires to annul it.
Rambam (Hilchos Nedarim 12:21): If Levi's wife vowed, and he thought that his daughter vowed, and he annulled with this intent, he must annul again after he learns of his mistake. The same applies if she vowed to be a Nezirah, and he thought that she vowed to bring a Korban, or she vowed from figs, and he thought that she vowed from grapes. "He did not annul her" requires intent for the Noderes. "Her father heard her vow" requires that he know which vow she took.
Beis Yosef (YD 234 DH u'Mihu): The Rambam did not discuss when he found out Toch Kedei Dibur, or Hafarah Stam for whoever vowed. He holds that Rav Ashi argues with the first answer. Vows are mid'Oraisa, so he is stringent and does not rely on either opinion. Why didn't he rule like Rav Ashi, who is Basra? Perhaps since the Stam Gemara gave the other answer, we do not rule like Rav Ashi against it.
Rebuttal (Ritz (in Shitah Mekubetzes 87a DH Kan) and Lechem Mishneh): The Rambam rules like Rav Ashi. He already said (Shevu'os 2:17-19) that one can retract Toch Kedei Dibur; the same applies everywhere. He did not mention this here, because the Gemara did not explain the Mishnah this way.
R. Avraham Min ha'Har and Keren Orah (87a DH Rav and veha'Rambam): The Rambam explains that surely, Toch Kedei Dibur does not help for Hafarah. "V'Shoma Aviha Es Nidrah" and "he will annul her" mandate knowing the true Neder when annulling. Rav Ashi merely resolved the Beraisos regarding Kri'ah. This is also the Rif's opinion.
Shalmei Nedarim (87a DH veha'Rambam): The Rambam rules that Toch Kedei Dibur does not help for Kodshim. Binyan Yechezkeil says that the Rambam equates Nedarim to Kodshim. This is wrong. Toch Kedei Dibur does not help for Kodshim because it is as if it was handed over to the receiver. Nedarim are like Shevu'os, in which Toch Kedei Dibur helps!
Rambam (ibid.): He can annul the entire day that he found out.
Beis Yosef (YD 234 DH u'Mihu): This is obvious, because the first time he did not really hear the vow.
Gra (YD 234:75): The Tosefta (7:6) says that even Kiyum with intent for the other woman is invalid, all the more so silence does not affirm.
Poskim
Shulchan Aruch (YD 234:31): One must intend for the woman and the vow he annuls. If his wife vowed, and he thought that his daughter vowed (Rema - because this is what he was told), or vice-versa, and he annulled with this intent, it is not annulled unless he found out Toch Kedei Dibur and desired to annul the actual vow.
Shach (47): The Rema adds 'because this is what he was told' to distinguish from Sa'if 33, in which he was not told who vowed, and it was not the one whom he thought. The Bach is stringent, and disqualifies Hafarah when he intended for the wrong woman. One should be stringent about an Isur mid'Oraisa, especially since the Rambam, Ramban and Tur all consider Stam like explicit.
Question (Taz 31): Rashi and Tosfos explain that Stam is without knowing who vowed. The Ran and Rosh say that it is with intent for the wrong woman, but without saying for whom he intends. The Tur holds like Rashi and Tosfos here and regarding Kri'ah. Why did he rule against his father?
Answer (Taz): The Rosh holds that Rav Ashi argues with the first answer. The Tur explains that he argues when the man intended for the wrong woman. Presumably, Rav Ashi agrees that Hafarah without specific intent helps. However, it seems that the Rema holds like the Rosh (that it depends on what he said), unlike the Tur. He learned from the Shulchan Aruch's ruling regarding Kri'ah (340:24). Perhaps we can distinguish. We are more stringent about vows, which are mid'Oraisa, and disqualify even due to wrong intent. We are lenient about Kri'ah, which is mid'Rabanan.
Shulchan Aruch (ibid.): The same applies if she vowed from figs, and he thought that she vowed from grapes (Rema - because this is what he was told), or vice-versa.
Question (Prishah 48): Obviously, this is not Hafarah. One must detail the vow! It is difficult to say that b'Di'eved, it is annulled!
Answer #1 (Prishah): One must detail the vow only because we are concerned lest it was to refrain from Isur. This is not a concern if he did not know whether she vowed from figs or grapes.
Rebuttal (and Answer #2 - Shach 48): When one must detail the vow, it does not suffice to say that in any case it was not to refrain from Isur! Rather, one must detail the Neder only for Hataras Chacham, but not for Hafarah. A husband can annul even vows to refrain from Isur.
Shulchan Aruch (32): When he found out (the second time) after Kedei Dibur and it is not annulled, he can annul the entire day he found out. If he affirmed the first time he heard, it is not affirmed. He can annul when he hears (the true vow) the second time.
Source: Tosefta (7:6), brought in Ran (86b DH Harei).
Shulchan Aruch (33): If they told a man that a woman in his house vowed, and he thought that it was his wife and annulled it, and he found out that it was his daughter, even if he found out after Kedei Dibur, it is annulled, on condition that he desires to annul it.
Beis Yosef (DH u'Mah she'Chosav Od): Even though Rav Ashi gave a different answer, the Ran says that he does not disagree with the first answer.