logo
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.exponentiation import products_of_posnat_powers
In [2]:
# check that the built expression is the same as the stored expression
assert products_of_posnat_powers.expr == stored_expr
assert products_of_posnat_powers.expr._style_id == stored_expr._style_id
print("Passed sanity check: products_of_posnat_powers matches stored_expr")
Passed sanity check: products_of_posnat_powers matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{m \in \mathbb{N}^+}~\left[\forall_{a \in \mathbb{C},\left(k_{1} \in \mathbb{N}^+\right), \left(k_{2} \in \mathbb{N}^+\right), \ldots, \left(k_{m} \in \mathbb{N}^+\right)}~\left(\left(a^{k_{1}} \cdot  a^{k_{2}} \cdot  \ldots \cdot  a^{k_{m}}\right) = a^{k_{1} +  k_{2} +  \ldots +  k_{m}}\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: 7
operand: 2
1ExprTuple2
2Lambdaparameter: 44
body: 4
3ExprTuple44
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 10
6Operationoperator: 35
operands: 9
7Literal
8ExprTuple10
9ExprTuple44, 39
10Lambdaparameters: 11
body: 12
11ExprTuple45, 38
12Conditionalvalue: 13
condition: 14
13Operationoperator: 15
operands: 16
14Operationoperator: 17
operands: 18
15Literal
16ExprTuple19, 20
17Literal
18ExprTuple21, 22
19Operationoperator: 23
operands: 24
20Operationoperator: 40
operands: 25
21Operationoperator: 35
operands: 26
22ExprRangelambda_map: 27
start_index: 43
end_index: 44
23Literal
24ExprTuple28
25ExprTuple45, 29
26ExprTuple45, 30
27Lambdaparameter: 49
body: 31
28ExprRangelambda_map: 32
start_index: 43
end_index: 44
29Operationoperator: 33
operands: 34
30Literal
31Operationoperator: 35
operands: 36
32Lambdaparameter: 49
body: 37
33Literal
34ExprTuple38
35Literal
36ExprTuple46, 39
37Operationoperator: 40
operands: 41
38ExprRangelambda_map: 42
start_index: 43
end_index: 44
39Literal
40Literal
41ExprTuple45, 46
42Lambdaparameter: 49
body: 46
43Literal
44Variable
45Variable
46IndexedVarvariable: 47
index: 49
47Variable
48ExprTuple49
49Variable