Number Field Lattices
Creation of Number Field Lattices
A lattice \(L\) over a number field \(K\) is a torsion-free \({\mathbb{Z}}_K\)-module contained in \(K^n\), together with an inner product having image in \(K\). Note that the inner product is not required to be positive definite. Here \(n\) is the degree (of the vector space), and the rank \(m\) of the module is referred to as the rank or dimension of the lattice. A lattice with \(m=n\) is called a full lattice.
Every such lattice admits a pseudobasis, which is an independent sequence of vectors \(\vec b_i\) and a sequence of nonzero fractional ideals \(J_i\) such that every element in \(L\) can be written as \(\sum_i a_i\vec b_i\) where \(a_i\in J_i\). A simple lattice is one for which all the \(J_i=(1)\), and lattices over principal ideal domains are always free (and can be made simple by rescaling).
A number field lattice \(L\) in Magma is specified by providing: a sequence of vectors \(S = v_1, \ldots, v_m\); an optional sequence of fractional ideals \(J_1, \ldots, J_m\); an optional inner product matrix \(M\), which can be given either on \(K^n\) or as Gram matrix on the given vectors, namely \((v,w) = v M \overline{w}^{tr}\); and an optional involution \(\cdot \mapsto \overline{\cdot}\) with respect to which the inner product is Hermitian, that is \((v,w) = \overline{(w,v)}\).
The Handbook chapter Modules over Dedekind Domains (Section Modules over Dedekind Domains), is closely related and functionality exists for passing to and from such modules and number field lattices.
- NumberFieldLattice(K, d): FldNum, RngIntElt -> LatNF
Gram : Mtrx Default: IdentityMatrix(K,d) Involution: FldAut Default: IdentityAutomorphism(K)
Given a number field \(K\) and a degree \(d\), create the standard lattice (with the identity as the basis). The
Gramparameter (which must be invertible) can be used to specify the bilinear form on the basis vectors. TheInvolutionparameter can be used to specify a field automorphism with respect to which the form is Hermitian.
- NumberFieldLattice(S): [ModTupFldElt] -> LatNF
InnerProduct: Mtrx Default: 0 Gram : Mtrx Default: 0 Ideals : SeqEnum Default: [] Independent : BoolElt Default: false Involution : FldAut Default: 1
Given a sequence of vectors \(S\) over a number field, return the number field lattice determined by them. The inner product matrix on the ambient space may be given, or alternatively a Gram matrix on the given vectors (a check is made if this is consistent if the vectors are dependent). In either case, the pseudoGram matrix on the resulting pseudobasis must be invertible. If neither is given, the trivial (identity) inner product is assumed. The vectors can be dependent, unless the
Independentparameter is set totrue. The bilinear form can be set to be Hermitian with respect to a given involution on the base field, specified byInvolution.The sequence of ideals can be used to specify a non-simple lattice, as indicated in the Introduction above.
Note that Magma attempts to retain the given basis vectors (unless they are dependent), and does not apply reduction (either echelonisation or LLL-reduction), as such algorithms may not be available.
- NumberFieldLattice(D): ModDed -> LatNF
Involution: FldAut Default: 1
Given a Dedekind module \(D\) over a number field, return the associated number field lattice, obtained by taking the
PseudoMatrixcontaining its pseudobasis and fractional ideals. The module must not have a denominator (essentially meaning that it was not created by a quotient construction), so that it will be torsion-free. If the resulting lattice is free, it will be written in simple form. The bilinear form can be set to be Hermitian with respect to a given involution on the base field, specified byInvolution.
- NumberFieldLattice(L): Lat -> LatNF
Convert a lattice to a
LatNFover the rationals as a number field.
- NumberFieldLatticeWithGram(F): Mtrx -> LatNF
Involution: FldAut Default: 1
Given a regular matrix \(F\) over some number field \(K\), which is Hermitian with respect to the involution
Involution, create the free standard lattice (with the identity matrix as basis matrix) and Gram matrix \(F\).
- StandardLattice(V): SpcPlr -> LatNF
- StandardLattice(V): SpcPlr -> Lat
The standard lattice in the polar space \(V\).
- LatticeWithBasis(V, B): SpcPlr, Mtrx[RngOrd] -> LatNF
- LatticeWithBasis(V, B): SpcPlr, Mtrx[FldAlg] -> LatNF
- LatticeWithBasis(V, B): SpcPlr, Mtrx[RngInt] -> Lat
- LatticeWithBasis(V, B): SpcPlr, Mtrx[FldRat] -> Lat
- LatticeWithBasis(V, B, J): SpcPlr, AlgMatElt[RngOrd], [ RngOrdFracIdl ] -> LatNF
- LatticeWithBasis(V, B, J): SpcPlr, AlgMatElt[FldAlg], [ RngOrdFracIdl ] -> LatNF
- LatticeWithBasis(V, B, J): SpcPlr, AlgMatElt[FldQuad], [ RngOrdFracIdl ] -> LatNF
- LatticeWithBasis(V, B, J): SpcPlr, AlgMatElt[RngInt], [ RngIntFracIdl ] -> Lat
- LatticeWithBasis(V, B, J): SpcPlr, AlgMatElt[RngInt], [ RngInt ] -> Lat
- LatticeWithBasis(V, B, J): SpcPlr, AlgMatElt[FldRat], [ RngIntFracIdl ] -> Lat
- LatticeWithBasis(V, B, J): SpcPlr, AlgMatElt[FldRat], [ RngInt ] -> Lat
Lattice in \(V\) with basis specified by the rows of the matrix \(B\), and coefficient ideals \(J\).
- LatticeWithPseudobasis(V, P): SpcPlr, PMat -> LatNF
A lattice \(L\) in \(V\) with pseudo-matrix \(P\).
- Lattice(V, L): SpcPlr, ModDed -> LatNF
- Lattice(V, L): SpcPlr, Lat -> Lat
The lattice in \(V\) with underlying Dedekind module \(L\).
- Module(L): LatNF -> ModDed
IP: BoolElt Default: true
The number field lattice \(L\) is turned into a Dedekind module, by taking as a pseudomatrix the lattice pseudobasis and the coefficient ideals. This requires the ambient inner product to be known, unless the
IPparameter isfalse(when the resulting module has the trivial inner product on the ambient).
- sub<L | RHS>: LatNF, Any -> LatNF, Map
Construct the sublattice \(S\) of a number field lattice \(L\) generated by \(RHS\). The right hand side can consist of (sets, sequences, tuples, and lists of) number field lattices, Dedekind modules, or elements thereof; provided the elements (or their generators) can be coerced into \(L\). The function also returns the inclusion map from \(S\) to \(L\).
- ext<L | RHS>: LatNF, Any -> LatNF, Map
Construct the lattice \(E\) generated by the number field lattice \(L\) and \(RHS\). The right hand side can consist of (sets, sequences, tuples, and lists of) number field lattices, Dedekind modules, or elements thereof; provided the elements (or their generators) can be coerced into the embedding space of \(L\). The function also returns the inclusion map from \(L\) to \(X\).
- A + B: LatNF, LatNF -> LatNF
Given two number field lattices \(A\) and \(B\) of the same degree over the same base ring, determine their join. If the pseudobasis vectors for \(A\) and \(B\) are independent, then the new lattice will have this union for its pseudobasis. The lattices must have the same inner product on the ambient space, and it must be known unless the \(K\)-span of either \(A\) and \(B\) contains the other (when the pseudoGram matrices are checked for consistency).
- A meet B: LatNF, LatNF -> LatNF
Given two number field lattices \(A\) and \(B\) having the same degree over the same base ring, determine their intersection. The lattices must have the same inner product (if known) on the ambient space. If one lattice is contained in the other, then it will be returned in its original form.
- r * L: RngElt, LatNF -> LatNF
- L * r: Lat NF, LatNF -> LatNF
- L / r: Lat NF, LatNF -> LatNF
- BasisScaling(L, r): LatNF, RngElt -> LatNF
Given a number field lattice \(L\) and a nonzero scalar \(r\) coercible into the number field, return the lattice obtained by multiplying (or dividing) the basis vectors by the scalar.
- InnerProductScaling(L, r): LatNF, RngElt -> LatNF
- ScaledLattice(L, r): LatNF, FldElt -> LatNF
Given a number field lattice \(L\) and a nonzero scalar coercible \(r\) into the number field, return the lattice obtained by multiplying the inner product matrix (or Gram matrix if not available) by the scalar.
- J * L: RngOrdFracIdl, LatNF -> LatNF
- L * J: LatNF, RngOrdFracIdl -> LatNF
- L / J: LatNF, RngOrdFracIdl -> LatNF
Given a number field lattice \(L\) and a nonzero fractional ideal \(J\), return the number field lattice obtained by multiplying/dividing all the coefficient ideals by the given ideal.
- T * L: Mtrx, LatNF -> LatNF
Given an invertible transformation matrix \(T\) of the same dimension as the given number field lattice \(L\), return the lattice obtained by the given basis transformation. In other words, return the lattice \(\{\sum_i a_i T\vec b_i : a_i\in J_i\}\). Note that \(T\) does not need to be integral.
- TJ * L: PMat, LatNF -> LatNF
Given a pseudomatrix \(TJ\) with invertible transformation matrix \(T\) and nonzero coefficient ideals \(J\), return the number field lattice obtained from number field lattice \(L\) by applying \(T\) to
L`spseudobasis and multiplying the coefficient ideals \(I_i\) of \(L\) accordingly. In other words the new lattice is \(\{\sum_i a_i T\vec b_i : a_i\in I_iJ_i\}\). Note that \(T\) does not need to be integral.
- L * T: LatNF, Mtrx -> LatNF
Given an invertible transformation matrix \(T\) of the same degree as the given number field lattice \(L\), return the lattice obtained by the given basis transformation on the ambient space. If the transformation does not map the pseudobasis span onto itself, the lattice must have an ambient inner product. Note that \(T\) does not need to be integral.
- DirectSum(A, B): LatNF, LatNF -> LatNF
Given two number field lattices \(A\) and \(B\) over the same base ring, determine their direct sum. The underlying basis vectors are retained.
- DirectSum(A): SeqEnum[LatNF] -> LatNF
Given a nonempty sequence of number field lattices \(A_1, \ldots, A_n\) over the same base ring, determine their direct sum. The underlying basis vectors are retained.
- OrthogonalComplement(L, v): LatNF, LatNFElt -> LatNF
- OrthogonalComplement(L, S): LatNF, LatNF -> LatNF
Given two number field lattices \(S\subset L\), or a vector \(v\) in a lattice \(L\), determine the orthogonal complement.
- Dual(L): LatNF -> LatNF
Given a number field lattice \(L\), return its dual, given by the pseudobasis \(G^{-1}B\) where \(B\) and \(G\) are the pseudobasis and pseudoGram matrix for \(L\), with coefficient ideals \(\overline{J}_i^{-1}\) for all \(i\). The resulting pseudoGram matrix will be \(G^{-1}\), while the inner product (if known) is preserved.
- SimpleLattice(L): LatNF -> LatNF
Given a number field lattice \(L\) all of whose coefficient ideals are principal, return the lattice obtained by multiplying the basis vectors by generators. Alternatively, if the lattice is free but not already in principal form, compute the
SteinitzFormof the Dedekind module to get principal coefficient ideals, and then proceed as above. There will always be an ambiguity with choosing generators of the principal ideals.
- ZLattice(L): LatNF -> Lat
- RestrictionOfScalarsToZ(L): LatNF -> Lat
Given a number field lattice \(L\), return its restriction of scalars to \({\mathbb{Z}}\).
- MaximalSublattices(L, p): LatNF, RngOrdIdl -> [LatNF], [RngIntElt]
- MinimalSuperlattices(L, p): LatNF, RngOrdIdl -> [LatNF], [RngIntElt]
Limit : RngIntElt Default: Infinity() AutoOrbits: BoolElt Default: false CallBack : BoolElt Default: false
Given a number field lattice \(L\) and a prime ideal \(p\), compute all sublattices (superlattices) of \(L\) of index \(p\).
If
Limitis set to some integer, the enumeration stops onceLimitlattices have been found.AutoOrbitscan be set to a subgroup \(G\) of the automorphism group of \(L\). Then only orbit representatives of the action under \(G\) are returned. A second return value then lists the sizes of the orbits. If \(L\) is totally positive definite, one can also setAutoOrbitstotrue. In this case \(G\) is taken to be the full automorphism group of \(L\). Note that the function does not check whether \(G\) is a subgroup of the automorphism group of \(L\).The optional argument
CallBackcan be set to a function \(f\) which takes two arguments \(X\) and \(S\) and returns two booleans \(k\) and \(c\). For each sub-/superlattice \(S\), the above intrinsics then call \(f\) with the list \(X\) of the previously found lattices and the lattice \(S\). If \(k\) istrue, the lattice \(S\) is kept, i.e. appended to \(X\). If \(c\) istrue, the intrinsics continue, otherwise the enumeration stops immediately. (Note that the enumeration still stops once the list \(X\) containsLimitlattices.)
- MaximalIntegralLattice(Q): Mtrx -> LatNF
Given a non-degenerate symmetric matrix, the function returns a lattice \(L\) with inner product matrix \(Q\) which is even and integral, and \(L\) is maximal with respect to this property.
- MaximalIntegralLattice(L): LatNF -> LatNF
- MaximalIntegralLattice(L): Lat -> Lat
- MaximalIntegralLattice(L, p): LatNF, RngOrdIdl -> LatNF
- MaximalIntegralLattice(L, p): Lat, RngInt -> LatNF
- MaximalIntegralLattice(L, p): Lat, RngIntElt -> LatNF
Even: BoolElt Default: false
Given an integral number field lattice \(L\), compute some maximal integral overlattice \(M\) of \(L\). If
Evenistrue, computes a maximal even overlattice \(M\).If a prime ideal \(p\) is given, then the resulting lattice \(M\) agrees with \(L\) at all places different from \(p\) and \(M_p\) is maximal integral, or maximal even integral, depending on
Even.
- MaximalIntegralLattice(V): SpcPlr -> LatNF
Even: BoolElt Default: false
Given a polar space \(V\), constructs a maximal integral lattice in \(V\). If
Evenistrue, constructs a maximal even such lattice.
- Example: Creating Number Field Lattices (ex-d20734)
Run in calculator (opens in a new tab)
We give some examples of lattice creation.
> K<s5> := NumberField(Polynomial([-5,0,1])); // Q(sqrt(5)) > L1 := NumberFieldLattice(K,3); > G := Matrix(3,3,[K | 1,2,3, 2,s5,-1, 3,-1,0]); > L2 := NumberFieldLattice(K,3 : Gram:=G); // with Gram matrix > v1 := L1![1,2,3]; > v2 := L1![K.1,-1,2]; > L3 := NumberFieldLattice([Vector(v1),Vector(v2)]); // on vectors > L4 := sub<L1|[v1,v2]>; // on LatNFElt's, same as L3 > M := Module(L3); // create the Dedekind module > L5 := NumberFieldLattice(M); // and back to the NF lattice > D := Dual(L3); > L6 := D+L3; > S := L3/K.1; // scaling > L7 := S meet D; L7; Number field lattice over Number Field with defining polynomial x^2 - 5 over the Rational Field with basis matrix [-3*s5 + 2 7 0] [ -s5 + 1 3 1] > T3 := Matrix(3,3,[K | 1,2,3, 4,5,6, K.1,-1,-2]); > L8 := L7*T3; // transform is same degree, operate on right > T2 := Matrix(2,2,[K | 1,2, K.1,-1]); > L9 := T2*L7; // lattice is 2-dim, operate on left (pseudobasis) > assert Dimension(L9) eq 2 and Degree(L9) eq 3; > DS := DirectSum(L2,L9); // 5-dimensional > assert Dimension(DS) eq 3+2; > O1 := OrthogonalComplement(L1,L3); > O2 := OrthogonalComplement(L1,v1); > O1; Number field lattice over Number Field with defining polynomial x^2 - 5 over the Rational Field with basis matrix [ 1/2*(7*s5 + 7) 1/2*(s5 + 13) 1/2*(-3*s5 - 11)] > O2; Number field lattice over Number Field with defining polynomial x^2 - 5 over the Rational Field with basis matrix [ -s5 - 1 1/2*(s5 + 1) 0] [1/2*(3*s5 + 3) 0 1/2*(-s5 - 1)]
Attributes of Number Field Lattices
- Basis(L): LatNF -> [ModTupFldElt]
- BasisMatrix(L): LatNF -> Mtrx
Given the simple number field lattice \(L\), return the basis, either as a sequence of vectors, or as a row matrix.
- LocalBasis(L, p): LatNF, RngOrdIdl -> [ ModTupFldElt ]
- LocalBasis(L, p): Lat, RngInt -> [ ModTupFldElt ]
Type: MonStgElt Default: ""
Returns a basis of a free lattice \(F\) in the quadratic space generated by \(L\) such that \(F\) agrees with \(L\) at the completion at \(p\). If
Typeis specified, it must either be"Submodule"or"Supermodule". In which case \(F\) is either a sub- or supermodule of \(L\).
- PseudoBasis(L): LatNF -> [ModTupFldElt]
- PseudoBasisMatrix(L): LatNF -> Mtrx
Given the number field lattice \(L\), return the basis of its pseudobasis, either as a sequence of vectors, or as a row matrix.
- PseudoMatrix(L): LatNF -> PMat
Given the number field lattice \(L\), return the pseudomatrix of its coefficient ideals and pseudobasis.
- CoefficientIdeals(L): LatNF -> SeqEnum
Given the number field lattice \(L\), return its coefficient ideals.
- Involution(L): LatNF -> FldAut
Given the number field lattice \(L\), return the involution with respect to which it is sesquilinear.
- Generators(L): LatNF -> SeqEnum
- GeneratorMatrix(L): LatNF -> Mtrx
Given the number field lattice \(L\), return a sequence of generators. If the lattice is simple, these are just the standard basis vectors.
- InnerProductMatrix(L): LatNF -> Mtrx
Given the number field lattice \(L\), return its inner product matrix. An error occurs if this is not known (for instance, when the Gram matrix was prescribed instead).
- AmbientSpace(L): LatNF -> SpcPlr
The ambient polar space in which the number field lattice \(L\) embeds.
- MakeAmbientInnerProduct(~L, IP): LatNF
Given the number field lattice \(L\) having no ambient inner product, attach the given matrix \(IP\) as the inner product matrix for \(L\). The matrix \(IP\) is checked to be consistent with the given pseudobasis and pseudoGram matrices.
- PseudoGramMatrix(L): LatNF -> Mtrx
Given a number field lattice \(L\), return the Gram matrix of its pseudobasis.
- GramMatrix(L, S): LatNF, [ ModTupFldElt ] -> AlgMatElt
- GramMatrix(S): [ LatNFElt ] -> AlgMatElt
Half: BoolElt Default: false
Given a number field lattice \(L\) and a sequence \(S\) of vectors in the lattice, return the Gram matrix of these vectors. If
Halfis set totrue, scales the Gram matrix by a half.
- Rank(L): LatNF -> RngIntElt
- Dimension(L): LatNF -> RngIntElt
The rank (or dimension) of the number field lattice \(L\).
- Degree(L): LatNF -> RngIntElt
The degree (that is, dimension of the underlying ambient space) of the number field lattice \(L\).
- CoordinateRing(L): LatNF -> RngOrd
- Order(L): LatNF -> RngOrd
The order \({\mathbb{Z}}_K\) over which the number field lattice \(L\) is a module.
- Determinant(L): LatNF -> FldNumElt
The determinant of the Gram matrix of the simple number field lattice \(L\). The determinant is well-defined up to squares of units on free lattices by first applying
SimpleLatticeif necessary.
- Discriminant(L): LatNF -> RngOrdFracIdl
- Volume(L): LatNF -> RngOrdFracIdl
The volume of the number field lattice \(L\), which is the ideal generated by the determinants of all free sublattices. It is defined by \({\rm det}(G)\prod_i {\rm Nm}(J_i)\) where \(G\) is the pseudoGram matrix, \(J_i\) are the coefficient ideals, and \({\rm Nm}(I) = I \overline{I}\), where \(\cdot \mapsto \overline{\cdot}\) is the involution.
When \(L\) is quadratic of odd rank, the discriminant returns half of this quantity (the half-discriminant).
- Norm(L): LatNF -> RngOrdFracIdl
The norm of the lattice \(L\), which is the ideal generated by the norms of all lattice elements. It equals \(\sum_{i} {\rm Nm}(J_i) G_{ii} + \sum_{i,j} {\rm Tr}(J_i G_{ij} \overline{J}_j)\) where \(G\) is the pseudoGram matrix, the \(J_i\) are the coefficient ideals, and \(\cdot \mapsto \overline{\cdot}\) is the involution.
- Scale(L): LatNF -> RngOrdFracIdl
The scale of the lattice \(L\), which is the ideal generated by the inner products of pairs of lattice elements. It equals \(\sum_{i,j} J_i G_{ij} \overline{J}_j\), where \(G\) is the pseudoGram matrix, the \(J_i\) are the coefficient ideals, and \(\cdot \mapsto \overline{\cdot}\) is the involution.
- BadPrimes(L): LatNF -> Set
Even: BoolElt Default: false
The set of all maximal ideals of the base ring of \(L\) at which \(L\) is not unimodular. If
Evenis set, then the primes over \(2\) are included.
- AuxiliaryForms(L): LatNF -> [ AlgMatElt ]
Return a sequence of rational bilinear forms \(\phi_1, \ldots, \phi_d\), defined by \(\phi_i(x,y) = {\rm Tr}(a_i x, y)\), where \(a_i\) runs over a basis of the number field \(K\).
- ElementaryDivisors(A, B): LatNF, LatNF -> [ RngOrdFracIdl ]
The elementary divisors of the lattice \(A\) with respect to the lattice \(B\). These are fractional ideals \(D_1 \subseteq \ldots \subseteq D_n\) such that there exist pseudobases for \(A\) and \(B\) with the same basis vectors and coefficient ideals \(J_{B,i} = D_i J_{A,i}\).
- Discriminant(A, B): LatNF, LatNF -> RngOrdFracIdl
The discriminant of the lattice \(A\) with respect to the lattice \(B\). This is the product of the elementary divisors of \(A\) with respect to \(B\).
- JordanDecomposition(L, p): LatNF, RndOrdIdl -> List, List, SeqEnum
Given a number field lattice \(L\) over some field \(K\) and a prime ideal of \({\mathbb{Z}}_K\), a Jordan decomposition of \(L_p\) is an orthogonal decomposition of \(L_p\) into modular sublattices \(L_1,\dots,L_r\) such that the \(p\)-adic valuations of the scales of these sublattices are strictly increasing.
The first return value is a list of matrices \(B_1,\dots,B_r\) over \(K\). The row spans of these lattices over \({\mathbb{Z}}_{K_p}\) yield a Jordan decomposition of \(L_p\). The second and third return value list the Gram matrices and the \(p\)-adic valuations of the scales of the Jordan blocks respectively.
- MaximalNormSplitting(L, p): LatNF, RngOrdIdl -> SeqEnum, List
A maximal norm splitting of a number field lattice \(L\) at some prime ideal \(p\) is an orthogonal decomposition of \(L_p\) into unary and binary sublattices \(L_1,\dots,L_r\) such that \({\rm scale}(L_i) \supseteq {\rm scale}(L_{i+1})\), \({\rm norm}(L_i) \supseteq {\rm norm}(L_{i+1})\), and \({\rm norm}(L_i^\#) \subseteq {\rm norm}(L_{i+1}^\#)\) for all \(1 \le i < r\). Here \(L_i^\#\) denotes the dual of \(L_i\).
- GoodBasisOfNormGenerators(L, p): LatNF, RngOrdIdl -> SeqEnum, SeqEnum
Let \(L\) be a number field lattice and let \(p\) be some prime ideal. A basis of norm generators is a tuple of vectors \((x_1,\dots,x_n)\) such that the norm of \(x_1\) generates the norm of \(L_p\) and \((x_2,\dots,x_n)\) is a basis of norm generators for \(L \cap \langle x \rangle^\perp\). It is called good if the \(p\)-adic valuation of \((x_i,x_i)\) is no larger then the valuation of \((x_{i+2}, x_{i+2})\) for all \(1 \le i \le r-2\). Note that a basis of norm generators does not need to generate \(L_p\) but only a proper sublattice.
The function returns such a good basis of norm generators lying in \(KL\) as well as the norms of the basis vectors.
- GenusSymbol(L, p): LatNF, RngOrdIdl -> SeqEnum, Any
Uniformizer: RngElt Default:
Let \(L_1,\dots,L_r\) be a Jordan decomposition of \(L_p\).
Suppose first \(p\) does not divide \(2\). The Genus symbol of \(L_p\) is a sequence of triples \(< r_i, s_i, d_i>\) where \(r_i\) and \(s_i\) are the rank and the \(p\)-adic valuation of the scale of \(L_i\). Further, for quadratic lattices \(d_i = 1\) if and only if \(\det( \pi^{-s_i} L_i)\) is a square in \(K_p^*\) for some uniformizer \(\pi \in K\) of \(p\), otherwise \(d_i = -1\). For hermitian lattices, if the quadratic extension ramifies at \(p\) and \(s_i\) is even, \(d_i = 1\) if and only if \(\det( \pi^{-s_i} L_i)\) is a norm in \(K_p^*\), and otherwise \(d = -1\). When either \(s_i\) is odd, or the quadratic extension does not ramify, \(d_i = 0\). The genus symbol only depends on the genus of \(L\) and \(\pi\). Hence the function returns \(\pi\) as a second argument. One can also specify which uniformizer to choose with the optional argument
Uniformizer.If \(p\) divides \(2\), the functions returns the fundamental invariants of \(L_p\), see [OMe73, IX.93] for quadratic lattices, and [Jac62a] for Hermitian lattices. It is a sequence of quadruples \(< r_i, s_i, w_i, a_i>\) where \(r_i\) and \(s_i\) are as before. Further, for quadratic lattices, \(w_i\) and \(a_i\) denote the \(p\)-adic valuation of the weight and a norm generator of \(L'_i = L_1 \perp \dots \perp L_i\) respectively. For hermitian lattices, \(w_i\) denotes the \(p\)-adic valuation of the norm of \(L'_i\), and \(a_i = det(L'_i)\). Note that in this case, the genus symbol does not only depend on the genus of \(L\), but also on the chosen Jordan decomposition. Hence the function returns the sequence of Gram matrices for the lattices \(L_i\) as a second argument.
- LocalGenus(L, p): LatNF, RngOrdIdl -> SymGenLoc
Uniformizer: RngElt Default:
The local genus symbol of \(L\) at \(p\).
- Genus(L): LatNF -> SymGen
Proper: BoolElt Default: false
The genus symbol of \(L\). If
Properistrue, returns the proper genus.
- HasseInvariant(M, p): AlgMatElt, RngOrdIdl -> RngIntElt
Involution: Map Default: 1
Computes the Hasse invariant at the prime ideal \(p\) of the quadratic form given by the symmetric matrix \(M\), whose base ring must be the order of \(p\) or its number field. If
Involutionis set to a field automorphism, the form is treated as the Hermitian form defined by \(M\) and that involution.
- HasseInvariant(L, p): LatNF, RngOrdIdl -> RngIntElt
AmbientSpace: BoolElt Default: false
Computes the Hasse invariant of the quadratic space \(V\) generated by \(L\) at the maximal ideal \(p\). It is defined as a product of Hilbert symbols
\[\prod_{i<j} (a_i, a_j)_p\]where \((a_1,\dots,a_n)\) denotes some orthogonal basis of \(V\).
If
AmbientSpaceis set, the function takes \(V\) to be the ambient space of the lattice \(L\), which might have a larger rank than \(L\).
- WittInvariant(M, p): AlgMatElt, RngOrdIdl -> RngIntElt
Involution: Map Default: 1
Computes the Witt invariant at the prime ideal \(p\) of the quadratic form given by the symmetric matrix \(M\), whose base ring must be the order of \(p\) or its number field. If
Involutionis set to a field automorphism, the form is treated as the Hermitian form defined by \(M\) and that involution.
- WittInvariant(L, p): LatNF, RngOrdIdl -> RngIntElt
AmbientSpace: BoolElt Default: false
Let \(V\) be the quadratic space generated by \(L\) (or its ambient space if
AmbientSpaceis set). If the rank of \(V\) is odd (even) let \(C\) be the (even part of) the Clifford algebra of \(V\). Then \(C\) is a tensor product of quaternion algebras over \(K_p\) and thus central simple. The Witt invariant of \(L_p\) is defined to be \(+1\) is \(C\) is split and \(-1\) otherwise.
- SpinorNorm(L, p): LatNF, RngOrdIdl -> ModTupFld, Map, BoolElt
Let \(L\) be a definite number field lattice and let \(p\) be some prime ideal. The quotient \(K_p^* / (K^*)^2\) is a vector space \(V\) over \({\rm GF}(2)\). Let \(g \colon V \to K_p^* / (K^*)^2\) be an isomorphism of abelian groups. Let \(W\) be the subspace of \(V\) corresponding to the elements in \(K_p^* / (K^*)^2\) that are spinor norms of proper isometries of \(L_p\). The intrinsic returns \(W\), \(g\) as well as a boolean that is
trueif and only if \(W\) corresponds to the subgroup \(O_p^* (K_p^*)^2/ (K_p^*)^2\). Note that the full space \(V\) can be recovered asDomain\((g)\). The algorithm uses the results of M. Kneser [Kne57] and C. Beli [Bel03].
- Mass(L): LatNF -> FldRatElt
- Mass(L): Lat -> FldRatElt
- LocalFactor(L, p): LatNF, RngOrdIdl -> FldRatElt
Let \(L\) be a definite number field lattice of rank \(m\) over an extension \(E\) of some totally real number field \(K\) of degree \(n\), such that \([E:K] \le 2\). Then the genus of \(L\) decomposes into finitely many isometry classes, represented by \(L_1,\dots,L_h\) say. The mass of \(L\) is defined to be
\[{\rm Mass}(L) = \sum_{i=1}^h {1 \over \# {\rm Aut}(L_i) } .\]By Siegel’s celebrated mass formula [Sie35] and its generalization [GHY01], the mass can be expressed as
\[{\rm Mass}(L) = 2^{-n r} L(M) \tau(G) \prod_p \lambda_p(L)\]where the product runs over all maximal ideals \(p\) of the ring of integers of \(K\), \(G\) is the isometry group (orthogonal or unitary), \(r\) is the rank of \(G\), \(\tau(G)\) is its Tamagawa measure, and \(L(M)\) is a product of special values of \(L\)-functions. When \(E = K\) (the quadratic case), this reads
\[{\rm Mass}(L) = 2^{-n \lfloor {m \over 2} \rfloor} \prod_{i=1}^{\lfloor {m-1 \over 2} \rfloor } \zeta_K(1-2i) \cdot L(\chi, 1-m/2) \cdot \prod_p \lambda_p(L).\]Here \(\zeta_K\) denotes the usual Dedekind zeta function of \(K\) and \(L(\chi, x)\) is only present if \(m\) is even, and in this case it is the \(L\)-series corresponding to \(\chi\). If the discriminant \(d = (-1)^{m/2} \det(V)\) is a square, let \(\chi=1\). In all other cases, \(\chi\) is the non-trivial character of \({\rm Gal}(K(\sqrt{d})/K)\). When \(E/K\) is a quadratic extension (the hermitian case), the formula reads
\[{\rm Mass}(L) = 2^{1-nm} \prod_{i=1}^{m} L(\chi^i, 1-i) \cdot \prod_p \lambda_p(L).\]Here \(\chi\) is the non-trivial character of \({\rm Gal}(E/K)\).
The above functions return the mass of \(L\) and the local factor \(\lambda_p(L)\) respectively. The local factors are known in many but not all cases, for example:
\(\bullet\) For odd prime ideals \(p\), see W.T. Gan and J.K. Yu [GY00].
\(\bullet\) For unramified even prime ideals \(p\), see S. Cho [Cho15].
\(\bullet\) If \(L_p\) is maximal, see G. Shimura [Shi99] or W.T. Gan, J. Hanke, and J.K. Yu [GHY01].
\(\bullet\) For modular lattices, see M. Kirschmer [Kir16].
If none of the above results is applicable, a slow brute force search will be used to work out the local factors at the even prime ideals.
- Neighbours(L, p): LatNF, RngOrdIdl -> [LatNF], [RngIntElt]
Limit : RngIntElt Default: Infinity() AutoOrbits: BoolElt Default: false CallBack : BoolElt Default: false
Given a number field lattice \(L\) and some prime ideal \(p\) such that \(L_p\) is modular, compute the \(p\)-neighbours of \(L\) i.e. the set of lattices \(M\) in the space generated by \(L\) such that \(L \cap M\) has index \(p\) in both, \(M\) and \(L\).
The automorphism group of \(L\) acts on \(L\). If \(L\) is definite and
AutoOrbitsis set totrue, the algorithm will only return orbit representatives of this action and the second return value gives the lengths of these orbits.If
Limitis set to some positive integer, the algorithm stops once it has found that many neighbours.The optional argument
CallBackcan be set to a function \(f\) which takes two arguments \((X, N)\) and returns two booleans \((k, c)\). For each neighbour (or orbit representative) \(N\) the intrinsic encounters, it calls \(f\) with the list \(X\) of the previously found lattices and the lattice \(N\). If \(k\) istrue, the lattice \(N\) is kept, i.e. appended to \(X\). If \(c\) istrue, the intrinsic continues, otherwise the enumeration stops immediately. (Note that the enumeration still stops once the list \(X\) containsLimitlattices.)
- IteratedNeighbours(L, p): LatNF, RngOrdIdl -> [LatNF]
Limit : RngIntElt Default: Infinity() UseAuto: BoolElt Default: true
Computes a system of representatives of the isometry classes of all lattices that can be reached from a definite number field lattice \(L\) by repeatedly applying the \(p\)-neighbour construction. The lattice \(L_p\) must be modular.
If
UseAutois set, the algorithm will make use of the automorphism groups of the lattices it encounters.If
Limitis set to some positive integer, the algorithm stops once it has found that many isometry classes.
- GenusRepresentatives(L): LatNF -> [LatNF], Assoc
NaturalAction: BoolElt Default: true Proper : BoolElt Default: false UseAuto : BoolElt Default: true ThetaPrec : RngIntElt Default: 25 BadPrimes : BoolElt Default: true Limit : RngIntElt Default: Infinity() UseMass : BoolElt Default: true
Returns a sequence of representatives of the isometry classes in the genus of the number field lattice \(L\). If the lattice is definite, also returns an associative array whose keys are isometry invariants of the lattice (theta series with precision
ThetaPrec), and values the index in the sequence of genus representatives. The lattice \(L\) is supposed to have rank at least \(3\). IfNaturalActionis set totrue, the representatives returned lie in the same polar space as \(L\). IfProperis set totrue, returns representatives for proper isometry classes. IfUseMassis set tofalse, does not use the mass formula as a stopping condition, and compute the entire neighbour closure. IfBadPrimesis set tofalse, does not iterate over neighbors at bad primes. IfLimitis set to some integer, the algorithm stops once it has enumerated that many lattices. In the definite case, the algorithm will make use of the automorphism groups of the representatives, unlessUseAutois set tofalse.The algorithm consists of two steps:
Enumerate all isometry classes in the spinor genus of \(L\). For indefinite lattices, this step becomes void since spinor genus and isometry classes coincide thanks to Strong Approximation. In the definite case, iterated neighbours are computed at some suitable small prime ideal.
Enumerate the spinor genera in the genus of \(L\). This step is well understood in theory, see for example [OMe73, X.102]. Using a computationally more accessible variation of this description [Kir16, Lor16], the algorithm then chooses several neighbours that are known to switch spinor genera.
- Example: Attributes of Number Field Lattices (ex-58cb4b)
Run in calculator (opens in a new tab)
Here are examples of getting attributes of number field lattices.
> K := NumberField(Polynomial([5,0,1])); // Q(sqrt(-5)) > O := Integers(K); > p2 := Factorization(2*O)[1][1]; // nonprincipal > Js := [(2*O)/p2,2*O]; > v1 := Vector([K!1,0,0]); > v2 := Vector([K!0,K.1,0]); > L1 := NumberFieldLattice([v1,v2] : Ideals:=Js); > assert not IsFree(L1); // not free > assert not IsSimple(L1); // and not simple > PseudoBasisMatrix(L1); // BasisMatrix does not work [ 1 0 0] [ 0 K.1 0] > PseudoGramMatrix(L1); [ 1 0] [ 0 -5] > CoefficientIdeals(L1); [ Ideal of O Basis: [1 1] [0 2], Principal Ideal of O, Generator: [2, 0] ] > Generators(L1); // three of these, though L1 has dimension 2 [ ( -3*$.1 - 7 -2*$.1 + 50 0), ( 44*$.1 + 1100 1770*$.1 - 4130 0), ( 176*$.1 + 1628 2242*$.1 - 7080 0) ] > assert #$1 eq 3 and Dimension(L1) eq 2; > assert Degree(L1) eq 3 and Rank(L1) eq 2; > assert BaseRing(L1) eq K; > Discriminant(L1); // same as Volume Principal Ideal Generator: [-40, 0] > Norm(K.1*L1); Principal Ideal of O, Generator: [10, 0] > // now we take the direct sum of L1 with itself > // which is free, and thus we can use other intrinsics > D := DirectSum([L1,L1]); > assert IsFree(D); // D itself is not in simple form > Determinant(D); // works, as D is free 1600 > S := SimpleLattice(D); > BasisMatrix(S); // works, while for D would not [-3*K.1 - 5 -4*K.1 + 20 0 0 0 0] [12*K.1 - 84 -100*K.1 - 20 0 5*K.1 - 1 0 0] [-72*K.1 + 54 100*K.1 + 370 0 -7*K.1 - 17 -8*K.1 + 50 0] [1080*K.1 - 864 -1560*K.1 - 5520 0 108*K.1 + 252 114*K.1 - 760 0] > assert #Generators(S) eq 4; // same as the basis vectors
- NumberOfIsotropicSubspaces(L, P, k): LatNF, RngOrdIdl, RngIntElt -> RngIntElt
- NumberOfIsotropicSubspaces(L, P, k): Lat, RngInt, RngIntElt -> RngIntElt
- NumberOfIsotropicSubspaces(L, P, k): Lat, RngIntElt, RngIntElt -> RngIntElt
The number of \(k\)-dimensional isotropic subspaces of \(L_P\).
- NumberOfNeighbors(L, P, k): LatNF, RngOrdIdl, RngIntElt -> RngIntElt
- NumberOfNeighbors(L, P, k): Lat, RngInt, RngIntElt -> RngIntElt
- NumberOfNeighbors(L, P, k): Lat, RngIntElt, RngIntElt -> RngIntElt
The number of \(P^k\)-neighbour lattices for \(L\).
- NeighborProcess(L, P, k): LatNF, RngOrdIdl, RngIntElt -> NeighborProc
- NeighborProcess(L, P, k): Lat, RngInt, RngIntElt -> NeighborProc
Perestroika: BoolElt Default: false
A process for enumerating over \(P^k\)-neighbors of \(L\). If
Perestroikais set totrue, enumerates the neighbors in the sense of the Perestroika operators.
- Neighbor(nProc): NeighborProc -> LatNF
UseLLL : BoolElt Default: false Perestroika: BoolElt Default: false
A lattice which is the next neighbour in the process
nProc. IfUseLLListrue, appliesLLLto find a representative with a small Gram matrix. IfPerestroikais set totrue, returns a Perestroika neighbour.
Predicates on Number Field Lattices
- IsSimple(L): LatNF -> BoolElt
Returns
truewhen all the coefficient ideals of number field lattice \(L\) are trivial.
- IsFree(L): LatNF -> BoolElt
Returns
trueif the number field lattice \(L\) is free. Freeness is determined by determining whether the Steinitz class of the associated Dedekind module is principal.
- IsHermitian(L): LatNF -> BoolElt
Return
trueif and only if \(L\) is Hermitian with respect to a nontrivial involution.
- IsTotallyPositiveDefinite(L): LatNF -> BoolElt
Returns
trueif the number field lattice \(L\) is totally positive definite (which necessarily includes the base ring being totally real).
- IsDefinite(L): LatNF -> BoolElt, RngOrdElt
Returns
trueif the number field lattice \(L\) is definite and if so, and element \(a\) such that rescaling the inner produrct with \(a\) yields a totally positive definite lattice.
- Signature(F): Mtrx[FldAlg] -> ModTupRngElt[RngInt], ModTupRngElt[RngInt], RngIntElt
Given a symmetric matrix \(F\) over a totally real field, return the signature of \(F\), i.e. the number of positive and negative eigenvalues under each real embedding, as well as the number of zero eigenvalues.
- A eq B: LatNF, LatNF -> BoolElt
- A ne B: LatNF, LatNF -> BoolElt
Return
true(false) if the two number field lattices \(A\) and \(B\) are equal (not equal). Two number field lattices are said to be equal if they have the same degree, have compatible inner products and/or pseudoGram matrices, and are subsets of each other.
- IsIdentical(A, B): LatNF, LatNF -> BoolElt
Return
trueif the two number field lattices \(A\) and \(B\) are identical. Two number field lattices are said to be identical if they have the same degree, rank, basis matrix, Gram matrix, and inner product matrix if given.
- IsSublattice(S, L): LatNF, LatNF -> BoolElt, Mtrx
- S subset L: LatNF, LatNF -> BoolElt
Given two lattices \(S\) and \(L\) of the same degree over the same number field and with the same ambient inner product (if given), determine whether the first is a sublattice of the second.
- IsMaximal(L): LatNF -> BoolElt, LatNF
- IsMaximal(L, p): LatNF -> BoolElt, LatNF
Decide if \(L\) or \(L_p\) is maximal, i.e. no overlattice has the same norm. If not, a proper overlattice with the same norm is returned.
- IsIntegral(L): LatNF -> BoolElt
- IsIntegral(L): Lat -> BoolElt
- IsIntegral(L, p): LatNF, RngOrdIdl -> BoolElt
- IsIntegral(L, p): Lat, RngInt -> BoolElt
- IsIntegral(L, p): Lat, RngIntElt -> BoolElt
Returns
trueif \(L\) or \(L_p\) is integral, i.e. \((v, w) \in {\mathbb{Z}}_K\) for all \(v, w\) in \(L\) or \(L_p\).
- IsEven(L): LatNF -> BoolElt
Returns
trueif and only if \(L\) is even, i.e. if and only if \((v,v) \in 2 {\mathbb{Z}}_K\) for all \(v \in L\).
- IsMaximalIntegral(L): LatNF -> BoolElt, LatNF
- IsMaximalIntegral(L): Lat -> BoolElt, Lat
- IsMaximalIntegral(L, p): LatNF, RngOrdIdl -> BoolElt, LatNF
- IsMaximalIntegral(L, p): Lat, RngInt -> BoolElt, LatNF
- IsMaximalIntegral(L, p): Lat, RngIntElt -> BoolElt, Lat
Even: BoolElt Default: false
Decide (1) if the norm of \(L\) or \(L_p\) is integral and (2) if the lattice is maximal. If condition (1) holds but (2) does not, then a proper overlattice with integral norm is also returned. If
Evenistruedecides instead (1) if \(L\) or \(L_p\) is even and (2) if the lattice is maximal among even lattices.
- IsModular(L): LatNF -> BoolElt, RngOrdFracIdl
Determine whether the
Dualof the lattice \(L\) is a scaling of the original, and if so, return the scaling factor.
- IsModular(L, p): LatNF, RngOrdIdl -> BoolElt, RngIntElt
Determine if \(L_p\) is modular, i.e. the dual of \(L_p\) is equal to a scaling of \(L_p\). If so, the valuation of the scaling factor is also returned.
- IsIsotropic(L, p): LatNF, RngOrdIdl -> BoolElt
- IsIsotropic(L, p): LatNF, PlcNumElt -> BoolElt
AmbientSpace: BoolElt Default: false
Checks if the completion of \(L\) (or its ambient space) at \(p\) is isotropic.
- IsLocallyIsometric(L1, L2, p): LatNF, LatNF, RngOrdIdl -> BoolElt
CheckIsometricSpaces: BoolElt Default: true
Check if the \(p\)-adic completions of \(L_1\) and \(L_2\) are isometric. The function first checks if the lattices generate isometric ambient spaces. If this is already known to be the case one can suppress this check by setting
CheckIsometricSpacestofalse.
- IsSameGenus(L1, L2): LatNF, LatNF -> BoolElt
Check if the number field lattices \(L_1\) and \(L_2\) lie in the same genus, i.e. they are isometric locally everyhwere.
- IsRationallyEquivalent(L1, L2, p): LatNF, LatNF, RngOrdIdl -> BoolElt
- IsRationallyEquivalent(L1, L2, p): LatNF, LatNF, PlcNumElt -> BoolElt
AmbientSpace: BoolElt Default: false
Given two lattices over some number field \(K\), check if the quadratic space generated by the lattices are isometric over the completion \(K_p\).
If
AmbientSpaceis set, the function compares the ambient spaces of the lattices instead.
- IsRationallyEquivalent(L1, L2): LatNF, LatNF -> BoolElt
AmbientSpace: BoolElt Default: false
Given two lattices over some number field \(K\), check if the quadratic space generated by the lattices are isometric.
If
AmbientSpaceis set, the function compares the ambient spaces of the lattices instead.
Totally Positive Definite Lattices
There is some additional functionality for totally positive definite lattices (which are necessarily over totally real fields).
- AutomorphismGroup(L): LatNF -> GrpMat
- ProperAutomorphismGroup(L): LatNF -> GrpMat
NaturalAction: BoolElt Default: false Check : BoolElt Default: false
Given a number field lattice \(L\), determine its automorphism group (returned a matrix group which stabilizes the Gram matrix). The proper automorphisms are the ones that also preserve orientation (have determinant \(1\)). This relies on vector enumeration and can be expensive to compute.
If the
NaturalActionparameter is set, then the automorphisms returned act on the ambient space. Otherwise they act on the pseudobasis. When the rank is less than the degree, the pseudobasis will be artificially extended to full rank, and the automorphisms will fix each vector in the extended part.If
Checkistrue, then Magma checks that each automorphism group generator maps \(L\) to itself. TheRankmust be positive unlessNaturalActionistrue, in which case theDegreeof the lattice must be nonzero.
- IsIsometric(A, B): LatNF, LatNF -> BoolElt, Mtrx
- IsProperlyIsometric(A, B): LatNF, LatNF -> BoolElt, Mtrx
NaturalAction: BoolElt Default: false
Given two totally positive definite number field lattices \(A\) and \(B\) over the same (totally real) number field, determine if they are (properly) isometric. If so, also return a transformation matrix on pseudobases, unless
NaturalActionis set, in which case the transformation is on the ambient. This function can be costly to evaluate, as it relies on vector enumeration.
- IsSimilar(A, B): LatNF, LatNF -> BoolElt, Mtrx, FldNumElt
NaturalAction: BoolElt Default: false
Given two definite number field lattices \(A\) and \(B\) over the same (totally real) number field, determine if they are similar. If so, the function also returns a transformation \(T\) and a scalar \(a\) such that \(T\) induces an isometry betweem \(A\) and
InnerProductScaling(\(B\), \(a\)). As in the previous intrinsic,NaturalActiondecides if \(T\) is with respect to the pseudobases of \(A\) and \(B\) or the standard bases of the ambient spaces.
- Sphere(L, e): LatNF, RngElt -> Setq
Negatives: BoolElt Default: true
Given a definite number field lattice \(L\) and a field element \(e\), determine the set of vectors having that norm. Unless
Negativesisfalse, the returned set contains both an element and its negation.Examples of these are given in the final section of this chapter.