logo
In [1]:
import proveit
from proveit import a, b, i
from proveit.core_expr_types.tuples  import tuple_len_incr
from proveit.numbers.numerals.decimals import tuple_len_1, add_1_1
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving tuple_len_2
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
tuple_len_2:
(see dependencies)
In [3]:
one_spec = tuple_len_1.instantiate({a:a}, auto_simplify=False)
one_spec:  ⊢  
In [4]:
tuple_spec = tuple_len_incr.instantiate(
    {i: one_spec.rhs, a: [one_spec.lhs.operands[0]], b: b})
tuple_spec:  ⊢  
tuple_len_2 may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [5]:
%qed
proveit.numbers.numerals.decimals.tuple_len_2 has been proven.
Out[5]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4*  ⊢  
  : , : , :
2axiom  ⊢  
 proveit.core_expr_types.tuples.tuple_len_incr
3theorem  ⊢  
 proveit.numbers.numerals.decimals.nat1
4conjecture  ⊢  
 proveit.numbers.numerals.decimals.add_1_1
*equality replacement requirements