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.linear_algebra.inner_products import left_polar_decomposition
In [2]:
# check that the built expression is the same as the stored expression
assert left_polar_decomposition.expr == stored_expr
assert left_polar_decomposition.expr._style_id == stored_expr._style_id
print("Passed sanity check: left_polar_decomposition matches stored_expr")
Passed sanity check: left_polar_decomposition matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{\mathcal{H} \underset{{\scriptscriptstyle c}}{\in} \textrm{HilbertSpaces}}~\left[\forall_{A \in \mathcal{L}\left(\mathcal{H}, \mathcal{H}\right)}~\left[\begin{array}{l}\exists_{U \in \mathcal{L}\left(\mathcal{H}, \mathcal{H}\right)~|~\left(U^{\dagger} \circ U\right) = I_{\mathcal{H}}}~\\
\left(A = \left(U \circ \sqrt{\left(A^{\dagger} \circ A\right)}\right)\right)\end{array}\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: 6
operand: 2
1ExprTuple2
2Lambdaparameter: 47
body: 3
3Conditionalvalue: 4
condition: 5
4Operationoperator: 6
operand: 10
5Operationoperator: 8
operands: 9
6Literal
7ExprTuple10
8Literal
9ExprTuple47, 11
10Lambdaparameter: 59
body: 12
11Literal
12Conditionalvalue: 13
condition: 14
13Operationoperator: 15
operand: 18
14Operationoperator: 29
operands: 17
15Literal
16ExprTuple18
17ExprTuple59, 34
18Lambdaparameter: 56
body: 19
19Conditionalvalue: 20
condition: 21
20Operationoperator: 31
operands: 22
21Operationoperator: 23
operands: 24
22ExprTuple59, 25
23Literal
24ExprTuple26, 27
25Operationoperator: 48
operands: 28
26Operationoperator: 29
operands: 30
27Operationoperator: 31
operands: 32
28ExprTuple56, 33
29Literal
30ExprTuple56, 34
31Literal
32ExprTuple35, 36
33Operationoperator: 37
operands: 38
34Operationoperator: 39
operands: 40
35Operationoperator: 48
operands: 41
36Operationoperator: 42
operand: 47
37Literal
38ExprTuple44, 45
39Literal
40ExprTuple47, 47
41ExprTuple46, 56
42Literal
43ExprTuple47
44Operationoperator: 48
operands: 49
45Operationoperator: 50
operands: 51
46Operationoperator: 57
operand: 56
47Variable
48Literal
49ExprTuple53, 59
50Literal
51ExprTuple54, 55
52ExprTuple56
53Operationoperator: 57
operand: 59
54Literal
55Literal
56Variable
57Literal
58ExprTuple59
59Variable