Skip to content

weak_popov_form incorrectly returns zero matrix when using ordered=True and include_zero_vectors=False #41278

@vincentmacri

Description

@vincentmacri

Steps To Reproduce

As described in the title.

Expected Behavior

R.<x> = GF(3)[]
A = matrix(R, [[x^3 + x, 0, 0], [2*x^2, x, 0], [x, 0, x], [x^2 + 1, x^2 + 1, 0], [2*x + 2, 2*x + 2, x], [x^2 + x + 1, x^2 + 2*x + 1, 2*x^3 + 2*x^2], [0, 0, x^2 + 1], [x^2 + x, x^2 + 2*x, 2*x^3 + 2*x^2 + 2*x + 2], [2*x^4 + x^3 + 2*x^2 + 2, 2*x^4 + x^2 + 2, x^5 + 2*x^4 + x^3 + x^2 + 2*x + 1]])

print(A.weak_popov_form(ordered=True))  # This is fine
# [x + 2     2     2]
# [    0   2*x     1]
# [    x     0     x]
# [    0     0     0]
# [    0     0     0]
# [    0     0     0]
# [    0     0     0]
# [    0     0     0]
# [    0     0     0]

A.weak_popov_form(ordered=True, include_zero_vectors=False)  # This should just give the first three rows of the previous calculation

Actual Behavior

A.weak_popov_form(ordered=True, include_zero_vectors=False)  # Sage incorrectly returns a zero matrix
# [    0     0     0]
# [    0     0     0]
# [    0     0     0]

Additional Information

include_zero_vectors works fine if not using ordered=True:

A.weak_popov_form(include_zero_vectors=False)

# [    0   2*x     1]
# [    x     0     x]
# [x + 2     2     2]

Environment

  • OS: Fedora 42
  • Sage Version: Tested on both Sage 10.7 and develop

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions