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_circle_chord_length
In [2]:
# check that the built expression is the same as the stored expression
assert complex_circle_chord_length.expr == stored_expr
assert complex_circle_chord_length.expr._style_id == stored_expr._style_id
print("Passed sanity check: complex_circle_chord_length matches stored_expr")
Passed sanity check: complex_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_{r \in \mathbb{R}^{\ge 0}}~\left[\forall_{a, b \in \mathbb{R}}~\left(\left|\left(r \cdot \mathsf{e}^{\mathsf{i} \cdot a}\right) - \left(r \cdot \mathsf{e}^{\mathsf{i} \cdot b}\right)\right| = \left(2 \cdot r \cdot \sin{\frac{\left|a - b\right|}{2}}\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: 7
operand: 2
1ExprTuple2
2Lambdaparameter: 51
body: 4
3ExprTuple51
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 10
6Operationoperator: 27
operands: 9
7Literal
8ExprTuple10
9ExprTuple51, 11
10Lambdaparameters: 12
body: 13
11Literal
12ExprTuple61, 68
13Conditionalvalue: 14
condition: 15
14Operationoperator: 16
operands: 17
15Operationoperator: 18
operands: 19
16Literal
17ExprTuple20, 21
18Literal
19ExprTuple22, 23
20Operationoperator: 48
operand: 29
21Operationoperator: 63
operands: 25
22Operationoperator: 27
operands: 26
23Operationoperator: 27
operands: 28
24ExprTuple29
25ExprTuple45, 51, 30
26ExprTuple61, 31
27Literal
28ExprTuple68, 31
29Operationoperator: 57
operands: 32
30Operationoperator: 33
operand: 37
31Literal
32ExprTuple35, 36
33Literal
34ExprTuple37
35Operationoperator: 63
operands: 38
36Operationoperator: 65
operand: 43
37Operationoperator: 40
operands: 41
38ExprTuple51, 42
39ExprTuple43
40Literal
41ExprTuple44, 45
42Operationoperator: 55
operands: 46
43Operationoperator: 63
operands: 47
44Operationoperator: 48
operand: 53
45Literal
46ExprTuple59, 50
47ExprTuple51, 52
48Literal
49ExprTuple53
50Operationoperator: 63
operands: 54
51Variable
52Operationoperator: 55
operands: 56
53Operationoperator: 57
operands: 58
54ExprTuple67, 61
55Literal
56ExprTuple59, 60
57Literal
58ExprTuple61, 62
59Literal
60Operationoperator: 63
operands: 64
61Variable
62Operationoperator: 65
operand: 68
63Literal
64ExprTuple67, 68
65Literal
66ExprTuple68
67Literal
68Variable