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