from the theory of proveit.numbers.multiplication¶

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.numbers.multiplication import weak_bound_via_factor_bound

In [2]:
# check that the built expression is the same as the stored expression
assert weak_bound_via_factor_bound.expr == stored_expr
assert weak_bound_via_factor_bound.expr._style_id == stored_expr._style_id
print("Passed sanity check: weak_bound_via_factor_bound matches stored_expr")

Passed sanity check: weak_bound_via_factor_bound matches stored_expr

In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())

\forall_{i, j \in \mathbb{N}}~\left[\forall_{x, y}~\left[\forall_{a_{1}, a_{2}, \ldots, a_{i}, b_{1}, b_{2}, \ldots, b_{j} \in \mathbb{R}^{\ge 0}~|~x \leq y}~\left(\left(a_{1} \cdot  a_{2} \cdot  \ldots \cdot  a_{i} \cdot x\cdot b_{1} \cdot  b_{2} \cdot  \ldots \cdot  b_{j}\right) \leq \left(a_{1} \cdot  a_{2} \cdot  \ldots \cdot  a_{i} \cdot y\cdot b_{1} \cdot  b_{2} \cdot  \ldots \cdot  b_{j}\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: 15
operand: 2
1ExprTuple2
2Lambdaparameters: 3
body: 4
3ExprTuple45, 48
4Conditionalvalue: 5
condition: 6
5Operationoperator: 15
operand: 9
6Operationoperator: 24
operands: 8
7ExprTuple9
8ExprTuple10, 11
9Lambdaparameters: 37
body: 12
10Operationoperator: 50
operands: 13
11Operationoperator: 50
operands: 14
12Operationoperator: 15
operand: 18
13ExprTuple45, 17
14ExprTuple48, 17
15Literal
16ExprTuple18
17Literal
18Lambdaparameters: 19
body: 20
19ExprTuple38, 39
20Conditionalvalue: 21
condition: 22
21Operationoperator: 36
operands: 23
22Operationoperator: 24
operands: 25
23ExprTuple26, 27
24Literal
25ExprTuple28, 29, 30
26Operationoperator: 32
operands: 31
27Operationoperator: 32
operands: 33
28ExprRangelambda_map: 34
start_index: 47
end_index: 45
29ExprRangelambda_map: 35
start_index: 47
end_index: 48
30Operationoperator: 36
operands: 37
31ExprTuple38, 42, 39
32Literal
33ExprTuple38, 43, 39
34Lambdaparameter: 58
body: 40
35Lambdaparameter: 58
body: 41
36Literal
37ExprTuple42, 43
38ExprRangelambda_map: 44
start_index: 47
end_index: 45
39ExprRangelambda_map: 46
start_index: 47
end_index: 48
40Operationoperator: 50
operands: 49
41Operationoperator: 50
operands: 51
42Variable
43Variable
44Lambdaparameter: 58
body: 52
45Variable
46Lambdaparameter: 58
body: 53
47Literal
48Variable
49ExprTuple52, 54
50Literal
51ExprTuple53, 54
52IndexedVarvariable: 55
index: 58
53IndexedVarvariable: 56
index: 58
54Literal
55Variable
56Variable
57ExprTuple58
58Variable