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 int_exp_of_neg_exp
In [2]:
# check that the built expression is the same as the stored expression
assert int_exp_of_neg_exp.expr == stored_expr
assert int_exp_of_neg_exp.expr._style_id == stored_expr._style_id
print("Passed sanity check: int_exp_of_neg_exp matches stored_expr")
Passed sanity check: int_exp_of_neg_exp 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{Z}}~\left[\forall_{a, b \in \mathbb{C}~|~a \neq 0}~\left((a^{-b})^{n} = a^{-\left(b \cdot n\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: 7
operand: 2
1ExprTuple2
2Lambdaparameter: 47
body: 4
3ExprTuple47
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 10
6Operationoperator: 28
operands: 9
7Literal
8ExprTuple10
9ExprTuple47, 11
10Lambdaparameters: 12
body: 13
11Literal
12ExprTuple39, 46
13Conditionalvalue: 14
condition: 15
14Operationoperator: 16
operands: 17
15Operationoperator: 18
operands: 19
16Literal
17ExprTuple20, 21
18Literal
19ExprTuple22, 23, 24
20Operationoperator: 36
operands: 25
21Operationoperator: 36
operands: 26
22Operationoperator: 28
operands: 27
23Operationoperator: 28
operands: 29
24Operationoperator: 30
operands: 31
25ExprTuple32, 47
26ExprTuple39, 33
27ExprTuple39, 34
28Literal
29ExprTuple46, 34
30Literal
31ExprTuple39, 35
32Operationoperator: 36
operands: 37
33Operationoperator: 42
operand: 41
34Literal
35Literal
36Literal
37ExprTuple39, 40
38ExprTuple41
39Variable
40Operationoperator: 42
operand: 46
41Operationoperator: 44
operands: 45
42Literal
43ExprTuple46
44Literal
45ExprTuple46, 47
46Variable
47Variable