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.number_sets.real_numbers import rescale_interval_oc_membership
In [2]:
# check that the built expression is the same as the stored expression
assert rescale_interval_oc_membership.expr == stored_expr
assert rescale_interval_oc_membership.expr._style_id == stored_expr._style_id
print("Passed sanity check: rescale_interval_oc_membership matches stored_expr")
Passed sanity check: rescale_interval_oc_membership matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{a, b, c \in \mathbb{R}}~\left[\forall_{x \in \left(a,b\right]}~\left(\left(c \cdot x\right) \in \left(c \cdot a,c \cdot b\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
2Lambdaparameters: 3
body: 4
3ExprTuple39, 41, 40
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 11
6Operationoperator: 9
operands: 10
7Literal
8ExprTuple11
9Literal
10ExprTuple12, 13, 14
11Lambdaparameter: 33
body: 16
12Operationoperator: 24
operands: 17
13Operationoperator: 24
operands: 18
14Operationoperator: 24
operands: 19
15ExprTuple33
16Conditionalvalue: 20
condition: 21
17ExprTuple39, 22
18ExprTuple41, 22
19ExprTuple40, 22
20Operationoperator: 24
operands: 23
21Operationoperator: 24
operands: 25
22Literal
23ExprTuple26, 27
24Literal
25ExprTuple33, 28
26Operationoperator: 37
operands: 29
27Operationoperator: 31
operands: 30
28Operationoperator: 31
operands: 32
29ExprTuple40, 33
30ExprTuple34, 35
31Literal
32ExprTuple39, 41
33Variable
34Operationoperator: 37
operands: 36
35Operationoperator: 37
operands: 38
36ExprTuple40, 39
37Literal
38ExprTuple40, 41
39Variable
40Variable
41Variable