A DOUGH KNEADED BEFORE YOM TOV
Rabah: If one kneaded a dough before Yom Tov, he may separate the Chalah on Yom Tov.
Shmuel's father: Even if he kneaded a dough before Yom Tov, he may not separate the Chalah on Yom Tov.
Suggestion: Shmuel argues with his father, for Shmuel taught that in Chutz la'Aretz one may eat bread and afterwards separate Chalah. (Since he could eat before Hafrashah, it should be permitted to separate!)
Rejection (Rava): Shmuel agrees that once one called it Chalah it is forbidden to Zarim (therefore it may not be separated on Yom Tov, just like Terumah and Ma'aser).
36b - Mishnah: We do not separate Terumah or Ma'aser on Yom Tov, all the more so on Shabbos.
37a -Question: This is obvious!
Answer (Rav Yosef's Beraisa): It is forbidden even in order to give them to a Kohen that day.
This is only if they were Tevel from the day before. If they became Tevel today, e.g. a dough was kneaded on Yom Tov, we may separate Chalah and give it to a Kohen.
Rif: The Halachah follows Shmuel's father, because we learned in the last Perek that one may not separate Terumah or Ma'aser on Yom Tov, even to give them to a Kohen that same day. This is only if they were Tevel from the day before. If they became Tevel today, e.g. if a dough was kneaded today, we may separate Chalah and give it to a Kohen.
Rebuttal #1 (Ba'al ha'Ma'or): The last Perek shows that the Halachah follows Rabah! It permits Hafrashah of something that became Tevel today, e.g. a dough kneaded today in Eretz Yisrael. The Halachah follows Shmuel, that in Chutz la'Aretz one may eat before Hafrashah, therefore kneading does not make proper Tevel. Therefore, even if it was kneaded before Yom Tov one may separate on Yom Tov. Since it is not Tevel, it does not look like Metaken.
Rebuttal #2 (Rosh 1:13): Rabah permits because one may eat Terumah of Chutz la'Aretz before Hafrashah, therefore it does not look like Tikun. Shmuel's father disagrees because it becomes forbidden to Zarim. Rabah agrees about Terumah of Eretz Yisrael, since one may not eat it before Hafrashah. If so, we cannot learn from the last Perek, for it explains the Mishnah, which discusses Eretz Yisrael!
Defense #1 (Milchamos Hash-m): Rabah and Shmuel did not mention Chutz la'Aretz. This implies that they argue even about Chalah of Eretz Yisrael. Also, if they argued only about in Chutz la'Aretz, the Gemara would have said that Tana'im already argued about it! R. Yehudah permits Ha'alas Meduma (when Chulin fell into Terumah, we separate from the mixture and consider it to be Terumah and permit the rest) because one may eat it without physical separation. (It suffices to mentally decide where the Terumah will be.) Nevertheless, Chachamim forbid. It appears that even R. Yehudah permits only regarding Meduma, for it was originally Terumah and he calls it Terumah. He agrees that one may not separate Chalah, for it was originally Chulin. Surely, Rabah agrees that we may not separate Terumah and Ma'aser from sheaves, even though it is not Tevel (until Miru'ach)! If Rabah permits because it is not proper Tevel, he should teach his Heter regarding Terumah and Ma'aser of Chutz la'Aretz! Rather, he permits even in Eretz Yisrael, but only regarding Chalah. Because the majority was kneaded today, even what was kneaded yesterday is permitted. For the sake of Simchas Yom Tov, Chachamim did not distinguish.
Rebuttal #3 (Tosfos DH Gilgel and Hagahos Ashri 1:11): Rabah permits when (only) Gilgul (partial kneading) was done before Yom Tov. Since the kneading is finished on Yom Tov, it is as if it was entirely kneaded on Yom Tov. Rabah agrees that if Lishah (full kneading) was done before Yom Tov, one may not separate Chalah on Yom Tov. A Tosefta (1:11) teaches that if one did Lishah before Yom Tov, he may not separate Chalah on Yom Tov. If only Gilgul was done, it is permitted.
Defense (against all rebuttals - Hasagos ha'Ra'avad): Rava is Basra and he answers for Shmuel's father. This shows that the Halachah follows Shmuel's father.
Note: The Ra'avad's defense does not help according to the text of Rishonim who cite the first opinion in the name of Rava.
Rambam (Hilchos Yom Tov 3:8): If one kneaded a dough before Yom Tov, he may not separate the Chalah on Yom Tov. If he kneaded on Yom Tov, he may separate the Chalah on Yom Tov and give it to a Kohen.
Hagahos Maimoniyos (5): Ra'avan permits even regarding a dough kneaded before Yom Tov, because Rava (the first opinion) is Basra. Also, the Halachah follows Beis Hillel, who are lenient for Simchas Yom Tov. If we do not permit Hafrashah, he will not eat. All permit eating before Hafrashah, like Shmuel.
Rosh (ibid.): R. Chananel and R. Baruch rule like Rabah, for he is Basra. Some texts attribute the first opinion to Rav (instead of Rabah). This explains why his opinion precedes that of Shmuel's father. R. Chaim says in the name of Rashi that eating and leaving over the Chalah is like Hafrashah, and it is forbidden. Rashi explains that Shmuel permits to eat everything except for the Shi'ur needed for Chalah. This is difficult. If so, Shmuel should have specified! Rather, he must leave over more than the Shi'ur, so later he can separate Chalah in a way that the Shirayim (remainder) are visible. A Mishnah teaches that one cannot make the entire harvest or dough Terumah or Chalah.
Shulchan Aruch (OC 506:3): One may not separate Chalah from a dough kneaded before Yom Tov.
Mishnah Berurah (19): This is only if the kneading was finished before Yom Tov. Before this, Chalah need not be separated.
Mishnah Berurah (20): This is even if he forgot to separate before Yom Tov, even in Chutz la'Aretz. If he separated b'Mezid on Yom Tov, it is forbidden until Motza'ei Yom Tov.
Kaf ha'Chayim (28): Even if he separated b'Mezid, it is permitted. Normally, Chachamim forbid the food even if a mid'Rabanan transgression was done b'Mezid. Here we are lenient because the food was permitted without this. Also, we may rely on the Rishonim who rule like Rabah who permits Hafrashah l'Chatchilah.
Rema: He may eat and leave over, and after Yom Tov he separates Chalah from what remains.
Gra (DH Ela): When a mental Hafrashah is required, one opinion in the Yerushalmi (Orlah 9a) forbids eating before doing so. Here, no such Hafrashah is required, so all permit.
Rema (ibid.): (If it was not baked before Yom Tov,) one may bake it on Yom Tov, eat some and separate Chalah after Yom Tov.
Mishnah Berurah (21): This refers to Chalah of Chutz la'Aretz. In Eretz Yisrael one may not eat before Hafrashah. The only solution is to knead more, like the Rema says later.
Mordechai (654): If it was kneaded before Yom Tov, one may not separate Chalah on Yom Tov or bake it.
Rebuttal (Beis Yosef DH Kosav Mordechai): One may eat it and leave over, just like Terumas Chutz la'Aretz! The Poskim allow baking it on Yom Tov (for this reason).
Taz (7): Presumably, the Mordechai forbids baking it because the Chalah cannot be eaten on Yom Tov, just like one may not bake a dough owned jointly with a Nochri. However, there one could divide the dough, therefore one may not bake all of it. One cannot separate the Chalah from the dough on Yom Tov. This should be like slaughtering an animal owned jointly with a Nochri, which is permitted! The Mordechai must hold that since he could have separated Chalah before Yom Tov, we consider it like something that can be divided. The Poskim say that one eats and leaves over, but he may not separate Chalah; they do not discuss baking. Perhaps this is b'Di'eved, when it was baked. This is slightly Dochek, but since Poskim do not explicitly oppose the Mordechai, we should be concerned for his opinion.
Mishnah Berurah (24): Some permit because today we separate only a little, and it is not extra exertion to bake everything. L'Chatchilah one should be stringent.
Kaf ha'Chayim (33): Even those who forbid permit to bake part and to separate Chalah from the rest after Yom Tov.
Beis Yosef (DH v'Rabbeinu): The Tur says that one should eat and leave over to avoid the argument. Even though Rashi forbids this, this is an extreme stringency, and the Tur is not concerned for it. Alternatively, the Tur means that he leaves over much more than the Shi'ur Chalah, and after Yom Tov he separates from it.
Mishnah Berurah (22): He must leave over a bit more than the Shi'ur, so when he separates afterwards the Shirayim will be Nikarim. Also, if he leaves over only the Chalah, this is like Hafrashah.
Magen Avraham (10): One version of the Mordechai forbids to bake and leave some over, for then Chachamim's fine (for one who did not separate before Yom Tov) would be meaningless. If it is a fine, it should be permitted for one who forgot to separate before Yom Tov. The Poskim do not make this distinction.
Rema (ibid.): He may knead another dough on Yom Tov and join them and separate from the latter on both of them.
Mishnah Berurah (25,26): This is only if he needs or wants fresh bread; it works even in Eretz Yisrael. The new dough must have a Shi'ur to obligate taking Chalah. In pressed circumstances one may rely on opinions that allow joining it to yesterday's dough to take Chalah.