I have always heard from totalist sedevacantists that divine law prevents a heretic from becoming Pope, but which divine law are they referring to?
A. Institutiones Iuris Canonici [1950], Coronata
-“Appointment to the Office of the primacy- What is required by DIVINE LAW for this appointment …Also required for validity is that the one elected be a member of the Church; hence, heretics and apostates (at least public ones) are excluded…
B. Institutiones Iuris Canonici [1921], Marato
”Heretics and schismatics are barred from the Supreme Pontificate by the Divine Law itself, because, although by Divine Law they are not considered incapable of participating in a certain type of ecclesiastical jurisdiction, nevertheless, they must certainly be regarded as excluded from occupying the throne of the Apostolic See, which is the infallible teacher of the truth if the faith and the center of ecclesiastical unity.”