Skip to content

Conversation

@Marvin-Beckmann
Copy link
Member

@Marvin-Beckmann Marvin-Beckmann commented Jan 15, 2026

Description

Previously, our ModulusPolynomialRingZq reduce used the fq_reduce from FLINT. However, the fq objects from FLINT do not support arbitrary moduli and only irreducible polynomials (in general).
In the few special cases that were important for our usecases this never occured, as we have mostly sparse polynomials and the sparse reduce works without the irreducible property.
Gennerally, this meant that the error was unnoticed.

This PR introduces its own sparse reduce function without use of FLINTs function. This removes the underlying dependency to FLINT. The method allows any modulus and any context polynomial (assuming it is monic).

Testing

  • I kept all the previous tests

Checklist:

  • I have performed a self-review of my own code
    • The code provides good readability and maintainability s.t. it fulfills best practices like talking code, modularity, ...
      • The chosen implementation is not more complex than it has to be
    • My code should work as intended and no side effects occur (e.g. memory leaks)
    • The doc comments fit our style guide
    • I have credited related sources if needed

@Marvin-Beckmann Marvin-Beckmann self-assigned this Jan 15, 2026
@Marvin-Beckmann Marvin-Beckmann added the bug🐛 Something isn't working label Jan 15, 2026
@Marvin-Beckmann Marvin-Beckmann marked this pull request as ready for review January 15, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants