WHEN IS SHEHIYAH PERMITTED? [Shabbos: Shehiyah]
Gemara
18b (Beraisa): One may not fill a pot with lupines or Asasiyos (peas?) and put it in an oven just before Shabbos. If he did, it is forbidden bi'Chdei she'Ya'asu (until it would get cooked had he put it in) after Shabbos.
Similarly, a baker may not fill a flask with water and put it in an oven just before Shabbos. If he did, it is forbidden bi'Chdei she'Ya'asu after Shabbos.
This is a decree, lest one stoke the coals [on Shabbos, to hasten the cooking].
Deduction: We forbid [only] lest one stoke the coals. Therefore, one may leave a pot with raw food. Since it will not be ready to eat at night, he puts it out of his mind [until morning, when it will be ready in any case], and he will not stoke.
One may leave a pot with fully cooked food. One may not leave a pot with partially cooked food;
If he adds to the pot a raw bone with meat, it is permitted.
36b (Mishnah): If a Kirah (oven) was heated with straw or stubble, one may put a Tavshil (cooked food) on it.
If it was heated with Gefes (the waste of olives after the oil was extracted) or wood, one may not put in it unless it was Garuf v'Katum (the coals were swept out, or ashes were put on them).
Question: Does the Mishnah forbid Chazarah (returning) to the Kirah, but Shehiyah (leaving in it when Shabbos begins) is permitted, even if it was not Garuf v'Katum? This would be like Chananyah;
(Beraisa - Chananya): Shehiyah of anything k'Ma'achal Ben Drusai (a third or half cooked) is permitted, even if the stove was not Garuf or Katum.
Or, perhaps it forbids Shehiyah, and all the more so Chazarah. Shehiyah is permitted only if it was Garuf v'Katum.
37a (R. Yitzchak bar Nachmani citing R. Oshaya): If one put ashes on coals and they flared up, one may be Meshaheh fully heated water or a fully cooked Tavshil.
Inference: Mitztamek v'Yafeh Lo (fully cooked food that improves through further cooking, i.e. it dries out) is [always] permitted!
Rejection: No, here it is permitted only because ashes were put.
Rishonim
Rif (16a): The Gemara concludes that the Mishnah forbids Shehiyah. It is permitted only if the oven is Garuf v'Katum. If it was fully cooked, even if the oven is not Garuf v'Katum, Shehiyah is permitted if it is Mitztamek v'Ra Lo, e.g. turnips, porridge, dates and similar things. If it is Mitztamek v'Yafeh Lo, e.g. cabbage, beans and diced meat, it is forbidden. One may be Meshaheh anything in a Kirah that is Garuf v'Katum. Since it is Garuf v'Katum, he will not come to stoke. This is the Halachah.
Rosh (3:1): Rashi says that we rely on Chananyah to do Shehiyah on a Kirah that is not Garuf v'Katum. The Stam Mishnah is like him. The Gemara says that if the bread formed a crust it is permitted, even if it is not fully cooked. The Ba'al ha'Ma'or refuted all the Rif's proofs.
Rambam (Hilchos Shabbos 3:8): If a raw Tavshil was not cooked at all, or it was fully cooked and it is Mitztamek v'Ra Lo, he may do Shehiyah. Similarly, if a Tavshil was partially cooked, or it was fully cooked but it is Mitztamek v'Yafeh Lo, if he cast in it, if he put a raw limb inside close to Bein ha'Shemashos, the entire Tavshil becomes like a raw Tavshil, and Shehiyah is permitted even though it is not Garuf or Katum. He took his mind off it, and he will not stoke.
Poskim
Shulchan Aruch (OC 253:1): If a Kirah was heated with Gefes or wood, one may not be Meshaheh a Tavshil on it unless it was fully cooked, and it is Mitztamek v'Ra Lo, for then there is no concern lest one stoke coals.
Beis Yosef (DH Kirah and DH v'Chasav): The Rif, She'altos and Ri Bartzeloni Rambam and Ramban hold that the Mishnah forbids Shehiyah. Rashi and many others hold that the Mishnah discusses Chazarah.
Mishnah Berurah (5): When it gets dark, one must remove from the fire what is not fully cooked, or if it is Mitztamek v'Yafeh Lo.
Shulchan Aruch (ibid.): Also, it is permitted if the food is raw and was not cooked at all, for then he does not plan to eat it until tomorrow (i.e. Shabbos morning), and it can cook the entire night without stoking.
Beis Yosef (DH ume'Atah): On 18b, we permit what was cooked, and forbid what was partially cooked. According to the Rif, once it starts getting cooked, whether or not it reached k'Ma'achal Ben Drusai, and even if it is fully cooked but it is Mitztamek v'Yafeh Lo, this is called partially cooked. Only Mitztamek v'Ra Lo is called cooked and then Shehiyah is permitted. According to Rashi and those who hold like him, once it reached k'Ma'achal Ben Drusai it is considered cooked, and Shehiyah is permitted. Partially cooked is only when it started cooking and did not reach k'Ma'achal Ben Drusai. If it did not start cooking at all, rather, it is totally raw, all permit Shehiyah on an oven that is not Garuf v'Katum. The same applies if he added one raw piece. It is as if the entire Tavshil is raw. This is only in a pot. One may not be Meshaheh raw meat to roast by a fire.
Rebuttal (Bach DH v'Chasav): The Tur connotes unlike this. He says 'if it cooked a little, k'Ma'achal Ben Drusai, which is a third cooked...' According to the Beis Yosef, he should have said simply 'if it cooked a little, or even fully cooked, and it is Mitztamek v'Yafeh Lo, it is forbidden.' Also, why did he mention that k'Ma'achal Ben Drusai is a third cooked? Whether it is a third or a half, it is forbidden! Rather, we must say that only when it is a third cooked and proper for Ben Drusai, we are concerned lest one come to stoke for the night. If it is less than a third, which is not proper for anyone to eat, it is as if it is raw, and Shehiyah is permitted. Therefore, when the Tur explained Rashi and the Ri, he did not explain k'Ma'achal Ben Drusai. He Stam wrote that k'Ma'achal Ben Drusai is permitted, i.e. whether this is a third according to Rashi, or a half according to the Rambam. We are not concerned at all lest one stoke.
Defense (Taz 1): One might have thought that if something did not reach even a third cooked, it is considered raw. The Bach says that less than k'Ma'achal Ben Drusai, it is as if it is raw. If so, all the more so it is permitted according to the latter opinion (that permits anything that reached k'Ma'achal Ben Drusai). All the Poskim say that the latter opinion forbids what is less than k'Ma'achal Ben Drusai. Rather, the Tur mentioned k'Ma'achal Ben Drusai to teach unlike Chananyah, who totally permits whatever reached k'Ma'achal Ben Drusai, i.e. the latter opinion. Even less cooked than this is forbidden, even according to the latter opinion. This is partially cooked, which the Gemara forbids. The Poskim argue only about what reached k'Ma'achal Ben Drusai, whether this is considered cooked.
Kaf ha'Chayim (7): The Acharonim hold unlike the Bach.
Magen Avraham (2): Something raw is permitted close to dark. If he puts it earlier in the day, it is already partially cooked before Shabbos, so one must remove it for the fire unless it is fully cooked.
Shulchan Aruch (ibid.): However, if it was cooked partially, but not fully, or even if it was fully cooked but it is Mitztamek v'Yafeh Lo, we are concerned lest he stoke, and it is forbidden to be Meshaheh unless the oven was Garuf, or Katum, to diminish the coals' heat.
Magen Avraham (3): One need not cover them until no fire is seen. Any amount of ashes suffice. Even if they flare up it is permitted, since he showed that he does not need the coals.
Shulchan Aruch (ibid.): If one put a raw piece [of meat] inside, it is permitted as if the entire pot is raw, for through this he diverts his mind from it.
Beis Yosef (DH u'Mah she'Chasav v'Im): The Gemara and Poskim connote that we permit only if one puts in a raw limb, which cannot cook at night. One takes his mind off it. However, Perush ha'Mishnayos says that one adds meat or vegetables. It seems that even if it can get cooked during the day it is permitted. Since he did an act to show that he took his mind off it, he will remember, and not stoke, just like the Heter for Shehiyah on an oven that is Katum. Even a little ashes suffices. This is a reminder, so he will not stoke.
Taz (2): In Mishneh Torah, the Rambam wrote 'a raw limb.' This connotes that the Heter is only for meat. This is proper l'Halachah.
Mishnah Berurah (11): Even if the Tavshil became warm, if it did not cook at all, we do not decree lest one come to stoke.
Mishnah Berurah (14): one must cover the corners, but he need not cover them until one cannot see any fire. If the coals dimmed, this is like Katum. Since he did not fan them, this shows that he is not particular to stoke.
Kaf ha'Chayim (3): The Tur forbids Shehiyah for the sake of the night. This connotes that one may be Meshaheh for the sake of the day. He took his mind off it, so we are not concerned lest he stoke. The Beis Yosef was unsure about this. Since the Shulchan Aruch does not mention "for the sake of the night", it seems that he does not distinguish whether it is for the day or for the night. The Bach says so. This is reasonable, for since it could finish at night through stoking, we are concerned lest he reconsider and decide to eat it at night.
Kaf ha'Chayim (8): If it cannot cook the entire night without stoking, it is forbidden, lest one stoke it in order to eat it during the day.