logo

Theorem sum_split_general 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_general
In [2]:
# check that the built expression is the same as the stored expression
assert sum_split_general.expr == stored_expr
assert sum_split_general.expr._style_id == stored_expr._style_id
print("Passed sanity check: sum_split_general matches stored_expr")
Passed sanity check: sum_split_general 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 \leq 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: 52
body: 4
3ExprTuple52
4Operationoperator: 5
operand: 7
5Literal
6ExprTuple7
7Lambdaparameters: 8
body: 9
8ExprTuple62, 67, 64
9Conditionalvalue: 10
condition: 11
10Operationoperator: 12
operands: 13
11Operationoperator: 26
operands: 14
12Literal
13ExprTuple15, 16
14ExprTuple17, 18, 19, 20
15Operationoperator: 36
operand: 28
16Operationoperator: 65
operands: 22
17Operationoperator: 54
operands: 23
18Operationoperator: 54
operands: 24
19Operationoperator: 54
operands: 25
20Operationoperator: 26
operands: 27
21ExprTuple28
22ExprTuple29, 30
23ExprTuple62, 31
24ExprTuple67, 31
25ExprTuple64, 31
26Literal
27ExprTuple32, 33
28Lambdaparameter: 57
body: 34
29Operationoperator: 36
operand: 41
30Operationoperator: 36
operand: 42
31Literal
32Operationoperator: 38
operands: 59
33Operationoperator: 38
operands: 39
34Conditionalvalue: 48
condition: 40
35ExprTuple41
36Literal
37ExprTuple42
38Literal
39ExprTuple67, 64
40Operationoperator: 54
operands: 43
41Lambdaparameter: 57
body: 44
42Lambdaparameter: 57
body: 45
43ExprTuple57, 46
44Conditionalvalue: 48
condition: 47
45Conditionalvalue: 48
condition: 49
46Operationoperator: 60
operands: 50
47Operationoperator: 54
operands: 51
48Operationoperator: 52
operand: 57
49Operationoperator: 54
operands: 55
50ExprTuple62, 64
51ExprTuple57, 56
52Variable
53ExprTuple57
54Literal
55ExprTuple57, 58
56Operationoperator: 60
operands: 59
57Variable
58Operationoperator: 60
operands: 61
59ExprTuple62, 67
60Literal
61ExprTuple63, 64
62Variable
63Operationoperator: 65
operands: 66
64Variable
65Literal
66ExprTuple67, 68
67Variable
68Literal