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