logo

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