Catholics often bring up the situation of what would happen “if” a Pope tried to teach heresy ex cathedra, and a common (but wrong, and incoherent) answer is that he would cease to be Pope before he made the decree or would be automatically removed just as he tried to say it.
This explanation, however, is faulty. The whole point of the dogma of papal infallibility is that the Holy Spirit guarantees that a Pope never will, in fact, attempt such a thing. It cannot
The theory that a heretic cannot be Pope, that his election would be invalid, is utterly unnecessary. I think you could elect Martin Luther validly as the Pope, and he simply wouldn't be able to teach heresy ex cathedra. He would experience a miraculous conversion, or not care enough to ever try (perhaps exactly because he dismisses the papacy already), or would die before he could go through with it, etc. Though, in practice, the Holy Spirit seems to stop the process much earlier by simply stopping such men from getting elected very often in the first place. But their election would be valid, though some older theologians thought not.
Otherwise, someone who thought that the Immaculate Conception was a heresy could just say, “Well, that one doesn’t count because he was teaching a heresy and so ceased to be Pope.” Papal Infallibility then would be of no help in deciding questions, as people would be once again left to their own subjective judgment of what was heresy (and who was really Pope), with no final rock to act as the standard or final decider.
The whole point of infallibility is not some self-fulfilling circle whereby “The Pope cannot teach heresy, because if he tried to teach heresy he’d cease to be Pope.” That gives us no certainty, it's just a self-fulfilling loop.
The doctrine is not a semantical trick like that, whereby the Pope is infallible because saying something wrong would cause him to (potentially invisibly) lose the papacy, thereby preventing a Pope from ever saying anything wrong (but only in a trivially technical way, as he would remain the "apparent" Pope in such a theory).
No, Infallibility is real, concrete guarantee that the Pope will not ever attempt to teach heresy ex cathedra. There is total certainty, there is never a question of “Maybe what he just said was heresy, and thus he wasn’t really Pope, and thus we don’t have to believe it.” Such a situation simply won't happen, we have that guarantee.
It is a true charism of the Holy Spirit we must trust, not a word game merely defined into existence whereby the Pope is “by definition” infallible, because someone who says something wrong is “by definition” not Pope. That's just a legalistic game.
People need to understand this. There is no “fail-safe” like that for some hypothetical situation, rather we are bound trust the Holy Spirit that such a hypothetical cannot occur.
Yes, the other theory existed (Bellarmine held it, I believe)...but Vatican I’s decision was actually against such a theory. It taught that infallibility is a true charism of the Holy Spirit whereby a Pope never will try to teach heresy ex cathedra, not even "apparently." It is not merely that someone who attempts it becomes automatically not-Pope by definition. Rather, he'd remain a valid Pope, he’d just die or change his mind before he was able to carry it out (though, as I said earlier, it seems that usually the Holy Spirit never even lets it get that far in the first place).
An “automatic removal” for the Pope (who would, presumably, still claim to be Pope) would simply be too hard to judge (who would judge?)
No, rather, it simply can't happen. That's the dogma of papal infallibility. We have to trust the Holy Spirit. Not cook up hypothetical fail-safes which just confuse everything and get rid of all certainty, the very certainty the charism exists to provide us with.