You can get Z^m with the bilinear form on it simply by computing the Gram 
matrix G of the pairing relative to v1,...,vm.

If your pairing is non-degenerate, the lattice you're looking for is 
Z^m/ker(G). and the bilinear form can be induced on that quotient from the 
information that you have in G already.
(you may well have to clear denominators from G in order to get sage to 
compute ker(G) for you)

If your pairing is degenerate then getting the Z^n -lattice that v1,...,vm 
span needs to use the actual embedding in V. In that case, you can just 
scale out the denominators of the coordinates of your v1,...,vm and compute 
a Hermite normal form of the resulting integer matrix. That's a scaling 
away from the actual lattice generated by v1,...,vm. Getting the Gram 
matrix on that representation is also straightforward.

These are not quite one-liners, but they do use fairly high-level linear 
algebra, so it shouldn't be too onerous to do.

Once you have the Gram matrix you can construct an "IntegralLattice" from 
that.

On Thursday, 22 January 2026 at 02:32:27 UTC-8 [email protected] 
wrote:

> If somebody could help me with the following problem I would appreciate it!
>
> Let V=QQ^n be an n-dimensional vector space over the rationals, equipped 
> with a symmetric bilinear form B (given by its evaluation on the standard 
> basis vectors of QQ^n).
>
> Assume given v1,..,vm in V. I would like to construct the IntegralLattice 
> spanned
> by the (vi)_i, equipped with the restriction of the bilinear form B. If it 
> helps: v1, ..., vm generate V.
>
> Any ideas on how to do this in a nice way?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-support/b81eb18d-b48d-4647-90ad-af71f19e36bbn%40googlegroups.com.

Reply via email to