“The question of whether a given pope has lost his office on account of heresy is hypothetical, since it has never been proven that a pope can actually fall into formal heresy. The opinion, that a pope cannot be a heretic, (the first opinion outlined by Bellarmine) is the one that is most commonly taught as the most probable by the majority of theologians and Doctors: St. Robert Bellarmine, St. Alphonsus de Liguori, Francisco Suárez, Melchior Cano, Domingo Soto, John of St. Thomas, Juan de Torquemada, Louis Billot, Joachim Salaverri, A. Maria Vellico, Charles Journet, Cardinal Tommaso de Vio ‘Cajetan’, Francesco Bordoni, Pedro de Simanca, Domingo Bañez, and Martino Bonacina – and Bonacina cites others who were of the same opinion. For roughly a century this nearly unanimous opinion has been the most common, even among those who admit only the hypothetical possibility of a pope falling from office due to public defection into heresy.”
Kramer, Paul. To Deceive the Elect: The Catholic Doctrine on the Question of a Heretical Pope (Kindle Locations 3385-3392). Kindle Edition.