import proveit
from proveit import defaults
from proveit import A
theory = proveit.Theory() # the theorem's theory
%proving from_contraposition
defaults.assumptions = list(from_contraposition.all_conditions()) + [A]
not_b_implies_not_a = defaults.assumptions[0]
not_b_implies_not_a.deny_antecedent().as_implication(A)
%qed # automation can take it from here