A VOW TO FAST THAT WAS NOT FULFILLED [Nedarim: fasting]
Gemara
Question (Rava): Why does the Torah call a Neder (a vow to bring a Korban with Acharayus, i.e. if the animal becomes lost or disqualified, he must bring another) 'Nedavah' (a Korban without Acharayus)?
Answer: If you did like your Neder (i.e. the Korban was offered Lishmah), it is a Neder (you fulfilled your vow). If not, it is only a Nedavah.
Berachos 14a - Question (Ashi'an): If one is fasting, may he taste (food, to see if it needs seasoning)?
Perhaps he accepted only not to eat or drink. Tasting is not considered eating;
Or, perhaps he forbade himself to benefit from food. Tasting is benefit!
Answer (R. Ami): He may taste.
Support (Beraisa): One who tastes does not bless. One who is fasting may taste.
Question: Up to how much is considered tasting?
Answer: R. Ami and R. Asi would taste up to a Revi'is.
Ta'anis 12b (Rav): One may borrow a fast and repay it.
Version #1 - Shmuel: He did not accept a vow, that he must pay it in any case! He merely accepted to pain himself, if he can. If he cannot, he cannot!
Version #2 - Shmuel: This is obvious! It is no more than a vow. If one cannot pay a vow now, he pays it later, when he can!
Rishonim
Rif (Ta'anis 4a): Rabanan say that one who tastes on a fast must be careful not to swallow. The Yerushalmi says that if one vowed to fast, and he forgot and ate, he lost his fast. This is if he said Stam 'I will fast a day.' He fasts another day to fulfill his vow, since he forgot and ate on this day. Had he said '(I will fast) this day', he completes the fast. This is only if he swallowed, but not if he merely tasted. This is even when he said Stam 'a day.' He completes the fast.
Ran (DH Yerushalmi): The Ro'oh says that he lost his fast if he ate (the volume of) a date, for this is the Shi'ur of eating on a fast (to nullify it). He learns from Yom Kipur.
Ran (DH v'Yesh): If one already said 'Aneinu' in Shemoneh Esre, how can he eat and falsify his prayer? Since wehen he said it he intended to finish his fast, we are not concerned. We find that if people were fasting for rain, and rain fell before midday, they do not complete the fast, even though they said the Tefilah for a fast (Ta'anis 19a).
Rambam (Hilchos Ta'anis 1:14): Anyone fasting may taste food, even up to a Revi'is, as long as he does not swallow. He tastes and spits it out. If he forgot and ate, he completes his fast.
Rambam (Hilchos Nedarim 4:16): If one vowed to fast today, and he forgot and ate, he completes his fast. If he vowed to fast a day or two, and after beginning to fast he forgot and ate, he lost his fast and he must fast another day.
Rosh (Ta'anis 1:16, citing R. Chananel): The Heter to borrow a fast and repay is when there is pain of Ones. We learn from Shmuel, who says that he accepted pain, if he can pain himself. My Rebbeyim would get three men to permit a vow to fast. Since he said 'I am in a fast', this is like a vow. It seems that since he must pay, the vow was not Batel. Rather, we estimate that he intended to fast one day, but not to fix this day for an obligation. The Yerushalmi proves this. It derives that one may fast for hours, for Rav taught that one may borrow a fast and pay it. The Bavli says that a fast that is not until night is not a fast. We must say that it is called a fast in this respect, that he need not permit his vow; fasting part of the day is called a fast. The Yerushalmi connotes that this is if he said Stam '(I will fast a) day', but not if he said '(I will fast) this day.' It seems that one who forgot and ate lost his fast, i.e. if he said Stam, but if he said 'this day', he completes the fast. When he said Stam, he lost his fast because he can borrow and pay another day. One cannot borrow and pay if he said 'this day', therefore, he completes the fast even if he ate a k'Zayis. The Bavli disagrees, for Shmuel said that it is not a vow that he must finish the fast. He merely accepted to pain himself. We understand this if he said 'this day.' Therefore, he need not repay it. If he said 'a day', if he cannot fast now, why shouldn't he repay it when he is healthy and he can fast?!
Rosh: We can explain that the Yerushalmi distinguishes when he said 'this day', i.e. a day that he normally fasts, e.g. the day that his father or Rebbi died. Stam is when he accepted the previous day at Minchah to fast. This does not make it called 'this day.' This is a simple vow, which he can pay another day. The Rif did not bring the first version of Shmuel, for in any case the Halachah follows Rav in Isurim.
Poskim
Shulchan Aruch (OC 568:1): If one vowed to fast today, and he forgot and ate, he completes his fast.
Magen Avraham (1): Even if he was Mezid and ate much, he completes the fast.
Mishnah Berurah (2): This is when he accepted yesterday at Minchah that he will fast today.
Shulchan Aruch (ibid.): The same applies if it was a day on which he normally fasts, e.g. the day that his father or Rebbi died.
Kaf ha'Chayim (9): The Shlah says that it is a good custom to fast on the day that one's primary Rebbi died, for one must honor and fear his Rebbi more than his father. Eliyahu Rabah questions this, for the fast on a father's Yartzite is not due to honor, rather, because the son's Mazel is bad on that day.
Shulchan Aruch (ibid.): However, if he vowed to fast one or two days, and after beginning the fast he forgot and ate a k'Zayis, he lost his fast and he must fast another day.
Beis Yosef (DH Nadar): The Rosh's text says 'if he forgot and ate a k'Zayis, he lost his fast.' Hagahos Maimoniyos says that if one forgot and ate, he completes his fast, i.e. if he wants. The Rashba (1:246) said similarly in the name of the Ra'avad, who said that one may borrow a fast even if he said 'this day.' He was asked why the Yerushalmi says that if he said 'this day', he completes the fast. He answered that this is not obligatory. (He may complete the fast, or borrow and repay.) Terumas ha'Deshen (156) says that if one forgot and ate more than a k'Zayis on the 17th of Tamuz, he does not fast another day. Even though meticulous people do fast another day in a case of 'this day', i.e. he said 'I am in a fast tomorrow', they do not need to. Or Zaru'a said that they can complete the fast and not repay, or borrow and repay. Meticulous people do both. They complete the fast due to their acceptance, and they repay due to their vow. It is not clear if the Rosh is like the Or Zaru'a. On a Ta'anis Tzibur that Chachamim decreed, it is obligatory to fast. If one forgot and ate, he is forced to finish the fast, for mid'Rabanan one may not eat today. He need not fast another day, for Chachamim forbade only this day. He cannot fix what he made crooked. However, he may fast to atone for his mistake.
Bach (1): This refers to one who eats (swallows). The Yerushalmi says that tasting does not annul the fast, i.e. up to a Revi'is, and he spits out the food. If he swallows, this is eating!
Kaf ha'Chayim (11): Ma'amar Mordechai disagrees, and says that 'tasting' is eating less than a k'Zayis.
Magen Avraham (2): The Shi'ur for drinking is Malei Lugmav (the amount that one can hold in his mouth when one cheek sticks out), like for Yom Kipur. The Ran totally equates this to Yom Kipur, and says that the Shi'ur for eating is a date.
Mishnah Berurah (5): Even though l'Chatchilah one may not eat even any amount, b'Di'eved he completes the fast and need not fast another day. He may not eat more today, since he accepted the fast yesterday. The same applies if he ate a k'Zayis but not at once, i.e. he delayed in the middle more than Kdei Achilas Pras (the time to eat half a loaf). This is like eating less than a k'Zayis. He does not lose his fast. B'Di'eved, less than Malei Lugmav is not called drinking.
Kaf ha'Chayim (16): Nechpah va'Kesef says that if one blessed on a food and then remembered that it is a fast, he should eat less than a k'Zayis to avoid a Berachah l'Vatalah, and he fulfills the fast. Birkei Yosef and Sha'arei Teshuvah agreed. Admas Kodesh and Mateh Yehudah disagreed; Aruch ha'Shulchan adds that the Ritva and Rivash forbid a Chetzi Shi'ur. Some say that one should not be concerned for the Berachah l'Vatalah; he says Baruch Shem Kevod Malchuso l'Olam Va'ed.
Kaf ha'Chayim (18): If one was eating and they told him that dawn came, he must spit out the food.
Note: perhaps this applies every day, for one may not eat before praying.
Rema: Some are stringent even about a vow to fast this day, in which he must complete the fast, that he must compensate and fast another day.
Magen Avraham (4): They are stringent because (one opinion says that he cannot borrow and repay, rather, he must complete the fast. Others say that) even when he said 'this day', he may borrow and repay. Therefore, when he ate he lost his fast and he must fast another day. Regarding a fixed fast, e.g. the 17th of Tamuz, it is forbidden to eat, so one need not fast another day, unless he wants to atone for his mistake. Once, someone ate on Asarah b'Teves, and Maharil commanded that he fast Monday, Thursday and Monday.
Mishnah Berurah (8): Beis Meir concludes that this is only if he said 'I will fast tomorrow', but if he vowed to fast a particular day and forgot and ate, all agree that he must complete the fast and he need not fast another day, unless he wants to atone for his error. The same applies to a Ta'anis Chalom or Yartzite, and all the more so to the four fixed fasts that Chachamim enacted.
Aruch ha'Shulchan (3): If one ate b'Mezid on a fast day, he should fast another day to atone for this. He need not do so if he was Shogeg.