logo

Theorem sum_split_after of type Forall

from the theory of proveit.numbers.summation

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.numbers.summation import sum_split_after
In [2]:
# check that the built expression is the same as the stored expression
assert sum_split_after.expr == stored_expr
assert sum_split_after.expr._style_id == stored_expr._style_id
print("Passed sanity check: sum_split_after matches stored_expr")
Passed sanity check: sum_split_after matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{f}~\left[\forall_{a, b, c \in \mathbb{Z}~|~a \leq b, b < c}~\left(\left(\sum_{x = a}^{c} f\left(x\right)\right) = \left(\left(\sum_{x = a}^{b} f\left(x\right)\right) + \left(\sum_{x = b + 1}^{c} f\left(x\right)\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: 51
body: 4
3ExprTuple51
4Operationoperator: 5
operand: 7
5Literal
6ExprTuple7
7Lambdaparameters: 8
body: 9
8ExprTuple61, 66, 63
9Conditionalvalue: 10
condition: 11
10Operationoperator: 12
operands: 13
11Operationoperator: 14
operands: 15
12Literal
13ExprTuple16, 17
14Literal
15ExprTuple18, 19, 20, 21, 22
16Operationoperator: 37
operand: 31
17Operationoperator: 64
operands: 24
18Operationoperator: 53
operands: 25
19Operationoperator: 53
operands: 26
20Operationoperator: 53
operands: 27
21Operationoperator: 28
operands: 58
22Operationoperator: 29
operands: 30
23ExprTuple31
24ExprTuple32, 33
25ExprTuple61, 34
26ExprTuple66, 34
27ExprTuple63, 34
28Literal
29Literal
30ExprTuple66, 63
31Lambdaparameter: 56
body: 35
32Operationoperator: 37
operand: 40
33Operationoperator: 37
operand: 41
34Literal
35Conditionalvalue: 47
condition: 39
36ExprTuple40
37Literal
38ExprTuple41
39Operationoperator: 53
operands: 42
40Lambdaparameter: 56
body: 43
41Lambdaparameter: 56
body: 44
42ExprTuple56, 45
43Conditionalvalue: 47
condition: 46
44Conditionalvalue: 47
condition: 48
45Operationoperator: 59
operands: 49
46Operationoperator: 53
operands: 50
47Operationoperator: 51
operand: 56
48Operationoperator: 53
operands: 54
49ExprTuple61, 63
50ExprTuple56, 55
51Variable
52ExprTuple56
53Literal
54ExprTuple56, 57
55Operationoperator: 59
operands: 58
56Variable
57Operationoperator: 59
operands: 60
58ExprTuple61, 66
59Literal
60ExprTuple62, 63
61Variable
62Operationoperator: 64
operands: 65
63Variable
64Literal
65ExprTuple66, 67
66Variable
67Literal