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 image_size_indep_of_left_shift
In [2]:
# check that the built expression is the same as the stored expression
assert image_size_indep_of_left_shift.expr == stored_expr
assert image_size_indep_of_left_shift.expr._style_id == stored_expr._style_id
print("Passed sanity check: image_size_indep_of_left_shift matches stored_expr")
Passed sanity check: image_size_indep_of_left_shift matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{L \in \mathbb{R}}~\left[\forall_{S~|~S \subseteq \mathbb{R}}~\left[\forall_{c \in \mathbb{R}}~\left(|\left\{\left(c + x\right) ~\textup{mod}~ L\right\}_{x \in S}| = |\left\{x ~\textup{mod}~ L\right\}_{x \in S}|\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: 14
operand: 2
1ExprTuple2
2Lambdaparameter: 51
body: 4
3ExprTuple51
4Conditionalvalue: 5
condition: 6
5Operationoperator: 14
operand: 9
6Operationoperator: 48
operands: 8
7ExprTuple9
8ExprTuple51, 28
9Lambdaparameter: 52
body: 11
10ExprTuple52
11Conditionalvalue: 12
condition: 13
12Operationoperator: 14
operand: 18
13Operationoperator: 16
operands: 17
14Literal
15ExprTuple18
16Literal
17ExprTuple52, 28
18Lambdaparameter: 55
body: 20
19ExprTuple55
20Conditionalvalue: 21
condition: 22
21Operationoperator: 23
operands: 24
22Operationoperator: 48
operands: 25
23Literal
24ExprTuple26, 27
25ExprTuple55, 28
26Operationoperator: 30
operand: 32
27Operationoperator: 30
operand: 33
28Literal
29ExprTuple32
30Literal
31ExprTuple33
32Operationoperator: 35
operand: 37
33Operationoperator: 35
operand: 38
34ExprTuple37
35Literal
36ExprTuple38
37Lambdaparameter: 56
body: 39
38Lambdaparameter: 56
body: 41
39Conditionalvalue: 42
condition: 44
40ExprTuple56
41Conditionalvalue: 43
condition: 44
42Operationoperator: 46
operands: 45
43Operationoperator: 46
operands: 47
44Operationoperator: 48
operands: 49
45ExprTuple50, 51
46Literal
47ExprTuple56, 51
48Literal
49ExprTuple56, 52
50Operationoperator: 53
operands: 54
51Variable
52Variable
53Literal
54ExprTuple55, 56
55Variable
56Variable