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_radius_one_open_interval
In [2]:
# check that the built expression is the same as the stored expression
assert unique_int_in_radius_one_open_interval.expr == stored_expr
assert unique_int_in_radius_one_open_interval.expr._style_id == stored_expr._style_id
print("Passed sanity check: unique_int_in_radius_one_open_interval matches stored_expr")
Passed sanity check: unique_int_in_radius_one_open_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, b \in \mathbb{R}^+~|~a \leq 1, b \leq 1}~\left[\forall_{x \in \mathbb{Z}}~\left(\left(\left(x - a,x + b\right) \cap \mathbb{Z}\right) = \left\{x\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
3ExprTuple50, 47
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 11
6Operationoperator: 9
operands: 10
7Literal
8ExprTuple11
9Literal
10ExprTuple12, 13, 14, 15
11Lambdaparameter: 46
body: 16
12Operationoperator: 28
operands: 17
13Operationoperator: 28
operands: 18
14Operationoperator: 20
operands: 19
15Operationoperator: 20
operands: 21
16Conditionalvalue: 22
condition: 23
17ExprTuple50, 24
18ExprTuple47, 24
19ExprTuple50, 25
20Literal
21ExprTuple47, 25
22Operationoperator: 26
operands: 27
23Operationoperator: 28
operands: 29
24Literal
25Literal
26Literal
27ExprTuple30, 31
28Literal
29ExprTuple46, 37
30Operationoperator: 32
operands: 33
31Operationoperator: 34
operand: 46
32Literal
33ExprTuple36, 37
34Literal
35ExprTuple46
36Operationoperator: 38
operands: 39
37Literal
38Literal
39ExprTuple40, 41
40Operationoperator: 43
operands: 42
41Operationoperator: 43
operands: 44
42ExprTuple46, 45
43Literal
44ExprTuple46, 47
45Operationoperator: 48
operand: 50
46Variable
47Variable
48Literal
49ExprTuple50
50Variable