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.numerals.decimals import sorted_digits
In [2]:
# check that the built expression is the same as the stored expression
assert sorted_digits.expr == stored_expr
assert sorted_digits.expr._style_id == stored_expr._style_id
print("Passed sanity check: sorted_digits matches stored_expr")
Passed sanity check: sorted_digits matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
0 < 1 < 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9
In [4]:
stored_expr.style_options()
namedescriptiondefaultcurrent valuerelated methods
operation'infix' or 'function' style formattinginfixinfix
wrap_positionsposition(s) at which wrapping is to occur; '2 n - 1' is after the nth operand, '2 n' is after the nth operation.()()('with_wrapping_at', 'with_wrap_before_operator', 'with_wrap_after_operator', 'without_wrapping', 'wrap_positions')
justificationif any wrap positions are set, justify to the 'left', 'center', or 'right'centercenter('with_justification',)
as_total_orderingWhen 'True', style the conjunction as a total ordering (e.g. x < y < z from (x < y) and (y < z))NoneTrue('with_total_ordering_style',)
In [5]:
# display the expression information
stored_expr.expr_info()
 core typesub-expressionsexpression
0Operationoperator: 1
operands: 2
1Literal
2ExprTuple3, 4, 5, 6, 7, 8, 9, 10, 11
3Operationoperator: 20
operands: 12
4Operationoperator: 20
operands: 13
5Operationoperator: 20
operands: 14
6Operationoperator: 20
operands: 15
7Operationoperator: 20
operands: 16
8Operationoperator: 20
operands: 17
9Operationoperator: 20
operands: 18
10Operationoperator: 20
operands: 19
11Operationoperator: 20
operands: 21
12ExprTuple22, 23
13ExprTuple23, 24
14ExprTuple24, 25
15ExprTuple25, 26
16ExprTuple26, 27
17ExprTuple27, 28
18ExprTuple28, 29
19ExprTuple29, 30
20Literal
21ExprTuple30, 31
22Literal
23Literal
24Literal
25Literal
26Literal
27Literal
28Literal
29Literal
30Literal
31Literal