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 exp_even_neg_base_less
In [2]:
# check that the built expression is the same as the stored expression
assert exp_even_neg_base_less.expr == stored_expr
assert exp_even_neg_base_less.expr._style_id == stored_expr._style_id
print("Passed sanity check: exp_even_neg_base_less matches stored_expr")
Passed sanity check: exp_even_neg_base_less matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{a, x, y \in \mathbb{R}~|~x < y < 0, a = 2}~\left(y^{a} < x^{a}\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
4ExprTuple31, 36, 37
5Conditionalvalue: 6
condition: 7
6Operationoperator: 34
operands: 8
7Operationoperator: 24
operands: 9
8ExprTuple10, 11
9ExprTuple12, 13, 14, 15, 16
10Operationoperator: 18
operands: 17
11Operationoperator: 18
operands: 19
12Operationoperator: 22
operands: 20
13Operationoperator: 22
operands: 21
14Operationoperator: 22
operands: 23
15Operationoperator: 24
operands: 25
16Operationoperator: 26
operands: 27
17ExprTuple37, 31
18Literal
19ExprTuple36, 31
20ExprTuple31, 28
21ExprTuple36, 28
22Literal
23ExprTuple37, 28
24Literal
25ExprTuple29, 30
26Literal
27ExprTuple31, 32
28Literal
29Operationoperator: 34
operands: 33
30Operationoperator: 34
operands: 35
31Variable
32Literal
33ExprTuple36, 37
34Literal
35ExprTuple37, 38
36Variable
37Variable
38Literal