logo

Expression of type ExprTuple

from the theory of proveit.numbers.exponentiation

In [1]:
import proveit
# Automation is not needed when building an expression:
proveit.defaults.automation = False # This will speed things up.
proveit.defaults.inline_pngs = False # Makes files smaller.
%load_expr # Load the stored expression as 'stored_expr'
# import Expression classes needed to build the expression
from proveit import ExprTuple, a, b, c, d, u, v, w, x, y, z
from proveit.logic import InSet
from proveit.numbers import Less, LessEq, Real, greater, greater_eq, one
In [2]:
# build up the expression from sub-expressions
expr = ExprTuple(greater(a, one), greater(b, one), greater(c, one), greater(d, one), InSet(a, Real), InSet(b, Real), InSet(c, Real), InSet(d, Real), InSet(u, Real), InSet(v, Real), InSet(w, Real), InSet(x, Real), InSet(y, Real), InSet(z, Real), Less(x, y), LessEq(x, z), greater(x, v), greater_eq(x, w))
expr:
In [3]:
# check that the built expression is the same as the stored expression
assert expr == stored_expr
assert expr._style_id == stored_expr._style_id
print("Passed sanity check: expr matches stored_expr")
Passed sanity check: expr matches stored_expr
In [4]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\left(a > 1, b > 1, c > 1, d > 1, a \in \mathbb{R}, b \in \mathbb{R}, c \in \mathbb{R}, d \in \mathbb{R}, u \in \mathbb{R}, v \in \mathbb{R}, w \in \mathbb{R}, x \in \mathbb{R}, y \in \mathbb{R}, z \in \mathbb{R}, x < y, x \leq z, x > v, x \geq w\right)
In [5]:
stored_expr.style_options()
namedescriptiondefaultcurrent valuerelated methods
wrap_positionsposition(s) at which wrapping is to occur; 'n' is after the nth comma.()()('with_wrapping_at',)
justificationif any wrap positions are set, justify to the 'left', 'center', or 'right'leftleft('with_justification',)
In [6]:
# display the expression information
stored_expr.expr_info()
 core typesub-expressionsexpression
0ExprTuple1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
1Operationoperator: 36
operands: 19
2Operationoperator: 36
operands: 20
3Operationoperator: 36
operands: 21
4Operationoperator: 36
operands: 22
5Operationoperator: 32
operands: 23
6Operationoperator: 32
operands: 24
7Operationoperator: 32
operands: 25
8Operationoperator: 32
operands: 26
9Operationoperator: 32
operands: 27
10Operationoperator: 32
operands: 28
11Operationoperator: 32
operands: 29
12Operationoperator: 32
operands: 30
13Operationoperator: 32
operands: 31
14Operationoperator: 32
operands: 33
15Operationoperator: 36
operands: 34
16Operationoperator: 38
operands: 35
17Operationoperator: 36
operands: 37
18Operationoperator: 38
operands: 39
19ExprTuple40, 41
20ExprTuple40, 42
21ExprTuple40, 43
22ExprTuple40, 44
23ExprTuple41, 46
24ExprTuple42, 46
25ExprTuple43, 46
26ExprTuple44, 46
27ExprTuple45, 46
28ExprTuple49, 46
29ExprTuple50, 46
30ExprTuple51, 46
31ExprTuple47, 46
32Literal
33ExprTuple48, 46
34ExprTuple51, 47
35ExprTuple51, 48
36Literal
37ExprTuple49, 51
38Literal
39ExprTuple50, 51
40Literal
41Variable
42Variable
43Variable
44Variable
45Variable
46Literal
47Variable
48Variable
49Variable
50Variable
51Variable