MAY ONE FULFILL A VOW TO FAST WHEN HE WOULD HAVE FASTED ANYWAY? [fasting: Chiyuvim Min ha'Chulin]
Gemara
(Mishnah): If one said 'Alai Todah', he must bring it from Chulin (i.e. but not from money of Ma'aser Sheni).
82a (Mishnah): We learn from "v'Zavachta Pesach... Tzon u'Vakar";
Objection: Pesach is not brought from cattle, only from flock (sheep or goats)!
Answer: This is extra, to equate (all other) Korbanos, which are brought from flock or cattle, to Pesach. Just like Pesach is a Chovah (obligation), and it is brought only from Chulin, also all Chovos.
Nazir 13b (Mishnah): If one said 'I am a Nazir, and I will be a Nazir when I have a son' and he started observing Nezirus, and had a son, he finishes his Nezirus, then observes the Nezirus he accepted for (the birth of) his son.
If he said 'I will be a Nazir when I have a son, and I am a Nazir', and he began Nezirus, and had a son, he interrupts his Nezirus, observes the Nezirus for his son, then completes his Nezirus.
14a (Beraisa): If one said 'I will be a Nazir after 20 days, and I am a Nazir from now for 100 days', he counts 20 days (of the long Nezirus), then 30 days of Nezirus, then 80 more days.
15a (Mishnah): If one said 'I will be a Nazir when I have a son. I am a Nazir for 100 days', and he had a son within 70 days, he does not lose any of the days counted. (The next 30 days count for both.)
If he had a son after 70 days, he loses (70), since shaving requires 30 days growth of hair.
Rishonim
Tosfos (13b DH Hareini): When the days of Nezirus for his son are contained in the days of his (100 day) Nezirus, the days (of Nezirus for his son) count for both. Even though once his son is born, he must abandon his Nezirus and count Nezirus for his son, which he accepted first, since the days are contained in his Nezirus, they count for both. He finishes the 100 days, shaves for both and brings two sets of Korbanos. Likewise, when he said 'I will be a Nazir when I have a son. 'I am a Nazir', and he started his Nezirus, if he had a son that same day, his Nezirus counts for both, since his son's Nezirus is contained in his own. (Both are 30 days, starting today.) However, if he accepted his 100 day Nezirus first, even if his son was born within 70 days, the Nezirus of his son does not take effect until he finishes his Nezirus.
Shiltei ha'Giborim (Shevu'os 9a): If one accepted to fast 40 consecutive days , and amidst them occurred days that Chachamim obligated us to fast, do those days count towards the 40? Similarly, if one fasted on Shabbos due to a dream, so he must fast (the next day) to atone for fasting on Shabbos, and the next day was an obligatory fast, perhaps he was not Yotzei through this, for in any case he needed to fast. I say thathe was Yotzei. If one said 'I am a Nazir, and I will be a Nazir when I have a son' and he started observing Nezirus, and had a son, he finishes his Nezirus, then observes the Nezirus he accepted for the birth of his son (Nazir 13b). If one said 'I will be a Nazir when I have a son. I am a Nazir for 100 days', and he had a son within 70 days, he does not lose any of the days counted (15a). Tosfos explains that when his son's Nezirus is contained in his own, the days count for both. The same applies here. The fasts count also for his vow (or compensation for fasting on Shabbos), even though in any case he needed to fast. This is only if the fasts are contained in the vow. If one vowed on the 15th of Av to fast 40 days (other than Shabbos and Yom Tov), and every year he fasts the 10 days of Teshuvah , his vow ends during the 10 days of Teshuvah.
Note: One who fasts the 10 days of Teshuvah fasts four days before Rosh Hashanah, to compensate for the four days in the 10 (two days of Rosh Hashanah, Shabbos and Erev Yom Kipur) on which one may not fast.
Shiltei ha'Giborim: Therefore, they do not count towards 40 days. This is like Tosfos, who says that when a son was born after 70 days, since Nezirus for his son is not contained in his Nezirus, even those days contained in his Nezirus do not count towards it. The law is different when he vowed his Nezirus first. Perhaps here also it is different, for the Nezirus mid'Oraisa was an obligation on him first!
Note: Later, Shiltei ha'Giborim says 'mid'Oraisa or mid'Rabanan.' (Perhaps 'mid'Oraisa' connotes only Yom Kipur and the four fasts mentioned in Zecharyah (8:19), but not Ta'anis Esther, Ta'anis Bechoros, Erev Rosh Hashanah...) Perhaps the Hava Amina is because he already observed these fasts in previous years, we should say that the fasts count for both only if his own fasts are contained in the Torah fasts!
Shiltei ha'Giborim: Our case is like when he vowed Nezirus for his son first, and then his Nezirus. When his son's Nezirus comes, you must say that it takes effect on him. Likewise, fasts mid'Oraisa or mid'Rabanan were always obligatory for him. It seems that Nezirus, which requires accepting on oneself, is just like matters that do not require acceptance. The Mordechai said that if an Avel during Shivah lost another relative, he sits another seven days after finishing the first seven. He brought a proof from Nazir.
Maharil (118, cited in Beis Yosef OC 568 DH Kasav): If one vowed to fast a certain number of consecutive days, and a fast for a dream or another obligatory fast came, it counts towards the vow. He merely accepted to pain himself. We find that one fulfills Simchah (eating Kodshim meat on each day of the festival) through Korbanos due to (previous) vows. Even though if not for the vows, he would have had to bring extra Shelamim, he is Yotzei through the vows. Nezirus is different. There, he made two vows.
Poskim
Shulchan Aruch (OC 568:11): If one vowed to fast a specific number of consecutive days, and amidst them was an obligatory fast, it counts towards the vow.
Magen Avraham (22): This is unlike one who said '(Levushei Serad - I am a Nazir.) I will be a Nazir when I have a son.' There, he made two vows, and obligations must come only from Chulin. If so, if one vowed to fast on Monday and Thursday, and then vowed to fast 40 consecutive days, Monday and Thursday do not count towards the 40. Shiltei ha'Giborim says that this is only if Monday and Thursday are not contained in the 40 days. This is difficult, for if one said 'I will be a Nazir after 20 days, and I am a Nazir from now for 100 days', he counts 20 days, then 30 days, and then 80 days. Tosfos (13b DH Oh) says that this is unlike 'I will be a Nazir when a son is born, and I am a Nazir from now for 100 days.' Then, if a son is born within 70 days, he need not fast an extra 30 days for his son, for he intended that 30 days count for both. He did not explicitly accept 70, and also 30 for his son, since he wants to be a Nazir for 100 days even if he will not have a son. Here, had he wanted the 30 days to be included, he should have specified. I apply this to fasting. Had he wanted the 10 days of Teshuvah to be included in the 40 days, he would have vowed 30. Rather, he vowed 40, for he intends for 40 days not including the 10. The Rambam (Hilchos Nezirus 4:3) rules that days do not count for both even when Nezirus for his son is contained in his Nezirus. All the more so, he would be stringent about fasts. However if one vowed on the 15th of Av, surely he intends for the (last) 40 days that Moshe was on Har Sinai. Surely, even if there are many fasts among these days, they count towards the 40. If one said 'I am a Nazir for 30 days. I am Nazir for 40 days', the first 30 are included in the 40, for (he intended for this;) he could not say 'I am a Nazir for 10 days', for Nezirus must be at least 30 days. The Taz (YD 239:12) and Shach (YD 239:30) say that it depends on the intent of the one who vowed. One who normally fasts the 10 days of Teshuvah, and the Yartzite (the day of the year of the death) of his father fell in these days, he need not fast a fifth day before Rosh Hashanah. This is like Tzom Gedalyah and Yom Kipur, which are obligatory, and they count towards the 10 days. However, if the Yartzite fell in the days of Selichos (in which he compensates four fasts) before Rosh Hashanah, the Yartzite is not counted towards the four days, since he did not fix four specific days, unless the Yartzite was the first day of Selichos or Erev Rosh Hashanah, for they are always among the four days. The same applies when Rosh Hashanah is on Thursday, for then there are only four days of Selichos. Similarly, if the Tzibur decreed a fast that week, it counts for him. If the Tzibur decreed that each week in the summer, a quarter of the Tzibur will fast on Monday and Thursday, if an obligatory fast (e.g. Tamuz 17) came on one of these days, those who needed to fast that week must fast another day in place of it, since one must fast for Teshuvah. Even if one normally fasts on Erev Rosh Chodesh, it does not count, for one must pay obligations only from Chulin. However, if one normally fasts Bahab (the Monday, Thursday and Monday after Nisan), surely this counts.
Eliyahu Rabah (11): I saw that many times Erev Rosh Chodesh (fell on Monday or Thursday) during Shovevim Tat (the acronym of the Parshiyos from Shemos until Tetzaveh; some fast on Mondays and Thursdays of these weeks), and no one suggested fasting another day in place of it. It is difficult to distinguish these. I say that the Tzibur intended that obligatory fasts count. The Shulchan Aruch and Levush say that one who vows to fast does so for Teshuvah, and even so obligatory fasts count. If the Tzibur's decree is called a Chiyuv, and Erev Rosh Chodesh is a vow, it should count! This requires investigation.
Kaf ha'Chayim (106): Eshel Avraham says that it all depends on the custom of the Tzibur and the intent of the one who vowed.
Kaf ha'Chayim (107): The Birkei Yosef cites Maharam Provintzal, who says (unlike the Shulchan Aruch) that an obligatory fast does not count towards his vow. I said that we follow the intent of the one who vowed.
Mishnah Berurah (49): If one vowed to fast Monday and Thursday, and afterwards vowed to fast 40 days, Monday and Thursday count towards the 40 only if he says that he intended for this.
Minchas Yitzchak (1:83): The Magen Avraham (568:20) says that if one does not know the Yartzite of a parent, he chooses a day to consider to be the Yartzite, and fasts every year on that day. Teshuras Shai says that if one know his mother's Yartzite, but not his father's, he cannot choose the mother's Yartzite to be also the father's. Since it is considered an obligation nowadays, it must be paid through Chulin (a day on which he had no obligation).