# 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.
%load_axiom_expr # Load the stored axiom expression as 'stored_expr'
# import the special expression
from proveit.linear_algebra.addition import vec_sum_split_last
In [2]:
# check that the built expression is the same as the stored expression
assert vec_sum_split_last.expr == stored_expr
assert vec_sum_split_last.expr._style_id == stored_expr._style_id
print("Passed sanity check: vec_sum_split_last matches stored_expr")
Passed sanity check: vec_sum_split_last matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{v}~\left[\forall_{a, b \in \mathbb{Z}~|~a < b}~\left(\left(\sum_{i=a}^{b} v\left(i\right)\right) = \left(\left(\sum_{i=a}^{b - 1} v\left(i\right)\right) + v\left(b\right)\right)\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: 5
operand: 2
1ExprTuple2
2Lambdaparameter: 42
body: 4
3ExprTuple42
4Operationoperator: 5
operand: 7
5Literal
6ExprTuple7
7Lambdaparameters: 41
body: 8
8Conditionalvalue: 9
condition: 10
9Operationoperator: 11
operands: 12
10Operationoperator: 13
operands: 14
11Literal
12ExprTuple15, 16
13Literal
14ExprTuple17, 18, 19
15Operationoperator: 31
operand: 26
16Operationoperator: 21
operands: 22
17Operationoperator: 44
operands: 23
18Operationoperator: 44
operands: 24
19Operationoperator: 25
operands: 41
20ExprTuple26
21Literal
22ExprTuple27, 28
23ExprTuple50, 29
24ExprTuple54, 29
25Literal
26Lambdaparameter: 46
body: 30
27Operationoperator: 31
operand: 35
28Operationoperator: 42
operand: 54
29Literal
30Conditionalvalue: 39
condition: 34
31Literal
32ExprTuple35
33ExprTuple54
34Operationoperator: 44
operands: 36
35Lambdaparameter: 46
body: 37
36ExprTuple46, 38
37Conditionalvalue: 39
condition: 40
38Operationoperator: 48
operands: 41
39Operationoperator: 42
operand: 46
40Operationoperator: 44
operands: 45
41ExprTuple50, 54
42Variable
43ExprTuple46
44Literal
45ExprTuple46, 47
46Variable
47Operationoperator: 48
operands: 49
48Literal
49ExprTuple50, 51
50Variable
51Operationoperator: 52
operands: 53
52Literal
53ExprTuple54, 55
54Variable
55Operationoperator: 56
operand: 58
56Literal
57ExprTuple58
58Literal