I think I have found a bug.
In the code below I am trying to define a symbolic unitary matrix. In doing so, I define variables a, b, c, d - entries of the matrix. Unitary condition gives us assumptions on a, b, c, d, that I force using assume function. While trying to check if my matrix is unitary I have observed strange results.
In particular, Out[5] does not make sense, since c*conjugate(c) is always nonnegative.
+*In[1]:*+
[source, ipython2]
----
#We define variables
a, b, c, d = var('a, b, c, d')
#U is supposed to be an unitary matrix
U = matrix([[a, b], [c, d]])
M = U.H*U - identity_matrix(2)
#Assumptions on the entries of U
U_asm = [M[i][j] == 0 for i in range(2) for j in range(2)]
assume([U_asm[a] for a in [0, 1, 3]])
----
+*In[2]:*+
[source, ipython2]
----
assumptions()
----
+*Out[2]:*+
----[a*conjugate(a) + c*conjugate(c) - 1 == 0,
b*conjugate(a) + d*conjugate(c) == 0,
b*conjugate(b) + d*conjugate(d) - 1 == 0]----
+*In[3]:*+
[source, ipython2]
----
U.H*U == identity_matrix(2)
----
+*Out[3]:*+
----True----
+*In[4]:*+
[source, ipython2]
----
bool(a*conjugate(a) + c*conjugate(c) - 1 == 0)
----
+*Out[4]:*+
----False----
+*In[5]:*+
[source, ipython2]
----
a*conjugate(a) + c*conjugate(c) - 1 == 0
----
+*Out[5]:*+
----c*conjugate(c) + 8 == 0----
+*In[6]:*+
[source, ipython2]
----
version()
----
+*Out[6]:*+
----'SageMath version 9.0, Release Date: 2020-01-01'----
---------------------------------------
My system is: Arch Linux
My architecture is: 64 bit.