logo
In [1]:
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
In [2]:
%proving modus_tollens_affirmation
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
modus_tollens_affirmation:
(see dependencies)
In [3]:
defaults.assumptions = modus_tollens_affirmation.all_conditions()
defaults.assumptions:
In [4]:
# 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)
, ,  ⊢  
modus_tollens_affirmation may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [5]:
%qed
proveit.logic.booleans.implication.modus_tollens_affirmation has been proven.
Out[5]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4, ,  ⊢  
  :
2axiom  ⊢  
 proveit.logic.booleans.implication.affirmation_via_contradiction
3assumption  ⊢  
4deduction5,  ⊢  
5instantiation6, 7, 8, ,  ⊢  
  :
6theorem  ⊢  
 proveit.logic.booleans.negation.negation_contradiction
7modus ponens9, 10,  ⊢  
8assumption  ⊢  
9assumption  ⊢  
10assumption  ⊢