Hi,
I think sometimes matrices over QQbar give erroneous results (sorry for the messy example, if I try to simplify it the problem disappears):
R.<y> = QQ[]
v1 = QQbar.polynomial_root(AA.common_polynomial(y^2 + 1), CIF(RIF(RR(0)), RIF(-RR(1))))
v2 = QQbar.polynomial_root(AA.common_polynomial(y^2 + 1), CIF(RIF(RR(0)), RIF(RR(1))))
v3 = 4*v2
v4 = AA.polynomial_root(AA.common_polynomial(y^2 - 2), RIF(-RR(1.4142135623730951), -RR(1.4142135623730949)))
v5 = AA.polynomial_root(AA.common_polynomial(y^2 - 2), RIF(RR(1.4142135623730949), RR(1.4142135623730951)))
v6 = QQbar.polynomial_root(AA.common_polynomial(y^2 + 16), CIF(RIF(RR(0)), RIF(-RR(4))))
v7 = v6*v6
v8 = QQbar.polynomial_root(AA.common_polynomial(y^2 + 1), CIF(RIF(RR(0)), RIF(RR(1))))
M = matrix(QQbar, [[0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [-4, 2*v1, 1, 64, -32*v1, -16, 8*v1, 4, -2*v1, -1], [4*v1, 1, 0, -192*v1, -80, 32*v1, 12, -4*v1, -1, 0], [2, 0, 0, -480, 160*v1, 48, -12*v1, -2, 0, 0], [-4, 2*v2, 1, 64, -32*v2, -16, 8*v2, 4, -2*v2, -1], [v3, 1, 0, -192*v2, -80, 32*v2, 12, -v3, -1, 0], [2, 0, 0, -480, 160*v2, 48, -12*v2, -2, 0, 0], [0, 0, 0, 8, QQbar(4*v4), 4, QQbar(2*v4), 2, QQbar(AA.polynomial_root(AA.common_polynomial(y^2 - 2), RIF(-RR(1.4142135623730951), -RR(1.4142135623730949)))), 1], [0, 0, 0, QQbar(24*v4), 20, QQbar(8*v4), 6, QQbar(2*v4), 1, 0], [0, 0, 0, 8, QQbar(4*v5), 4, QQbar(2*v5), 2, QQbar(AA.polynomial_root(AA.common_polynomial(y^2 - 2), RIF(RR(1.4142135623730949), RR(1.4142135623730951)))), 1], [0, 0, 0, QQbar(24*v5), 20, QQbar(8*v5), 6, QQbar(2*v5), 1, 0], [0, 0, 0, v7*v7*v7, v7*v7*v6, v7*v7, v6*v6*v6, v6*v6, v6, 1], [0, 0, 0, -4096, 1024*v8, 256, -64*v8, -16, 4*v8, 1]])
With this matrix I get:
sage: M.right_kernel_matrix()
[]
but in fact the right kernel is generated by:
sage: v = Matrix(QQbar, 10, 1, [-108, 0, 0, 1, 0, 12, 0, -60, 0, 64])
sage: M * v == 0
True
This is with SageMath version 10.3 using Python 3.11.1 on Ubuntu 22.04.4.
Best regards,
Håkan Granath