File size: 3,222 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
64
65
66
67
68
69
70
71
72
73
74
75
76
import OAI.NumberTheory.DukePrimeDegree.Arithmetic.LatticeBasis
import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex
import Mathlib.RingTheory.Discriminant

namespace OAI

/-!
# Ordered real embeddings and lattice basis matrices

An ordering of the complex embeddings of a totally real field gives the
ordered real embeddings used in the manuscript. The matrix of any full
lattice basis under these embeddings has nonzero determinant.
-/

namespace DukePrimeDegree

variable {K : Type*} [Field K] [NumberField K] [NumberField.IsTotallyReal K]
  {n : β„•}

/-- An ordering of all embeddings; total reality makes their values real. -/
abbrev EmbeddingOrder (K : Type*) [Field K] [NumberField K] (n : β„•) :=
  Fin n ≃ (K →ₐ[β„š] β„‚)

/-- The real ring embedding at one place of the ordering. -/
noncomputable def orderedRealEmbedding (Οƒ : EmbeddingOrder K n) (j : Fin n) : K β†’+* ℝ :=
  (NumberField.IsTotallyReal.complexEmbedding_isReal (Οƒ j).toRingHom).embedding

@[simp] lemma orderedRealEmbedding_complex (Οƒ : EmbeddingOrder K n)
    (j : Fin n) (x : K) : (orderedRealEmbedding Οƒ j x : β„‚) = Οƒ j x :=
  NumberField.ComplexEmbedding.IsReal.coe_embedding_apply _ _

/-- Rows are basis vectors and columns are ordered real embeddings. -/
noncomputable def realEmbeddingMatrix (b : Fin n β†’ K) (Οƒ : EmbeddingOrder K n) :
    Matrix (Fin n) (Fin n) ℝ := fun i j => orderedRealEmbedding Οƒ j (b i)

lemma realEmbeddingMatrix_complex (b : Fin n β†’ K) (Οƒ : EmbeddingOrder K n) :
    (realEmbeddingMatrix b Οƒ).map Complex.ofRealHom =
      Algebra.embeddingsMatrixReindex β„š β„‚ b Οƒ := by
  ext i j
  simp [realEmbeddingMatrix, Algebra.embeddingsMatrixReindex, Algebra.embeddingsMatrix]

/-- The field trace discriminant proves the embedded lattice basis is
linearly independent over the real numbers. -/
theorem det_realEmbeddingMatrix_ne_zero (b : Module.Basis (Fin n) β„š K)
    (Οƒ : EmbeddingOrder K n) : (realEmbeddingMatrix b Οƒ).det β‰  0 := by
  have hdisc : (algebraMap β„š β„‚) (Algebra.discr β„š b) β‰  0 := by
    intro h
    apply Algebra.discr_not_zero_of_basis β„š b
    apply (algebraMap β„š β„‚).injective
    simpa only [map_zero] using h
  have heq := Algebra.discr_eq_det_embeddingsMatrixReindex_pow_two β„š β„‚ b Οƒ
  have hdet : (Algebra.embeddingsMatrixReindex β„š β„‚ b Οƒ).det β‰  0 := by
    intro h
    apply hdisc
    rw [heq, h, zero_pow (by decide : (2 : β„•) β‰  0)]
  intro hreal
  apply hdet
  rw [← realEmbeddingMatrix_complex]
  change (Complex.ofRealHom.mapMatrix (realEmbeddingMatrix b Οƒ)).det = 0
  rw [← RingHom.map_det, hreal, map_zero]

/-- In particular this applies to the chosen integer basis of a full lattice. -/
theorem FullLattice.det_embeddingMatrix_ne_zero (M : FullLattice K)
    (Οƒ : EmbeddingOrder K (Module.finrank β„š K)) :
    (realEmbeddingMatrix (fun i => (M.integralBasis i : K)) Οƒ).det β‰  0 := by
  have h := det_realEmbeddingMatrix_ne_zero (M.rationalBasis M.integralBasis) Οƒ
  have hb : (M.rationalBasis M.integralBasis : Fin (Module.finrank β„š K) β†’ K) =
      fun i => (M.integralBasis i : K) := by
    funext i
    exact M.rationalBasis_apply M.integralBasis i
  rwa [hb] at h

end DukePrimeDegree

end OAI