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 ortho_norm_basis_existence
In [2]:
# check that the built expression is the same as the stored expression
assert ortho_norm_basis_existence.expr == stored_expr
assert ortho_norm_basis_existence.expr._style_id == stored_expr._style_id
print("Passed sanity check: ortho_norm_basis_existence matches stored_expr")
Passed sanity check: ortho_norm_basis_existence matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{K}~\left[\forall_{n \in \mathbb{N}^+}~\left[\begin{array}{l}\forall_{H \underset{{\scriptscriptstyle c}}{\in} \textrm{InnerProdSpaces}\left(K\right)~|~\textrm{Dim}\left(H\right) = n}~\\
\left[\exists_{x_{1}, x_{2}, \ldots, x_{n}}~\left(\left\{x_{1}, x_{2}, \ldots, x_{n}\right\} \in \textrm{O.N.Bases}\left(H\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: 10
operand: 2
1ExprTuple2
2Lambdaparameter: 43
body: 3
3Operationoperator: 10
operand: 5
4ExprTuple5
5Lambdaparameter: 48
body: 7
6ExprTuple48
7Conditionalvalue: 8
condition: 9
8Operationoperator: 10
operand: 13
9Operationoperator: 30
operands: 12
10Literal
11ExprTuple13
12ExprTuple48, 14
13Lambdaparameter: 45
body: 15
14Literal
15Conditionalvalue: 16
condition: 17
16Operationoperator: 18
operand: 22
17Operationoperator: 20
operands: 21
18Literal
19ExprTuple22
20Literal
21ExprTuple23, 24
22Lambdaparameters: 40
body: 25
23Operationoperator: 26
operands: 27
24Operationoperator: 28
operands: 29
25Operationoperator: 30
operands: 31
26Literal
27ExprTuple45, 32
28Literal
29ExprTuple33, 48
30Literal
31ExprTuple34, 35
32Operationoperator: 36
operand: 43
33Operationoperator: 38
operand: 45
34Operationoperator: 39
operands: 40
35Operationoperator: 41
operand: 45
36Literal
37ExprTuple43
38Literal
39Literal
40ExprTuple44
41Literal
42ExprTuple45
43Variable
44ExprRangelambda_map: 46
start_index: 47
end_index: 48
45Variable
46Lambdaparameter: 52
body: 49
47Literal
48Variable
49IndexedVarvariable: 50
index: 52
50Variable
51ExprTuple52
52Variable