logo
In [1]:
import proveit
from proveit import defaults
from proveit import A
from proveit.logic import InSet
from proveit.logic.booleans  import bools_def
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving fold_is_bool
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
fold_is_bool:
(see dependencies)
In [3]:
defaults.assumptions = fold_is_bool.conditions
defaults.assumptions:
In [4]:
bools_def
In [5]:
A_in_TorF = InSet(A, bools_def.rhs).prove()
A_in_TorF:  ⊢  
fold_is_bool may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [6]:
bools_def.sub_left_side_into(A_in_TorF)
In [7]:
%qed
proveit.logic.booleans.fold_is_bool has been proven.
Out[7]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4  ⊢  
  : , : , :
2theorem  ⊢  
 proveit.logic.equality.sub_left_side_into
3instantiation5, 6, 7, 8  ⊢  
  : , : , :
4axiom  ⊢  
 proveit.logic.booleans.bools_def
5theorem  ⊢  
 proveit.logic.sets.enumeration.fold
6conjecture  ⊢  
 proveit.numbers.numerals.decimals.nat2
7instantiation9  ⊢  
  : , :
8assumption  ⊢  
9conjecture  ⊢  
 proveit.numbers.numerals.decimals.tuple_len_2_typical_eq