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_left_shift_image_size
In [2]:
# check that the built expression is the same as the stored expression
assert complete_interval_left_shift_image_size.expr == stored_expr
assert complete_interval_left_shift_image_size.expr._style_id == stored_expr._style_id
print("Passed sanity check: complete_interval_left_shift_image_size matches stored_expr")
Passed sanity check: complete_interval_left_shift_image_size 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(c + x\right) ~\textup{mod}~ N\right\}_{x \in \{a~\ldotp \ldotp~b\}}| = N\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: 48
body: 4
3ExprTuple48
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 10
6Operationoperator: 45
operands: 9
7Literal
8ExprTuple10
9ExprTuple48, 11
10Lambdaparameters: 12
body: 13
11Literal
12ExprTuple56, 57, 54
13Conditionalvalue: 14
condition: 15
14Operationoperator: 16
operands: 17
15Operationoperator: 18
operands: 19
16Literal
17ExprTuple20, 48
18Literal
19ExprTuple21, 22, 23, 24
20Operationoperator: 36
operand: 31
21Operationoperator: 45
operands: 26
22Operationoperator: 45
operands: 27
23Operationoperator: 45
operands: 28
24Operationoperator: 29
operands: 30
25ExprTuple31
26ExprTuple56, 32
27ExprTuple57, 32
28ExprTuple54, 32
29Literal
30ExprTuple48, 33
31Operationoperator: 34
operand: 38
32Literal
33Operationoperator: 36
operand: 49
34Literal
35ExprTuple38
36Literal
37ExprTuple49
38Lambdaparameter: 55
body: 40
39ExprTuple55
40Conditionalvalue: 41
condition: 42
41Operationoperator: 43
operands: 44
42Operationoperator: 45
operands: 46
43Literal
44ExprTuple47, 48
45Literal
46ExprTuple55, 49
47Operationoperator: 50
operands: 51
48Variable
49Operationoperator: 52
operands: 53
50Literal
51ExprTuple54, 55
52Literal
53ExprTuple56, 57
54Variable
55Variable
56Variable
57Variable