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