logo

Theorem merge_back 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_back
In [2]:
# check that the built expression is the same as the stored expression
assert merge_back.expr == stored_expr
assert merge_back.expr._style_id == stored_expr._style_id
print("Passed sanity check: merge_back matches stored_expr")
Passed sanity check: merge_back 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, k~|~\left(k - i\right) \in \mathbb{N}, k = \left(j + 1\right)}~\left(\begin{array}{c} \begin{array}{l} \left(f\left(i\right), f\left(i + 1\right), \ldots, f\left(j\right), f\left(k\right)\right) =  \\ \left(f\left(i\right), f\left(i + 1\right), \ldots, f\left(k\right)\right) \end{array} \end{array}\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: 1
operand: 3
1Literal
2ExprTuple3
3Lambdaparameters: 4
body: 5
4ExprTuple31, 40, 35, 33
5Conditionalvalue: 6
condition: 7
6Operationoperator: 20
operands: 8
7Operationoperator: 9
operands: 10
8ExprTuple11, 12
9Literal
10ExprTuple13, 14
11ExprTuple15, 16
12ExprTuple17
13Operationoperator: 18
operands: 19
14Operationoperator: 20
operands: 21
15ExprRangelambda_map: 23
start_index: 40
end_index: 35
16Operationoperator: 31
operand: 33
17ExprRangelambda_map: 23
start_index: 40
end_index: 33
18Literal
19ExprTuple24, 25
20Literal
21ExprTuple33, 26
22ExprTuple33
23Lambdaparameter: 37
body: 27
24Operationoperator: 29
operands: 28
25Literal
26Operationoperator: 29
operands: 30
27Operationoperator: 31
operand: 37
28ExprTuple33, 34
29Literal
30ExprTuple35, 36
31Variable
32ExprTuple37
33Variable
34Operationoperator: 38
operand: 40
35Variable
36Literal
37Variable
38Literal
39ExprTuple40
40Variable