docs(fmpz_lll): document U initialisation for transformation capture#2718
Open
edgarcosta wants to merge 1 commit into
Open
docs(fmpz_lll): document U initialisation for transformation capture#2718edgarcosta wants to merge 1 commit into
edgarcosta wants to merge 1 commit into
Conversation
The LLL functions apply the row operations performed on B to U as well, accumulating the transformation into U's existing contents; they never initialise U themselves. A freshly initialised (zero) U therefore stays zero, which is surprising and was undocumented. Also note that fmpz_lll_t context objects allocate no memory, so there is no clear function to call. Reported by John Cremona on flint-devel (fmpz_lll returns U=0, May 2026).
Member
Author
|
@JohnCremona please feel free to suggest edits on the language |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LLL functions apply the row operations performed on
BtoUas well, soUmust be set to the identity matrix beforehand to capture the transformation; a freshly initialisedUis zero and stays zero. This was undocumented (the module's tests andarb_mat_spd_lll_reducecallfmpz_mat_onefirst). Reported by @JohnCremona on flint-devel: fmpz_lll returns U=0.Documents this for
fmpz_lll_d,fmpz_lll_wrapperandfmpz_lll, points the ULLL andwith_removalvariants at the same note, and records thatfmpz_lll_tallocates no memory and so has no clear function (the PS of the same thread).fmpz_mat_hnf_transformandfmpz_mat_snf_transformneed no such note: they writeU(andV) entirely themselves.