logo

Theorem closure of type Forall

from the theory of proveit.linear_algebra.addition

see dependencies

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.addition import closure
In [2]:
# check that the built expression is the same as the stored expression
assert closure.expr == stored_expr
assert closure.expr._style_id == stored_expr._style_id
print("Passed sanity check: closure matches stored_expr")
Passed sanity check: closure 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_{K}~\left[\forall_{V \underset{{\scriptscriptstyle c}}{\in} \textrm{VecSpaces}\left(K\right)}~\left[\forall_{x_{1}, x_{2}, \ldots, x_{n} \in V}~\left(\left(x_{1} +  x_{2} +  \ldots +  x_{n}\right) \in V\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: 18
operand: 2
1ExprTuple2
2Lambdaparameter: 42
body: 4
3ExprTuple42
4Conditionalvalue: 5
condition: 6
5Operationoperator: 18
operand: 9
6Operationoperator: 43
operands: 8
7ExprTuple9
8ExprTuple42, 10
9Lambdaparameter: 29
body: 11
10Literal
11Operationoperator: 18
operand: 13
12ExprTuple13
13Lambdaparameter: 46
body: 15
14ExprTuple46
15Conditionalvalue: 16
condition: 17
16Operationoperator: 18
operand: 22
17Operationoperator: 20
operands: 21
18Literal
19ExprTuple22
20Literal
21ExprTuple46, 23
22Lambdaparameters: 36
body: 24
23Operationoperator: 25
operand: 29
24Conditionalvalue: 27
condition: 28
25Literal
26ExprTuple29
27Operationoperator: 43
operands: 30
28Operationoperator: 31
operands: 32
29Variable
30ExprTuple33, 46
31Literal
32ExprTuple34
33Operationoperator: 35
operands: 36
34ExprRangelambda_map: 37
start_index: 41
end_index: 42
35Literal
36ExprTuple38
37Lambdaparameter: 49
body: 39
38ExprRangelambda_map: 40
start_index: 41
end_index: 42
39Operationoperator: 43
operands: 44
40Lambdaparameter: 49
body: 45
41Literal
42Variable
43Literal
44ExprTuple45, 46
45IndexedVarvariable: 47
index: 49
46Variable
47Variable
48ExprTuple49
49Variable