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_nonpos_less
In [2]:
# check that the built expression is the same as the stored expression
assert exp_nonpos_less.expr == stored_expr
assert exp_nonpos_less.expr._style_id == stored_expr._style_id
print("Passed sanity check: exp_nonpos_less matches stored_expr")
Passed sanity check: exp_nonpos_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}~|~0 < x < y, a \leq 0}~\left(y^{a} \leq 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: 26
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, 35
28Literal
29Operationoperator: 33
operands: 32
30Operationoperator: 33
operands: 34
31Variable
32ExprTuple35, 36
33Literal
34ExprTuple36, 37
35Literal
36Variable
37Variable