logo

Expression of type NotEquals

from the theory of proveit.physics.quantum.circuits

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.core_expr_types.expr_arrays import A11_to_Akl_varray, B11_to_Bkl_varray
from proveit.logic import NotEquals
In [2]:
# build up the expression from sub-expressions
expr = NotEquals(A11_to_Akl_varray, B11_to_Bkl_varray)
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(\begin{array}{cccc} 
 A_{1, 1} & A_{2, 1} & \cdots & A_{k, 1} \\
A_{1, 2} & A_{2, 2} & \cdots & A_{k, 2} \\
\vdots & \vdots & \ddots & \vdots \\
A_{1, l} & A_{2, l} & \cdots & A_{k, l} \\
\end{array}
\right) \neq \left(\begin{array}{cccc} 
 B_{1, 1} & B_{2, 1} & \cdots & B_{k, 1} \\
B_{1, 2} & B_{2, 2} & \cdots & B_{k, 2} \\
\vdots & \vdots & \ddots & \vdots \\
B_{1, l} & B_{2, l} & \cdots & B_{k, l} \\
\end{array}
\right)
In [5]:
stored_expr.style_options()
namedescriptiondefaultcurrent valuerelated methods
operation'infix' or 'function' style formattinginfixinfix
wrap_positionsposition(s) at which wrapping is to occur; '2 n - 1' is after the nth operand, '2 n' is after the nth operation.()()('with_wrapping_at', 'with_wrap_before_operator', 'with_wrap_after_operator', 'without_wrapping', 'wrap_positions')
justificationif any wrap positions are set, justify to the 'left', 'center', or 'right'centercenter('with_justification',)
directionDirection of the relation (normal or reversed)normalnormal('with_direction_reversed', 'is_reversed')
In [6]:
# display the expression information
stored_expr.expr_info()
 core typesub-expressionsexpression
0Operationoperator: 1
operands: 2
1Literal
2ExprTuple3, 4
3ExprTuple5
4ExprTuple6
5ExprRangelambda_map: 7
start_index: 17
end_index: 9
6ExprRangelambda_map: 8
start_index: 17
end_index: 9
7Lambdaparameter: 25
body: 10
8Lambdaparameter: 25
body: 12
9Variable
10ExprTuple13
11ExprTuple25
12ExprTuple14
13ExprRangelambda_map: 15
start_index: 17
end_index: 18
14ExprRangelambda_map: 16
start_index: 17
end_index: 18
15Lambdaparameter: 26
body: 19
16Lambdaparameter: 26
body: 21
17Literal
18Variable
19IndexedVarvariable: 22
indices: 24
20ExprTuple26
21IndexedVarvariable: 23
indices: 24
22Variable
23Variable
24ExprTuple25, 26
25Variable
26Variable