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.physics.quantum.algebra import matrix_singular_value_decomposition
In [2]:
# check that the built expression is the same as the stored expression
assert matrix_singular_value_decomposition.expr == stored_expr
assert matrix_singular_value_decomposition.expr._style_id == stored_expr._style_id
print("Passed sanity check: matrix_singular_value_decomposition matches stored_expr")
Passed sanity check: matrix_singular_value_decomposition matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{n \in \mathbb{N}^+}~\left[\forall_{A \in \mathbb{C}^{n \times n}}~\left[\exists_{D \in \textrm{D}\left(n\right)}~\left[\exists_{U, V \in \textrm{U}\left(n\right)}~\left(A = \left(U \thinspace D \thinspace V\right)\right)\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: 6
operand: 2
1ExprTuple2
2Lambdaparameter: 55
body: 3
3Conditionalvalue: 4
condition: 5
4Operationoperator: 6
operand: 9
5Operationoperator: 47
operands: 8
6Literal
7ExprTuple9
8ExprTuple55, 10
9Lambdaparameter: 40
body: 12
10Literal
11ExprTuple40
12Conditionalvalue: 13
condition: 14
13Operationoperator: 26
operand: 17
14Operationoperator: 47
operands: 16
15ExprTuple17
16ExprTuple40, 18
17Lambdaparameter: 49
body: 20
18Operationoperator: 21
operands: 22
19ExprTuple49
20Conditionalvalue: 23
condition: 24
21Literal
22NamedExprsfield: 25
rows: 55
columns: 55
23Operationoperator: 26
operand: 29
24Operationoperator: 47
operands: 28
25Literal
26Literal
27ExprTuple29
28ExprTuple49, 30
29Lambdaparameters: 31
body: 32
30Operationoperator: 33
operand: 55
31ExprTuple50, 51
32Conditionalvalue: 34
condition: 35
33Literal
34Operationoperator: 36
operands: 37
35Operationoperator: 38
operands: 39
36Literal
37ExprTuple40, 41
38Literal
39ExprTuple42, 43
40Variable
41Operationoperator: 44
operands: 45
42Operationoperator: 47
operands: 46
43Operationoperator: 47
operands: 48
44Literal
45ExprTuple50, 49, 51
46ExprTuple50, 52
47Literal
48ExprTuple51, 52
49Variable
50Variable
51Variable
52Operationoperator: 53
operand: 55
53Literal
54ExprTuple55
55Variable