logo

Theorem same_sums 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 same_sums
In [2]:
# check that the built expression is the same as the stored expression
assert same_sums.expr == stored_expr
assert same_sums.expr._style_id == stored_expr._style_id
print("Passed sanity check: same_sums matches stored_expr")
Passed sanity check: same_sums matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{f, g}~\left[\forall_{m, n \in \mathbb{Z}}~\left(\left[\forall_{k \in \{m~\ldotp \ldotp~n\}}~\left(f\left(k\right) = g\left(k\right)\right)\right] \Rightarrow \left(\left(\sum_{l = m}^{n} f\left(l\right)\right) = \left(\sum_{l = m}^{n} g\left(l\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: 18
operand: 2
1ExprTuple2
2Lambdaparameters: 3
body: 4
3ExprTuple46, 47
4Operationoperator: 18
operand: 6
5ExprTuple6
6Lambdaparameters: 55
body: 7
7Conditionalvalue: 8
condition: 9
8Operationoperator: 10
operands: 11
9Operationoperator: 12
operands: 13
10Literal
11ExprTuple14, 15
12Literal
13ExprTuple16, 17
14Operationoperator: 18
operand: 23
15Operationoperator: 35
operands: 20
16Operationoperator: 49
operands: 21
17Operationoperator: 49
operands: 22
18Literal
19ExprTuple23
20ExprTuple24, 25
21ExprTuple56, 26
22ExprTuple57, 26
23Lambdaparameter: 51
body: 27
24Operationoperator: 29
operand: 33
25Operationoperator: 29
operand: 34
26Literal
27Conditionalvalue: 31
condition: 32
28ExprTuple33
29Literal
30ExprTuple34
31Operationoperator: 35
operands: 36
32Operationoperator: 49
operands: 37
33Lambdaparameter: 52
body: 38
34Lambdaparameter: 52
body: 39
35Literal
36ExprTuple40, 41
37ExprTuple51, 53
38Conditionalvalue: 42
condition: 44
39Conditionalvalue: 43
condition: 44
40Operationoperator: 46
operand: 51
41Operationoperator: 47
operand: 51
42Operationoperator: 46
operand: 52
43Operationoperator: 47
operand: 52
44Operationoperator: 49
operands: 50
45ExprTuple51
46Variable
47Variable
48ExprTuple52
49Literal
50ExprTuple52, 53
51Variable
52Variable
53Operationoperator: 54
operands: 55
54Literal
55ExprTuple56, 57
56Variable
57Variable