logo
In [1]:
import proveit
from proveit import defaults
from proveit import B
from proveit.logic import Not
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving contrapose_neg_antecedent
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
contrapose_neg_antecedent:
(see dependencies)
In [3]:
defaults.assumptions = list(contrapose_neg_antecedent.all_conditions()) + [Not(B)]
defaults.assumptions:
In [4]:
not_a_implies_B = defaults.assumptions[0]
not_a_implies_B:
In [5]:
not_a_implies_B.deny_antecedent().as_implication(Not(B))
contrapose_neg_antecedent may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [6]:
%qed
proveit.logic.booleans.implication.contrapose_neg_antecedent has been proven.
Out[6]:
 step typerequirementsstatement
0generalization1  ⊢  
1deduction2,  ⊢  
2instantiation3, 4, 5, 6, ,  ⊢  
  :
3conjecture  ⊢  
 proveit.logic.booleans.implication.modus_tollens_affirmation
4assumption  ⊢  
5assumption  ⊢  
6assumption  ⊢