logo
In [1]:
import proveit
from proveit import A
from proveit.logic import TRUE, FALSE, Or, Equals
from proveit.logic.booleans import fold_is_bool
from proveit.logic.booleans.disjunction import true_or_false
from proveit.logic.equality import unfold_not_equals, sub_left_side_into
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving true_is_bool
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
true_is_bool:
(see dependencies)
true_is_bool may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [3]:
fold_is_bool
In [4]:
TeqT = Equals(TRUE, TRUE).prove()
TeqT:  ⊢  
In [5]:
not_TeqF = Equals(TRUE, FALSE).disprove()
not_TeqF:  ⊢  
In [6]:
true_or_false
In [7]:
TeqT_or_F = true_or_false.inner_expr().operands[0].substitute(TeqT.expr)
TeqT_or_F:  ⊢  
In [8]:
TeqT_or_F.inner_expr().operands[1].substitute(not_TeqF.operand, auto_simplify=False)
In [9]:
fold_is_bool.instantiate({A:TRUE})
In [10]:
%qed
proveit.logic.booleans.true_is_bool has been proven.