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 unique_int_in_interval
In [2]:
# check that the built expression is the same as the stored expression
assert unique_int_in_interval.expr == stored_expr
assert unique_int_in_interval.expr._style_id == stored_expr._style_id
print("Passed sanity check: unique_int_in_interval matches stored_expr")
Passed sanity check: unique_int_in_interval matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{a \in \mathbb{R}^+, b \in \mathbb{R}^+, x \in \mathbb{Z}, y \in \mathbb{Z}~|~a \leq 1, b \leq 1}~\left(\left(y \in \left(x - a,x + b\right)\right) \Rightarrow \left(y = x\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: 1
operand: 3
1Literal
2ExprTuple3
3Lambdaparameters: 4
body: 5
4ExprTuple48, 45, 44, 33
5Conditionalvalue: 6
condition: 7
6Operationoperator: 8
operands: 9
7Operationoperator: 10
operands: 11
8Literal
9ExprTuple12, 13
10Literal
11ExprTuple14, 15, 16, 17, 18, 19
12Operationoperator: 26
operands: 20
13Operationoperator: 21
operands: 22
14Operationoperator: 26
operands: 23
15Operationoperator: 26
operands: 24
16Operationoperator: 26
operands: 25
17Operationoperator: 26
operands: 27
18Operationoperator: 29
operands: 28
19Operationoperator: 29
operands: 30
20ExprTuple33, 31
21Literal
22ExprTuple33, 44
23ExprTuple48, 32
24ExprTuple45, 32
25ExprTuple44, 34
26Literal
27ExprTuple33, 34
28ExprTuple48, 35
29Literal
30ExprTuple45, 35
31Operationoperator: 36
operands: 37
32Literal
33Variable
34Literal
35Literal
36Literal
37ExprTuple38, 39
38Operationoperator: 41
operands: 40
39Operationoperator: 41
operands: 42
40ExprTuple44, 43
41Literal
42ExprTuple44, 45
43Operationoperator: 46
operand: 48
44Variable
45Variable
46Literal
47ExprTuple48
48Variable