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.numbers.division import neg_frac_neg_denominator_gen
In [2]:
# check that the built expression is the same as the stored expression
assert neg_frac_neg_denominator_gen.expr == stored_expr
assert neg_frac_neg_denominator_gen.expr._style_id == stored_expr._style_id
print("Passed sanity check: neg_frac_neg_denominator_gen matches stored_expr")
Passed sanity check: neg_frac_neg_denominator_gen matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{m, n}~\left[\forall_{w_{1}, w_{2}, \ldots, w_{m}, x, y, z_{1}, z_{2}, \ldots, z_{n} \in \mathbb{C}~|~y \neq 0,\left(w_{1} \neq 0\right), \left(w_{2} \neq 0\right), \ldots, \left(w_{m} \neq 0\right),\left(z_{1} \neq 0\right), \left(z_{2} \neq 0\right), \ldots, \left(z_{n} \neq 0\right)}~\left(\frac{x}{w_{1} \cdot  w_{2} \cdot  \ldots \cdot  w_{m} \cdot \left(-y\right)\cdot z_{1} \cdot  z_{2} \cdot  \ldots \cdot  z_{n}} = \left(-\frac{x}{w_{1} \cdot  w_{2} \cdot  \ldots \cdot  w_{m} \cdot y\cdot z_{1} \cdot  z_{2} \cdot  \ldots \cdot  z_{n}}\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: 5
operand: 2
1ExprTuple2
2Lambdaparameters: 3
body: 4
3ExprTuple62, 65
4Operationoperator: 5
operand: 7
5Literal
6ExprTuple7
7Lambdaparameters: 8
body: 9
8ExprTuple58, 50, 59, 60
9Conditionalvalue: 10
condition: 11
10Operationoperator: 12
operands: 13
11Operationoperator: 14
operands: 15
12Literal
13ExprTuple16, 17
14Literal
15ExprTuple18, 19, 20, 21, 22, 23, 24
16Operationoperator: 41
operands: 25
17Operationoperator: 54
operand: 35
18ExprRangelambda_map: 27
start_index: 64
end_index: 62
19Operationoperator: 44
operands: 28
20Operationoperator: 44
operands: 29
21ExprRangelambda_map: 30
start_index: 64
end_index: 65
22Operationoperator: 47
operands: 31
23ExprRangelambda_map: 32
start_index: 64
end_index: 62
24ExprRangelambda_map: 33
start_index: 64
end_index: 65
25ExprTuple50, 34
26ExprTuple35
27Lambdaparameter: 71
body: 36
28ExprTuple50, 52
29ExprTuple59, 52
30Lambdaparameter: 71
body: 37
31ExprTuple59, 53
32Lambdaparameter: 71
body: 38
33Lambdaparameter: 71
body: 39
34Operationoperator: 56
operands: 40
35Operationoperator: 41
operands: 42
36Operationoperator: 44
operands: 43
37Operationoperator: 44
operands: 45
38Operationoperator: 47
operands: 46
39Operationoperator: 47
operands: 48
40ExprTuple58, 49, 60
41Literal
42ExprTuple50, 51
43ExprTuple66, 52
44Literal
45ExprTuple67, 52
46ExprTuple66, 53
47Literal
48ExprTuple67, 53
49Operationoperator: 54
operand: 59
50Variable
51Operationoperator: 56
operands: 57
52Literal
53Literal
54Literal
55ExprTuple59
56Literal
57ExprTuple58, 59, 60
58ExprRangelambda_map: 61
start_index: 64
end_index: 62
59Variable
60ExprRangelambda_map: 63
start_index: 64
end_index: 65
61Lambdaparameter: 71
body: 66
62Variable
63Lambdaparameter: 71
body: 67
64Literal
65Variable
66IndexedVarvariable: 68
index: 71
67IndexedVarvariable: 69
index: 71
68Variable
69Variable
70ExprTuple71
71Variable