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.logic.booleans.conjunction import redundant_conjunction_general
In [2]:
# check that the built expression is the same as the stored expression
assert redundant_conjunction_general.expr == stored_expr
assert redundant_conjunction_general.expr._style_id == stored_expr._style_id
print("Passed sanity check: redundant_conjunction_general matches stored_expr")
Passed sanity check: redundant_conjunction_general 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{Z}}~\left[\forall_{A~|~A, i \leq \left(j + 1\right)}~\left(A \land  A \land  ..\left(j - i - 2\right) \times.. \land  A\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: 7
operand: 2
1ExprTuple2
2Lambdaparameters: 3
body: 4
3ExprTuple31, 36
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 10
6Operationoperator: 22
operands: 9
7Literal
8ExprTuple10
9ExprTuple11, 12
10Lambdaparameter: 30
body: 14
11Operationoperator: 16
operands: 15
12Operationoperator: 16
operands: 17
13ExprTuple30
14Conditionalvalue: 18
condition: 19
15ExprTuple31, 20
16Literal
17ExprTuple36, 20
18Operationoperator: 22
operands: 21
19Operationoperator: 22
operands: 23
20Literal
21ExprTuple24
22Literal
23ExprTuple30, 25
24ExprRangelambda_map: 26
start_index: 31
end_index: 36
25Operationoperator: 27
operands: 28
26Lambdaparameter: 33
body: 30
27Literal
28ExprTuple31, 32
29ExprTuple33
30Variable
31Variable
32Operationoperator: 34
operands: 35
33Variable
34Literal
35ExprTuple36, 37
36Variable
37Literal