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.trigonometry import complex_unit_circle_chord_length
In [2]:
# check that the built expression is the same as the stored expression
assert complex_unit_circle_chord_length.expr == stored_expr
assert complex_unit_circle_chord_length.expr._style_id == stored_expr._style_id
print("Passed sanity check: complex_unit_circle_chord_length matches stored_expr")
Passed sanity check: complex_unit_circle_chord_length 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}}~\left(\left|\mathsf{e}^{\mathsf{i} \cdot a} - \mathsf{e}^{\mathsf{i} \cdot b}\right| = \left(2 \cdot \sin{\frac{\left|a - b\right|}{2}}\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: 1
operand: 3
1Literal
2ExprTuple3
3Lambdaparameters: 4
body: 5
4ExprTuple51, 55
5Conditionalvalue: 6
condition: 7
6Operationoperator: 8
operands: 9
7Operationoperator: 10
operands: 11
8Literal
9ExprTuple12, 13
10Literal
11ExprTuple14, 15
12Operationoperator: 41
operand: 21
13Operationoperator: 46
operands: 17
14Operationoperator: 19
operands: 18
15Operationoperator: 19
operands: 20
16ExprTuple21
17ExprTuple37, 22
18ExprTuple51, 23
19Literal
20ExprTuple55, 23
21Operationoperator: 48
operands: 24
22Operationoperator: 25
operand: 29
23Literal
24ExprTuple27, 28
25Literal
26ExprTuple29
27Operationoperator: 39
operands: 30
28Operationoperator: 53
operand: 35
29Operationoperator: 32
operands: 33
30ExprTuple43, 34
31ExprTuple35
32Literal
33ExprTuple36, 37
34Operationoperator: 46
operands: 38
35Operationoperator: 39
operands: 40
36Operationoperator: 41
operand: 45
37Literal
38ExprTuple50, 51
39Literal
40ExprTuple43, 44
41Literal
42ExprTuple45
43Literal
44Operationoperator: 46
operands: 47
45Operationoperator: 48
operands: 49
46Literal
47ExprTuple50, 55
48Literal
49ExprTuple51, 52
50Literal
51Variable
52Operationoperator: 53
operand: 55
53Literal
54ExprTuple55
55Variable