Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in reduction of element modulo ideal in exterior algebra #37146

Merged
merged 4 commits into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/sage/algebras/exterior_algebra_groebner.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,30 @@ cdef class GroebnerStrategy:
0
sage: I._groebner_strategy.reduce(E.zero())
0

Check :issue:`37108` is fixed::

sage: E = ExteriorAlgebra(QQ, 6)
sage: E.inject_variables(verbose=False)
sage: gens = [-e0*e1*e2 + e0*e1*e5 - e0*e2*e3 - e0*e3*e5 + e1*e2*e3 + e1*e3*e5,
....: e1*e2 - e1*e5 + e2*e5, e0*e2 - e0*e4 + e2*e4,
....: e3*e4 - e3*e5 + e4*e5, e0*e1 - e0*e3 + e1*e3]
sage: I = E.ideal(gens)
sage: S = E.quo(I)
sage: I.reduce(e1*e3*e4*e5)
0
"""
if not f:
return f
# Make a copy to mutate
f = type(f)(f._parent, copy(f._monomial_coefficients))
for g in self.groebner_basis:
self.reduce_single(f, g)
was_reduced = True
while was_reduced:
was_reduced = False
for g in self.groebner_basis:
was_reduced = self.reduce_single(f, g)
if was_reduced:
break
return f

cdef bint reduce_single(self, CliffordAlgebraElement f, CliffordAlgebraElement g) except -1:
Expand Down
Loading