Constructions and Conversions

SymmetricMatrix(f): RngMPolElt -> Mtrx

Given a multivariate polynomial \(f\) that is homogeneous of degree \(2\), this returns a symmetric matrix representing the same quadratic form.

GramMatrix(L): Lat -> Mtrx

The symmetric matrix giving the quadratic form on the lattice \(L\).

QuadraticForm(L): Lat -> RngMPolElt

The quadratic form associated to the lattice \(L\), as a multivariate polynomial.

QuadraticForm(M): Mtrx -> RngMPolElt

The quadratic form for a symmetric matrix \(M\), as a multivariate polynomial.

QuadraticFormWithInvariants(n, d, F, N): RngIntElt, RngElt, { RngIntElt }, RngIntElt -> AlgMatElt
QuadraticFormWithInvariants(n, d, F, N): RngIntElt, FldAlgElt, { RngOrdIdl }, [ RngIntElt ] -> AlgMatElt

Quadratic form of dimension \(n\) and determinant \(d\) that has Hasse invariants -1 at the primes in \(F\). The number of negative entries of the \(i\)-th real signature is given by \(N_i\).