logo
In [1]:
import proveit
from proveit import defaults
from proveit import A, B
from proveit.logic.booleans.disjunction import neither_intro
from proveit.logic.booleans.negation import negation_contradiction 
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving binary_or_contradiction
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
binary_or_contradiction:
(see dependencies)
In [3]:
defaults.assumptions = binary_or_contradiction.conditions
defaults.assumptions:
In [4]:
neither_intro
In [5]:
neither = neither_intro.instantiate({A:A, B:B})
neither: ,  ⊢  
binary_or_contradiction may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [6]:
neither.derive_contradiction()
, ,  ⊢  
In [7]:
%qed
proveit.logic.booleans.disjunction.binary_or_contradiction has been proven.
Out[7]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4, ,  ⊢  
  :
2theorem  ⊢  
 proveit.logic.booleans.negation.negation_contradiction
3assumption  ⊢  
4instantiation5, 6, 7,  ⊢  
  : , :
5theorem  ⊢  
 proveit.logic.booleans.disjunction.neither_intro
6assumption  ⊢  
7assumption  ⊢