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 to_contraposition
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
to_contraposition:
(see dependencies)
In [3]:
defaults.assumptions = list(to_contraposition.all_conditions()) + [Not(B)]
defaults.assumptions:
In [4]:
A_implies_B = defaults.assumptions[0]
A_implies_B:
In [5]:
A_implies_B.deny_antecedent().as_implication(Not(B))
to_contraposition may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [6]:
%qed
proveit.logic.booleans.implication.to_contraposition has been proven.
Out[6]:
 step typerequirementsstatement
0generalization1  ⊢  
1deduction2,  ⊢  
2instantiation3, 4, 5, 6, ,  ⊢  
  :
3theorem  ⊢  
 proveit.logic.booleans.implication.modus_tollens_denial
4assumption  ⊢  
5assumption  ⊢  
6assumption  ⊢