Skip to content

Add LazyMatrix and LinearQuotientBasis - #93

Merged
blegat merged 3 commits into
mainfrom
bl/macaulay
Nov 19, 2026
Merged

blegat merged 3 commits into
mainfrom
bl/macaulay

Conversation

@blegat

@blegat blegat commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Move the Macaulay matrix LazyMatrix from MacaulayMatrix.jl so that it can be used by SumOfSquares to reduce modulo equality constraints without depending on MacaulayMatrix.jl. The monomial bases are now SA.SubBasis.

The new QuotientBasis is the quotient of the span of a basis by the kernel of the transpose of a matrix. Its coefficients are given by the transpose of the matrix multiplied by the coefficients in the basis. With orthonormal columns, this gives a well-conditioned zero basis for the equalities obtained from the null space of a Macaulay matrix.

Closes #92

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.44444% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@a3a22bb). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/macaulay.jl 99.24% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #93   +/-   ##
=======================================
  Coverage        ?   93.84%           
=======================================
  Files           ?       15           
  Lines           ?      747           
  Branches        ?        0           
=======================================
  Hits            ?      701           
  Misses          ?       46           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Move the Macaulay matrix LazyMatrix from MacaulayMatrix.jl so that it
can be used by SumOfSquares to reduce modulo equality constraints without
depending on MacaulayMatrix.jl. The monomial bases are now SA.SubBasis.

QuotientBasis(basis, matrix) is now the quotient of the span of `basis`
by the kernel of `matrix`. The coefficients are `matrix * a` where `a`
are the coefficients in `basis` and the adjoint map is
`transpose(matrix) * c`. It used to store a divisor and call `rem` but
this is the same linear map with `matrix` the matrix of the remainders
of the elements of `basis`. With the matrix, the adjoint map is
explicit and the quotient can also be given by equations that do not
come from a Gröbner basis, e.g., the null space of a Macaulay matrix.
Sparse matrices are supported and their zeros are skipped.
The monomial type of the polynomials may not contain all the variables of
the columns, e.g., with TypedPolynomials, so the shifts could not be
stored.
@blegat
blegat merged commit 4252cfc into main Nov 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Basis whose coefficients are given by a matrix (orthonormal quotient basis)

1 participant