import proveit
from proveit import defaults
from proveit import A, B
from proveit.logic.booleans.negation import negation_contradiction
from proveit.logic import Not
theory = proveit.Theory() # the theorem's theory
%proving modus_tollens_affirmation
defaults.assumptions = modus_tollens_affirmation.all_conditions()
# Prove A via the contradition, under the assumptions,
# of B and Not(B) simultaneously being true when A is false.
Not(B).affirm_via_contradiction(A)
%qed