-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathTotallyRealComplex.lean
More file actions
168 lines (123 loc) · 5.55 KB
/
TotallyRealComplex.lean
File metadata and controls
168 lines (123 loc) · 5.55 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/-
Copyright (c) 2022 Xavier Roblot. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Xavier Roblot
-/
import Mathlib.NumberTheory.NumberField.InfinitePlace.Ramification
/-!
# Totally real and totally complex number fields
This file defines the type of totally real and totally complex number fields.
## Main Definitions and Results
* `NumberField.IsTotallyReal`: a number field `K` is totally real if all of its infinite places
are real. In other words, the image of every ring homomorphism `K → ℂ` is a subset of `ℝ`.
* `NumberField.IsTotallyComplex`: a number field `K` is totally complex if all of its infinite
places are complex.
* `NumberField.maximalRealSubfield`: the maximal real subfield of `K`. It is totally real,
see `NumberField.isTotallyReal_maximalRealSubfield`, and contains all the other totally real
subfields of `K`, see `NumberField.IsTotallyReal.le_maximalRealSubfield`
## Tags
number field, infinite places, totally real, totally complex
-/
namespace NumberField
open InfinitePlace Module
section TotallyRealField
/-
## Totally real number fields
-/
/-- A number field `K` is totally real if all of its infinite places
are real. In other words, the image of every ring homomorphism `K → ℂ`
is a subset of `ℝ`. -/
@[mk_iff] class IsTotallyReal (K : Type*) [Field K] [NumberField K] where
isReal : ∀ v : InfinitePlace K, v.IsReal
variable {F : Type*} [Field F] [NumberField F] {K : Type*} [Field K] [NumberField K]
theorem nrComplexPlaces_eq_zero_iff :
nrComplexPlaces K = 0 ↔ IsTotallyReal K := by
simp [Fintype.card_eq_zero_iff, isEmpty_subtype, isTotallyReal_iff]
theorem IsTotallyReal.ofRingEquiv [IsTotallyReal F] (f : F ≃+* K) : IsTotallyReal K where
isReal _ := (isReal_comap_iff f).mp <| IsTotallyReal.isReal _
variable (F K) in
theorem IsTotally.of_algebra [IsTotallyReal K] [Algebra F K] : IsTotallyReal F where
isReal w := by
obtain ⟨W, rfl⟩ : ∃ W : InfinitePlace K, W.comap (algebraMap F K) = w := comap_surjective w
exact IsReal.comap _ (IsTotallyReal.isReal W)
instance [IsTotallyReal K] (F : IntermediateField ℚ K) : IsTotallyReal F :=
IsTotally.of_algebra F K
instance [IsTotallyReal K] (F : Subfield K) : IsTotallyReal F :=
IsTotally.of_algebra F K
variable (K)
@[simp]
theorem IsTotallyReal.nrComplexPlaces_eq_zero [h : IsTotallyReal K] :
nrComplexPlaces K = 0 :=
nrComplexPlaces_eq_zero_iff.mpr h
protected theorem IsTotallyReal.finrank [h : IsTotallyReal K] :
finrank ℚ K = nrRealPlaces K := by
rw [← card_add_two_mul_card_eq_rank, nrComplexPlaces_eq_zero_iff.mpr h, mul_zero, add_zero]
instance : IsTotallyReal ℚ where
isReal v := by
rw [Subsingleton.elim v Rat.infinitePlace]
exact Rat.isReal_infinitePlace
section maximalRealSubfield
open ComplexEmbedding
/--
The maximal real subfield of `K`. It is totally real,
see `NumberField.isTotallyReal_maximalRealSubfield`, and contains all the other totally real
subfields of `K`, see `NumberField.IsTotallyReal.le_maximalRealSubfield`.
-/
def maximalRealSubfield : Subfield K where
carrier := {x | ∀ φ : K →+* ℂ, star (φ x) = φ x}
mul_mem' hx hy _ := by rw [map_mul, star_mul, hx, hy, mul_comm]
one_mem' := by simp
add_mem' hx hy _ := by rw [map_add, star_add, hx, hy]
zero_mem' := by simp
neg_mem' := by simp
inv_mem' := by simp
instance isTotallyReal_maximalRealSubfield :
IsTotallyReal (maximalRealSubfield K) where
isReal w := by
rw [InfinitePlace.isReal_iff, ComplexEmbedding.isReal_iff]
ext x
rw [RingHom.star_apply, ← lift_algebraMap_apply K w.embedding]
exact x.prop _
variable {K}
theorem IsTotallyReal.le_maximalRealSubfield (E : Subfield K) [IsTotallyReal E] :
E ≤ maximalRealSubfield K := by
intro x hx φ
rw [show φ x = (φ.comp E.subtype) ⟨x, hx⟩ by rfl, RCLike.star_def, ← conjugate_coe_eq]
refine RingHom.congr_fun ?_ _
exact ComplexEmbedding.isReal_iff.mp <| isReal_mk_iff.mp <| isReal _
theorem isTotallyReal_iff_le_maximalRealSubfield {E : Subfield K} :
IsTotallyReal E ↔ E ≤ maximalRealSubfield K :=
⟨fun h ↦ h.le_maximalRealSubfield, fun h ↦ IsTotallyReal.ofRingEquiv
(RingEquiv.ofBijective _ (Subfield.inclusion h).rangeRestrictField_bijective).symm⟩
instance isTotallyReal_sup {E F : Subfield K} [IsTotallyReal E] [IsTotallyReal F] :
IsTotallyReal (E ⊔ F : Subfield K) := by
simp_all [isTotallyReal_iff_le_maximalRealSubfield]
instance isTotallyReal_iSup {ι : Type*} {k : ι → Subfield K} [∀ i, IsTotallyReal (k i)] :
IsTotallyReal (⨆ i, k i : Subfield K) := by
simp_all [isTotallyReal_iff_le_maximalRealSubfield]
end maximalRealSubfield
end TotallyRealField
section TotallyComplexField
/-
## Totally complex number fields
-/
open InfinitePlace
/--
A number field `K` is totally complex if all of its infinite places are complex.
-/
@[mk_iff] class IsTotallyComplex (K : Type*) [Field K] [NumberField K] where
isComplex : ∀ v : InfinitePlace K, v.IsComplex
variable {K : Type*} [Field K] [NumberField K]
theorem nrRealPlaces_eq_zero_iff :
nrRealPlaces K = 0 ↔ IsTotallyComplex K := by
simp [Fintype.card_eq_zero_iff, isEmpty_subtype, isTotallyComplex_iff]
variable (K)
@[simp]
theorem IsTotallyComplex.nrRealPlaces_eq_zero [h : IsTotallyComplex K] :
nrRealPlaces K = 0 :=
nrRealPlaces_eq_zero_iff.mpr h
protected theorem IsTotallyComplex.finrank [h : IsTotallyComplex K] :
finrank ℚ K = 2 * nrComplexPlaces K := by
rw [← card_add_two_mul_card_eq_rank, nrRealPlaces_eq_zero_iff.mpr h, zero_add]
end TotallyComplexField
end NumberField