TITHING CHAYAV ON PATUR OR VICE-VERSA [Terumah: Chayav on Patur]
Gemara
(Mishnah #1): (If a flowerpot has holes, mid'Oraisa one must be Torem (separate Terumah) from what grows in it. If it has no holes, one must be Torem mid'Rabanan.) If one was Torem Peros from a pot with holes on (to exempt) Peros from a pot without holes, what he separated is Terumah, but one may not eat it before separating Terumah and Ma'aseros on it.
(Mishnah #2): If one was Torem Peros from a pot without holes on Peros from a pot with holes, what he separated is Terumah, but he must separate more Terumah (from a pot with holes)!
Yevamos 89a (Mishnah): One may not be Torem from Tamei Peros on Tahor. If one did so b'Shogeg, it is Terumah. If he was Mezid, his separation has no effect.
(Rav Chisda): It has no effect at all. Even the 'Terumah' he separated is Tevel.
(R. Noson b'Rebbi Oshaya): It has no effect to permit the produce on which it was separated, but the 'Terumah' is Terumah.
Rav Chisda did not explain like R. Noson, for if we say that it is Terumah, he might neglect to separate more Terumah to fix the (Tahor) Tevel.
Question (against Rav Chisda): Here, b'Mezid it has no effect. In Mishnah #2, it takes effect (it is Terumah, and he must be Torem again)!
Answer: When he is Torem Peros from a Keli on Peros from a different type of Keli, he (understands that it is invalid and) will agree to Torem again. Here, it is all from the same Keli (just some is Tamei), he will not agree (to Torem again if we say that the first is Terumah).
Question: Here, R. Noson says that the Tahor produce is still forbidden, but the Terumah becomes Terumah. Why is this different than Mishnah #1, in which, it is Terumah, but it may not be eaten until tithing it?
Answer: Here is different, since mid'Oraisa it is Terumah, like R. Ilai taught.
R. Ilai: "You will not bear sin if you take the best part" teaches that if one was Torem bad produce on good, it is Terumah.
If the separation were void, why would he bear sin?!
Rishonim
Rambam (Hilchos Terumos 5:16): If one was Torem produce of a pot without holes to exempt produce from a pot with holes, it is Terumah, but he must be Torem again. If one was Torem from a pot with holes to exempt a pot without holes, it is Terumah, but it may not be eaten until separating Terumah and Ma'aseros on it from other produce.
Pirush ha'Mishnayos (Demai 5:10): (In Mishnah #1) the Yisrael must fix the Terumah and then give it to the Kohen.
Me'iri (Yevamos 89a'DH Ein Tormin mi'Davar): If one was Torem produce of a pot without holes on produce from a pot with holes, it is Terumah, but the Yisrael must be Torem again. Some say that also the Kohen may not eat the Terumah until he takes Terumah on it. The Mishnah did not mention this, for it is only mid'Rabanan. If one was Torem from a pot with holes to exempt a pot without holes, it is Terumah, but the Kohen may not eat it until he separates Terumah and Ma'aseros on it from other produce. He may also separate from it itself. Some say that here also the Yisrael must be Torem again.
Rosh and Bartenura (Demai 5:10): When one is Torem from Patur (mid'Oraisa) on Chayav, it is not really Terumah, so the Yisrael must Torem again. However, since it was called Terumah it must be given to the Kohen, lest the Yisrael come to disgrace Terumah. The Kohen need not fix it. Chachamim left the law like mid'Oraisa, that it is exempt.
Question (Tosfos R. Akiva Eiger 59): Why don't they say that since both are Chayav mid'Rabanan, it is mid'Rabanan Terumah, but since it cannot exempt mid'Oraisa, the Yisrael must be Torem again? Perhaps because he intended to exempt his produce, his Hafrashah was b'Ta'us, so letter of the law nothing happened. This requires investigation.
Poskim
Shulchan Aruch (YD 331:59): If one was Torem Demai to exempt other Demai (i.e. bought from a different Am ha'Aretz) or Vadai Tevel, the Terumah is Terumah, but he must tithe each again from itself.
Note: The Shulchan Aruch discusses one who was Torem and Terumah. One need not separate Terumah Gedolah from Demai. The Halachah applies to Ma'aseros and Terumas Ma'aser. However, nowadays one must separate also Terumah Gedolah from produce of Eretz Yisrael (without Hashgachah), lest it was grown by one who does not observe Mitzvos or separate anything.
Shach (84): We are concerned lest one was Chulin and the other was Tevel, and he separated from Chiyuv on Patur or vice-versa.
Note: If one tithed Demai to exempt Vadai Tevel, surely the Demai should be permitted. The Shulchan Aruch requires tithing each again from itself. Either this refers to the Reisha (when both are Tevel), or it is a decree lest people do similarly when both are Demai.
Shulchan Aruch (60): If one tithed Tevel to exempt Demai, it is Kodesh, but he may not eat it until he separates Terumah and Ma'aseros from it.