logo
In [1]:
import proveit
from proveit import defaults
from proveit import A, C
from proveit.logic import in_bool, Implies
from proveit.logic.booleans import unfold_is_bool
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving from_excluded_middle
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
from_excluded_middle:
(see dependencies)
In [3]:
defaults.assumptions = from_excluded_middle.all_conditions()
defaults.assumptions:
In [4]:
unfold_is_bool
In [5]:
A_or_not_a = unfold_is_bool.instantiate({A:A})
A_or_not_a:  ⊢  
In [6]:
Ctruth = A_or_not_a.derive_via_dilemma(C)
Ctruth: , ,  ⊢  
from_excluded_middle may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [7]:
%qed
proveit.logic.booleans.from_excluded_middle has been proven.
Out[7]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 9, 3, 4, 5, 6, ,  ⊢  
  : , : , :
2conjecture  ⊢  
 proveit.logic.booleans.disjunction.singular_constructive_dilemma
3instantiation7, 9  ⊢  
  :
4instantiation8, 9  ⊢  
  :
5assumption  ⊢  
6assumption  ⊢  
7conjecture  ⊢  
 proveit.logic.booleans.negation.closure
8conjecture  ⊢  
 proveit.logic.booleans.unfold_is_bool
9assumption  ⊢