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.modular import complete_interval_right_shift_image
In [2]:
# check that the built expression is the same as the stored expression
assert complete_interval_right_shift_image.expr == stored_expr
assert complete_interval_right_shift_image.expr._style_id == stored_expr._style_id
print("Passed sanity check: complete_interval_right_shift_image matches stored_expr")
Passed sanity check: complete_interval_right_shift_image matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{N \in \mathbb{N}^+}~\left[\forall_{a, b, c \in \mathbb{Z}~|~|\{a~\ldotp \ldotp~b\}| \geq N}~\left(\left\{\left(x + c\right) ~\textup{mod}~ N\right\}_{x \in \{a~\ldotp \ldotp~b\}} = \{0~\ldotp \ldotp~N - 1\}\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
2Lambdaparameter: 54
body: 4
3ExprTuple54
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 10
6Operationoperator: 49
operands: 9
7Literal
8ExprTuple10
9ExprTuple54, 11
10Lambdaparameters: 12
body: 13
11Literal
12ExprTuple63, 64, 62
13Conditionalvalue: 14
condition: 15
14Operationoperator: 16
operands: 17
15Operationoperator: 18
operands: 19
16Literal
17ExprTuple20, 21
18Literal
19ExprTuple22, 23, 24, 25
20Operationoperator: 26
operand: 34
21Operationoperator: 59
operands: 28
22Operationoperator: 49
operands: 29
23Operationoperator: 49
operands: 30
24Operationoperator: 49
operands: 31
25Operationoperator: 32
operands: 33
26Literal
27ExprTuple34
28ExprTuple35, 36
29ExprTuple63, 37
30ExprTuple64, 37
31ExprTuple62, 37
32Literal
33ExprTuple54, 38
34Lambdaparameter: 61
body: 40
35Literal
36Operationoperator: 57
operands: 41
37Literal
38Operationoperator: 42
operand: 55
39ExprTuple61
40Conditionalvalue: 44
condition: 45
41ExprTuple54, 46
42Literal
43ExprTuple55
44Operationoperator: 47
operands: 48
45Operationoperator: 49
operands: 50
46Operationoperator: 51
operand: 56
47Literal
48ExprTuple53, 54
49Literal
50ExprTuple61, 55
51Literal
52ExprTuple56
53Operationoperator: 57
operands: 58
54Variable
55Operationoperator: 59
operands: 60
56Literal
57Literal
58ExprTuple61, 62
59Literal
60ExprTuple63, 64
61Variable
62Variable
63Variable
64Variable