logo

Theorem equiv_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 equiv_sums
In [2]:
# check that the built expression is the same as the stored expression
assert equiv_sums.expr == stored_expr
assert equiv_sums.expr._style_id == stored_expr._style_id
print("Passed sanity check: equiv_sums matches stored_expr")
Passed sanity check: equiv_sums matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{n \in \mathbb{N}}~\left[\forall_{f, g, R, S~|~\left\{g\left(y\right)\right\}_{y \in S} = R, |S| = n, |R| = n}~\left(\left[\forall_{a \in R}~\left(f\left(a\right) \in \mathbb{C}\right)\right] \Rightarrow \left(\left[\sum_{x \in R}~f\left(x\right)\right] = \left[\sum_{y \in S}~f\left(g\left(y\right)\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: 24
operand: 2
1ExprTuple2
2Lambdaparameter: 37
body: 4
3ExprTuple37
4Conditionalvalue: 5
condition: 6
5Operationoperator: 24
operand: 9
6Operationoperator: 68
operands: 8
7ExprTuple9
8ExprTuple37, 10
9Lambdaparameters: 11
body: 12
10Literal
11ExprTuple66, 75, 72, 74
12Conditionalvalue: 13
condition: 14
13Operationoperator: 15
operands: 16
14Operationoperator: 17
operands: 18
15Literal
16ExprTuple19, 20
17Literal
18ExprTuple21, 22, 23
19Operationoperator: 24
operand: 31
20Operationoperator: 29
operands: 26
21Operationoperator: 29
operands: 27
22Operationoperator: 29
operands: 28
23Operationoperator: 29
operands: 30
24Literal
25ExprTuple31
26ExprTuple32, 33
27ExprTuple34, 72
28ExprTuple35, 37
29Literal
30ExprTuple36, 37
31Lambdaparameter: 70
body: 38
32Operationoperator: 40
operand: 49
33Operationoperator: 40
operand: 50
34Operationoperator: 42
operand: 51
35Operationoperator: 45
operand: 74
36Operationoperator: 45
operand: 72
37Variable
38Conditionalvalue: 47
condition: 48
39ExprTuple49
40Literal
41ExprTuple50
42Literal
43ExprTuple51
44ExprTuple74
45Literal
46ExprTuple72
47Operationoperator: 68
operands: 52
48Operationoperator: 68
operands: 53
49Lambdaparameter: 71
body: 54
50Lambdaparameter: 77
body: 55
51Lambdaparameter: 77
body: 56
52ExprTuple57, 58
53ExprTuple70, 72
54Conditionalvalue: 59
condition: 60
55Conditionalvalue: 61
condition: 62
56Conditionalvalue: 73
condition: 62
57Operationoperator: 66
operand: 70
58Literal
59Operationoperator: 66
operand: 71
60Operationoperator: 68
operands: 65
61Operationoperator: 66
operand: 73
62Operationoperator: 68
operands: 69
63ExprTuple70
64ExprTuple71
65ExprTuple71, 72
66Variable
67ExprTuple73
68Literal
69ExprTuple77, 74
70Variable
71Variable
72Variable
73Operationoperator: 75
operand: 77
74Variable
75Variable
76ExprTuple77
77Variable