Skip to content

vectors in IntegralLattice compute norm incorrectly #38543

Open
@yyyyx4

Description

From here:

sage: L = IntegralLattice(matrix([[1000,0],[0,1]]))
sage: v = L.0; v
(1, 0)
sage: v.parent()
Lattice of degree 2 and rank 2 over Integer Ring
Standard basis
Inner product matrix:
[1000    0]
[   0    1]
sage: v.norm()
1
sage: v.inner_product(v)
1000

The .parent() is set to the lattice in question, and .inner_product() behaves as expected, but the .norm() computes the standard Euclidean norm. This inconsistency causes confusion and bugs.

Cc: @grhkm21

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions