Ask Your Question
0

Elimination didn't find the correct ideal

asked 2024-10-30 14:21:48 +0100

cgr71 gravatar image

Hi! I'm trying to compute the polynomial relations among matrix entries:

Here is the setup:

# the following codes are from python with sagemath

a, b, c, d, e, f, g = var('a b c d e f g')
N = Matrix(SR,
   [[a, e, f, g],
    [e, b, 0, 0],
    [f, 0, c, 0],
    [g, 0, 0, d]]
)
M = N.inverse()

For the symmetric matrix N with the above zero patterns, we notice that the following relations should hold in its inverse, and indeed we verified them:

# below all passed

assert M[0, 0] * M[1, 2] * M[1, 3] - M[0, 1] ** 2 * M[2, 3] == 0
assert M[0, 1] * M[0, 2] - M[0, 0] * M[1, 2] == 0
assert M[0, 1] * M[0, 3] - M[0, 0] * M[1, 3] == 0
assert M[0, 2] * M[0, 3] - M[0, 0] * M[2, 3] == 0
assert M[0, 3] * M[1, 2] - M[0, 1] * M[2, 3] == 0
assert M[0, 2] * M[1, 3] - M[0, 1] * M[2, 3] == 0

Then, I tried to see if these relations can be found automatically by elimination:

tag_variable_names = [f'M_{i}_{j}' for i in range(4) for j in range(i, 4)]
R = PolynomialRing(QQ, tag_variable_names + ['a', 'b', 'c', 'd', 'e', 'f', 'g'])
R_gens = R.gens_dict()
param_symbolic_to_ring = {v: R_gens[str(v)] for v in [a, b, c, d, e, f, g]}

equations = []
for i in range(4):
    for j in range(i, 4):
        true_expr = M[i, j].subs(param_symbolic_to_ring)
        # this true expression is fraction of polynomials w.r.t. parameters a, b, c, ..., and can be very complicated
        # we clear the denominator as follows:
        numerator, denominator = true_expr.numerator(), true_expr.denominator()
        equations.append(R_gens[f'M_{i}_{j}'] * denominator - R(numerator))

I = R.ideal(equations)
# to get the relations among tag variables (entries of M), we eliminate the parameters
J = I.elimination_ideal(list(param_symbolic_to_ring.values()))
Ideal_M = J.change_ring(PolynomialRing(QQ, tag_variable_names))

I expect that the elimination ideal should contain the above relations. However, nothing was found:

> Ideal_M.gens()
[0]

Why does this happen? Could it be related to handling fractions during the elimination? Any insights would be appreciated!

edit retag flag offensive close merge delete

Comments

Btw, you don't need param_symbolic_to_ring, since instead of M[i, j].subs(param_symbolic_to_ring) you can simply use R.fraction_field()(M[i, j]). Also, true_expr (as you define it) is still a symbolic expression, as .subs() does not perform conversion to another ring.

Max Alekseyev gravatar imageMax Alekseyev ( 2024-10-30 16:03:56 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2024-10-30 15:49:07 +0100

rburing gravatar image

Here's a way to do the elimination properly:

R = PolynomialRing(QQ, names=['a','b','c','d','e','f','g'] + [f'm_{i}{j}' for i in range(4) for j in range(4)])
a,b,c,d,e,f,g = R.gens()[:7]
N = matrix(R,
   [[a, e, f, g],
    [e, b, 0, 0],
    [f, 0, c, 0],
    [g, 0, 0, d]]
)
M = matrix(R, 4, 4, R.gens()[7:])
I = R.ideal((M*N - identity_matrix(R,4,4)).list())
J = I.elimination_ideal([a,b,c,d,e,f,g])
J.gens()

Output:

[m_23 - m_32, m_13 - m_31, m_12 - m_21, m_03 - m_30, m_02 - m_20, m_01 - m_10, m_20*m_31 - m_10*m_32, m_21*m_30 - m_10*m_32, m_20*m_30 - m_00*m_32, m_10*m_30 - m_00*m_31, m_10*m_20 - m_00*m_21, m_00*m_21*m_31 - m_10^2*m_32]

I do not have the answer why your way didn't work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-10-30 14:21:48 +0100

Seen: 14 times

Last updated: 2 hours ago