I’ve heard it said that if a Pope teaches a heresy thereby becoming a heretic, he ceases to be Pope and loses his office:
“If however, God were to permit a pope to become a notoriously and contumacious heretic he would by such fact cease to be pope, and the apostolic chair would be vacant.” – St. Alphonsus Liguori, Church Doctor
Is this true? And if it is, would it conflict the doctrine of Papal Infallibility: if a Pope does teach a doctrine that is heretical, he would cease to be Pope; but because he is Pope, the doctrine would be seen to be orthodox in virtue of the Pope’s office. In short, how does the doctrine of Papal Infallibility deal with the idea that the Pope’s loses his office if he is in error?