File size: 2,299 Bytes
b3ddf75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import OAI.NumberTheory.DukePrimeDegree.Arithmetic.LatticeBasis
import OAI.NumberTheory.DukePrimeDegree.Geometry.EmbeddingMatrix
import OAI.NumberTheory.PrimePackets.PacketAlgebra

namespace OAI

/-!
# Full lattices in the existing packet model

The packet development records a chosen integer basis in its full-lattice
structure. Our finite-generation definition produces that basis. This
conversion preserves the actual submodule and multiplier order.
-/

namespace DukePrimeDegree

variable {K : Type*} [Field K] [NumberField K] {n : ℕ}

/-- Equip a full lattice with the basis expected by the packet model. -/
noncomputable def FullLattice.toPacket (M : FullLattice K)
    (hn : Module.finrank ℚ K = n) : PrimeDegreePackets.FullLattice n K where
  carrier := M.toSubmodule
  basis := M.integralBasis.reindex (finCongr hn)
  spans := M.span_eq_top

@[simp] lemma FullLattice.toPacket_carrier (M : FullLattice K)
    (hn : Module.finrank ℚ K = n) : (M.toPacket hn).carrier = M.toSubmodule := rfl

@[simp] lemma FullLattice.toPacket_multiplierOrder (M : FullLattice K)
    (hn : Module.finrank ℚ K = n) :
    PrimeDegreePackets.multiplierOrder (M.toPacket hn) =
      (multiplierOrder M.toSubmodule).toSubring.toAddSubgroup := by
  ext x
  rfl

/-- Convert the complex-embedding ordering to the real-embedding ordering
used by the row-lattice packet model. Total reality makes this bijective. -/
noncomputable def EmbeddingOrder.toRealOrder [NumberField.IsTotallyReal K]
    (σ : EmbeddingOrder K n) : PrimeDegreePackets.OrderedEmbeddings n K :=
  Equiv.ofBijective (orderedRealEmbedding σ) (by
    constructor
    · intro i j hij
      apply σ.injective
      apply AlgHom.ext
      intro x
      have h := congrArg (fun f : K →+* ℝ => (f x : ℂ)) hij
      simpa only [orderedRealEmbedding_complex] using h
    · intro τ
      let τc : K →ₐ[ℚ] ℂ := (Complex.ofRealHom.comp τ).toRatAlgHom
      obtain ⟨i, hi⟩ := σ.surjective τc
      refine ⟨i, ?_⟩
      ext x
      apply Complex.ofReal_injective
      rw [orderedRealEmbedding_complex, hi]
      rfl)

@[simp] lemma EmbeddingOrder.toRealOrder_apply [NumberField.IsTotallyReal K]
    (σ : EmbeddingOrder K n) (i : Fin n) : σ.toRealOrder i = orderedRealEmbedding σ i := rfl

end DukePrimeDegree

end OAI