I’m joining this discussion a little late, I know. I just saw this thread.
Cardinal Henry Edward Manning, a Bishop participating in the First Vatican Council, wrote a book discussing papal infallibility. In one section, he covers the opinion of Saint Robert Bellarmine:
tinyurl.com/ouedzov
(link is to Google Books)
Bellarmine’s views are often misstated. He condemned the idea that a Pope could teach heresy with an Ecumenical Council as an heretical idea. He called the idea that a Pope could be a heretic and teach heresy, apart from a Council, “altogether erroneous and proximate to heresy”.
Bellarmine called the opinion that the Pope “cannot in any way be heretical, or publicly teach heresy” probable, but not certain.
And he called the opinion that the Pope could never define heresy as a truth to be believed by the whole Church “most certain and to be asserted”. But this last opinion is asserted without deciding the question as to whether or not a Pope could fall into heresy. In other words, Bellarmine thought it probable that the Pope could never fall into heresy, nor teach heresy at all, and he thought it certain that the Pope could never define a heresy as something to be believed by the whole Church.
As for how God accomplishes protecting the Pope from falling into heresy or from teaching heresy, I suggest that it is a special act of the grace of God. This grace does no violence to the free will of the Pope, since he freely accepts his office when elected, and he can always freely resign.