Ticket #8693 (new defect)

Opened 3 years ago

QuadraticForm::basis_of_short_vectors may not return an actual basis.

Reported by: afiori Owned by: justin
Priority: major Milestone:
Component: quadratic forms Keywords: quadratic forms, basis, automorphisms
Cc: Work issues:
Report Upstream: N/A Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

QuadraticForm::basis_of_short_vectors does not actually ensure the list of vectors it returns is a basis, it only assures that it spans a full rank sub-lattice.

In particular in the following example (E8):

Q = QuadraticForm( matrix( [[2,0,0,0,0,0,0,1],
                            [0,2,1,1,1,1,1,1],
                            [0,1,2,1,1,1,1,1],
                            [0,1,1,2,1,1,1,1],
                            [0,1,1,1,2,1,1,1],
                            [0,1,1,1,1,2,1,1],
                            [0,1,1,1,1,1,2,0],
                            [1,1,1,1,1,1,0,2]] ))
B = Q.basis_of_short_vectors()
matrix(B).det()

The result is -2, which indicates we did not get a basis. Note that the above means that sage likely returns incorrect results about the automorphism groups of a number of interesting lattices. I am attaching some sample code which (once properly merged {and tested}) could be used to correct the issue.

Attachments

fix_basis.sage Download (3.4 KB) - added by afiori 3 years ago.
Sample code to correct a non-basis from basis_of_short_vectors

Change History

Changed 3 years ago by afiori

Sample code to correct a non-basis from basis_of_short_vectors

Note: See TracTickets for help on using tickets.