Basic constructions and operations on lattices #
In this file we provide the infrastructure for going back and forth between
K-bases of Fin 2 → K and R-lattices. Also we provide operations
on bases, such as twisting by units of K and permutations of the basis.
The main definition is Basis.toLattice which, given a basis b of Fin 2 → K constructs
the lattice spanned by the entries of b. The API is built around this definition in the following
sense: Every operation on lattices comes with API lemmas showing the interaction
with Basis.toLattice, reducing it to an operation on bases. In a general situation,
try to use the induction principle of equality (i.e. the subst tactic) to replace
arbitrary lattices with b.toLattice for a suitable basis.
Most constructions work for an arbitrary subring R of a field K.
Main definitions #
Basis.toSubmodule: Given aK-basisbofι → K, this is theR-submodule ofι → Kspanned byK. This is a lattice (toSubmodule_isLattice).Basis.toLattice:Basis.toSubmoduleas a lattice. See the docstring for more details.Basis.twist: Letfbe a tuple of integers and letϖbe a uniformizer. The twist of a basisbbyfis defined asb i ↦ ϖ.val ^ f i • b i. We provide variants forι = Fin 2and for natural exponents. Generally, try to bring all lattices in the context in the form ofb.twist hϖ ffor fixedband varyingf, in order to simplify calculations.
From a ι-indexed basis b of ι → K, we obtain an R submodule of ι → K generated by
the entries of b.
Equations
- b.toSubmodule = Submodule.span (↥R) (Set.range ⇑b)
Instances For
Given a K-basis of K^2, this is the R-lattice generated by the entries of b.
This is the normal form of a lattice in our API and for every operation on lattices
suitable simp lemmas should be provided for lattices given by Basis.toLattice.
If possible, in proofs use the induction principle of equality (i.e. the subst tactic) to
replace all occurring lattices by invocations of Basis.toLattice.
Equations
- b.toLattice = { M := b.toSubmodule, isLattice := ⋯ }
Instances For
If b is a K-basis of ι → K and f : ι → Kˣ a family of invertible elements of K,
this is the basis of ι → K obtained by multiplying i-th entry of b by f i.
Equations
- b.twist' f = Module.Basis.mk ⋯ ⋯
Instances For
Given integer exponents f and a uniformizer ϖ, we may twist a basis b by
b i ↦ ϖ.val ^ f i • b i.
Instances For
twist specialized to dimension two.
Instances For
If M is a lattice, every R-basis of M is also a K-basis of ι → K.
Equations
Instances For
If M is an R-lattice, every R-basis of M is also a K-basis of Fin 2 → K.
Equations
Instances For
If b is a K-basis of ι → K, it is naturally an R-basis of the
R-submodule generated by the entries of b.
Equations
- b.restrict = Module.Basis.mk ⋯ ⋯
Instances For
If b is a K-basis of Fin 2 → K, it is naturally an R-basis of the
R-lattice generated by the entries of b.
Equations
Instances For
Scalar multiplication by GL ι K on ι-indexed bases of ι → K.
Equations
Instances For
Equations
- Module.Basis.instSMulGeneralLinearGroupForallLeanPool = { smul := fun (g : GL ι K) (b : Module.Basis ι K (ι → K)) => Module.Basis.smulGL g b }
Equations
Given a basis b of ι → K and a permutation of the basis vectors,
this is the matrix representing the K-automorphisms induced by the permutation.
Equations
Instances For
The standard R-lattice R ⊕ R.
Equations
- Lattice.standard R = (Pi.basisFun K (Fin 2)).toLattice