logo
In [1]:
import proveit
from proveit import defaults
from proveit import A, B
from proveit.logic import in_bool, Not, Or
from proveit.logic.booleans.implication  import affirm_via_contradiction
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving right_if_not_left
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
right_if_not_left:
(see dependencies)
In [3]:
defaults.assumptions = [in_bool(A), in_bool(B), Or(A, B), Not(A), Not(B)]
defaults.assumptions:
In [4]:
AorB = Or(A, B)
AorB:
In [5]:
AorB.affirm_via_contradiction(B)
, ,  ⊢  
right_if_not_left may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [6]:
%qed
proveit.logic.booleans.disjunction.right_if_not_left has been proven.
Out[6]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4, ,  ⊢  
  :
2axiom  ⊢  
 proveit.logic.booleans.implication.affirmation_via_contradiction
3assumption  ⊢  
4deduction5,  ⊢  
5instantiation6, 7, 8, 9, ,  ⊢  
  : , :
6theorem  ⊢  
 proveit.logic.booleans.disjunction.binary_or_contradiction
7assumption  ⊢  
8assumption  ⊢  
9assumption  ⊢