# from the theory of proveit.linear_algebra.addition¶

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.
# import the special expression

In [2]:
# check that the built expression is the same as the stored expression
assert scalar_sum_extends_number_sum.expr == stored_expr
assert scalar_sum_extends_number_sum.expr._style_id == stored_expr._style_id
print("Passed sanity check: scalar_sum_extends_number_sum matches stored_expr")

Passed sanity check: scalar_sum_extends_number_sum matches stored_expr

In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())

\forall_{j \in \mathbb{N}^+}~\left[\forall_{f, Q}~\left(\begin{array}{c} \begin{array}{l} \left[\forall_{b_{1}, b_{2}, \ldots, b_{j}~|~Q\left(b_{1}, b_{2}, \ldots, b_{j}\right)}~\left(f\left(b_{1}, b_{2}, \ldots, b_{j}\right) \in \mathbb{C}\right)\right] \Rightarrow  \\ \left(\left[\sum_{b_{1}, b_{2}, \ldots, b_{j}~|~Q\left(b_{1}, b_{2}, \ldots, b_{j}\right)}~f\left(b_{1}, b_{2}, \ldots, b_{j}\right)\right] = \left[\sum_{b_{1}, b_{2}, \ldots, b_{j}~|~Q\left(b_{1}, b_{2}, \ldots, b_{j}\right)}~f\left(b_{1}, b_{2}, \ldots, b_{j}\right)\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: 17
operand: 2
1ExprTuple2
2Lambdaparameter: 42
body: 4
3ExprTuple42
4Conditionalvalue: 5
condition: 6
5Operationoperator: 17
operand: 9
6Operationoperator: 30
operands: 8
7ExprTuple9
8ExprTuple42, 10
9Lambdaparameters: 11
body: 12
10Literal
11ExprTuple36, 37
12Operationoperator: 13
operands: 14
13Literal
14ExprTuple15, 16
15Operationoperator: 17
operand: 21
16Operationoperator: 19
operands: 20
17Literal
18ExprTuple21
19Literal
20ExprTuple22, 23
21Lambdaparameters: 38
body: 24
22Operationoperator: 25
operand: 29
23Operationoperator: 26
operand: 29
24Conditionalvalue: 28
condition: 35
25Literal
26Literal
27ExprTuple29
28Operationoperator: 30
operands: 31
29Lambdaparameters: 38
body: 32
30Literal
31ExprTuple34, 33
32Conditionalvalue: 34
condition: 35
33Literal
34Operationoperator: 36
operands: 38
35Operationoperator: 37
operands: 38
36Variable
37Variable
38ExprTuple39
39ExprRangelambda_map: 40
start_index: 41
end_index: 42
40Lambdaparameter: 46
body: 43
41Literal
42Variable
43IndexedVarvariable: 44
index: 46
44Variable
45ExprTuple46
46Variable