Skip to content

Introduce integer matrices and kernel bases - #452

Open
Parsnip37 wants to merge 2 commits into
flintlib:mainfrom
Parsnip37:docs/integer-kernel-bases
Open

Parsnip37 wants to merge 2 commits into
flintlib:mainfrom
Parsnip37:docs/integer-kernel-bases

Conversation

@Parsnip37

@Parsnip37 Parsnip37 commented Nov 21, 2026 •

Copy link
Copy Markdown

Introduce fmpz_mat as a dense matrix over Z before discussing individual methods. Explain construction from rows or row-major entries, zero matrices, dimensions and zero-based indexing. Worked examples distinguish integer scaling from matrix multiplication and show transpose, determinant and rank over Q.

Then explain that nullspace() returns integer vectors forming a basis over Q, which need not generate every integer solution. In the existing documented example, v = (1, -2, 1, 0, 0)^T is in the kernel, while every entry of the displayed nullspace matrix is divisible by five. Give the HNF construction of an integer kernel basis, with a proof using the unimodular transformation, and explain why LLL cannot enlarge the integer span. The HNF snippet explicitly constructs the displayed matrix.

The field and lattice distinction is already stated in FLINT's nullspace contract and lattice guide. Only doc/source/fmpz_mat.rst changes; existing API examples and implementation are preserved.

Validation: fresh full baseline and revised Sphinx HTML renders both generated HTML and exited 1 with the same existing definition-list warning in flint.types._gr.gr_ctx.factor. Both used -b html -W --keep-going -E -a with the repository configuration. This is not a clean strict build. The generated text, mathematical markup and API link targets were inspected from disk. Autodoc imported the published python-flint 0.9.0 binary; the native checkout was not rebuilt. Displayed arithmetic was derived by hand and formatting was inspected in source. No local software test suites, doctests, matrix-method calls or example programs were run.

@oscarbenjamin

Copy link
Copy Markdown
Collaborator

It doesn't really make sense to add this when there's basically no existing documentation there. There should be a basic explanation of fmpz_mat and how to use it before having any detailed explanation of particular methods.

@Parsnip37 Parsnip37 changed the title Explain rational and integer matrix kernels Introduce integer matrices and kernel bases Nov 23, 2026

This branch has not been deployed

No deployments
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.

2 participants