logo

Theorem merge_series of type Forall

from the theory of proveit.core_expr_types.tuples

see dependencies

In [1]:
import proveit
# Automation is not needed when only building an expression:
proveit.defaults.automation = False # This will speed things up.
proveit.defaults.inline_pngs = False # Makes files smaller.
%load_theorem_expr # Load the stored theorem expression as 'stored_expr'
# import the special expression
from proveit.core_expr_types.tuples import merge_series
In [2]:
# check that the built expression is the same as the stored expression
assert merge_series.expr == stored_expr
assert merge_series.expr._style_id == stored_expr._style_id
print("Passed sanity check: merge_series matches stored_expr")
Passed sanity check: merge_series matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{f, i, j~|~\left(j - i\right) \in \mathbb{N}}~\left[\forall_{x_{0}, x_{1}, \ldots, x_{j - i}~|~\left(x_{0} = f\left(i + 0\right)\right), \left(x_{1} = f\left(i + 1\right)\right), \ldots, \left(x_{j - i} = f\left(i + \left(j - i\right)\right)\right)}~\left(\begin{array}{c} \begin{array}{l} \left(x_{0}, x_{1}, \ldots, x_{j - i}\right) =  \\ \left(f\left(i\right), f\left(i + 1\right), \ldots, f\left(j\right)\right) \end{array} \end{array}\right)\right]
In [4]:
stored_expr.style_options()
namedescriptiondefaultcurrent valuerelated methods
with_wrappingIf 'True', wrap the Expression after the parametersNoneNone/False('with_wrapping',)
condition_wrappingWrap 'before' or 'after' the condition (or None).NoneNone/False('with_wrap_after_condition', 'with_wrap_before_condition')
wrap_paramsIf 'True', wraps every two parameters AND wraps the Expression after the parametersNoneNone/False('with_params',)
justificationjustify to the 'left', 'center', or 'right' in the array cellscentercenter('with_justification',)
In [5]:
# display the expression information
stored_expr.expr_info()
 core typesub-expressionsexpression
0Operationoperator: 7
operand: 2
1ExprTuple2
2Lambdaparameters: 3
body: 4
3ExprTuple42, 47, 34
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 11
6Operationoperator: 9
operands: 10
7Literal
8ExprTuple11
9Literal
10ExprTuple27, 12
11Lambdaparameters: 19
body: 13
12Literal
13Conditionalvalue: 14
condition: 15
14Operationoperator: 32
operands: 16
15Operationoperator: 17
operands: 18
16ExprTuple19, 20
17Literal
18ExprTuple21
19ExprTuple22
20ExprTuple23
21ExprRangelambda_map: 24
start_index: 26
end_index: 27
22ExprRangelambda_map: 25
start_index: 26
end_index: 27
23ExprRangelambda_map: 28
start_index: 47
end_index: 34
24Lambdaparameter: 48
body: 29
25Lambdaparameter: 48
body: 36
26Literal
27Operationoperator: 45
operands: 30
28Lambdaparameter: 48
body: 31
29Operationoperator: 32
operands: 33
30ExprTuple34, 35
31Operationoperator: 42
operand: 48
32Literal
33ExprTuple36, 37
34Variable
35Operationoperator: 38
operand: 47
36IndexedVarvariable: 40
index: 48
37Operationoperator: 42
operand: 44
38Literal
39ExprTuple47
40Variable
41ExprTuple48
42Variable
43ExprTuple44
44Operationoperator: 45
operands: 46
45Literal
46ExprTuple47, 48
47Variable
48Variable