And who decides if the pope is "notoriously guilty of heresy"? You? You and 2 people? You and 10 people? You and 1,000 people? 2 Bishops? What if 50% of catholics say he is and 50% say he isn't?
The pope's status is not matter of public opinion, or canonical proof, but is determined by the Church Authorites alone, that unity may be preserved, which is one of the symbols of the papacy. Outside of a Church decision, the default position is that the pope holds the chair, no matter the extent of his errors, until the Church tells us otherwise.
You can quote canon law all day long, or excerpts from theologians til you're blue in the face, but there is NO AUTHORITY given to ANYONE, except Church officials, for deciding this question.