Skip to content

Commit 2bce15b

Browse files
feat(RingTheory/LaurentSeries): add algebraEquiv (#21004)
Define an `Algebra K RatFuncAdicCompl K` instance on `RatFuncAdicCompl K` and promote the already defined ring equivalences to algebra equivalences `LaurentSeriesAlgEquiv : K⸨X⸩ ≃ₐ[K] RatFuncAdicCompl K` and `K⟦X⟧ ≃ₐ[K] (idealX K).adicCompletionIntegers (RatFunc K)`. TODO : update docstring (on top of file)
1 parent d93a176 commit 2bce15b

File tree

2 files changed

+78
-18
lines changed

2 files changed

+78
-18
lines changed

Mathlib/RingTheory/DedekindDomain/AdicValuation.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ def adicCompletion :=
403403
instance : Field (v.adicCompletion K) := inferInstanceAs <|
404404
Field (@UniformSpace.Completion K v.adicValued.toUniformSpace)
405405

406+
instance : Algebra K (v.adicCompletion K) :=
407+
RingHom.toAlgebra (@UniformSpace.Completion.coeRingHom K _ v.adicValued.toUniformSpace _ _)
408+
406409
instance : Inhabited (v.adicCompletion K) :=
407410
0
408411

Mathlib/RingTheory/LaurentSeries.lean

Lines changed: 75 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import Mathlib.RingTheory.Localization.FractionRing
1414
import Mathlib.Topology.UniformSpace.Cauchy
1515
import Mathlib.Algebra.Group.Int.TypeTags
1616

17+
1718
/-!
1819
# Laurent Series
1920
@@ -60,8 +61,8 @@ such that the `X`-adic valuation `v` satisfies `v (f - Q) < γ`.
6061
`LaurentSeries.exists_powerSeries_of_memIntegers` show that an element in the completion of
6162
`RatFunc K` is in the unit ball if and only if it comes from a power series through the isomorphism
6263
`LaurentSeriesRingEquiv`.
63-
* `LaurentSeries.powerSeriesRingEquiv` is the ring isomorphism between `K⟦X⟧` and the unit ball
64-
inside the `X`-adic completion of `RatFunc K`.
64+
* `LaurentSeries.powerSeriesAlgEquiv` is the `K`-algebra isomorphism between `K⟦X⟧`
65+
and the unit ball inside the `X`-adic completion of `RatFunc K`.
6566
6667
## Implementation details
6768
@@ -75,18 +76,13 @@ that it is complete and contains `RatFunc K` as a dense subspace. The isomorphis
7576
equivalence, expressing the mathematical idea that the completion "is unique". It is
7677
`LaurentSeries.comparePkg`.
7778
* For applications to `K⟦X⟧` it is actually more handy to use the *inverse* of the above
78-
equivalence: `LaurentSeries.LaurentSeriesRingEquiv` is the *topological, ring equivalence*
79-
`K⸨X⸩ ≃+* RatFuncAdicCompl K`.
79+
equivalence: `LaurentSeries.LaurentSeriesAlgEquiv` is the *topological, algebra equivalence*
80+
`K⸨X⸩ ≃ₐ[K] RatFuncAdicCompl K`.
8081
* In order to compare `K⟦X⟧` with the valuation subring in the `X`-adic completion of
8182
`RatFunc K` we consider its alias `LaurentSeries.powerSeries_as_subring` as a subring of `K⸨X⸩`,
8283
that is itself clearly isomorphic (via the inverse of `LaurentSeries.powerSeriesEquivSubring`)
8384
to `K⟦X⟧`.
8485
85-
## To Do
86-
* The `AdicCompletion` construction is currently done for ideals in rings and does not take into
87-
account the relation with algebra structures on the ring, hence it does not yield a `K`-algebra
88-
structure on the `X`-adic completion of `K⸨X⸩`. Once this will be available, we should update
89-
`LaurentSeries.LaurentSeriesRingEquiv` to an algebra equivalence.
9086
-/
9187
universe u
9288

@@ -1061,6 +1057,11 @@ equivalence: it goes from `K⸨X⸩` to `RatFuncAdicCompl K` -/
10611057
abbrev LaurentSeriesRingEquiv : K⸨X⸩ ≃+* RatFuncAdicCompl K :=
10621058
(ratfuncAdicComplRingEquiv K).symm
10631059

1060+
@[simp]
1061+
lemma LaurentSeriesRingEquiv_def (f : K⟦X⟧) :
1062+
(LaurentSeriesRingEquiv K) f = (LaurentSeriesPkg K).compare ratfuncAdicComplPkg (f : K⸨X⸩) :=
1063+
rfl
1064+
10641065
@[simp]
10651066
theorem ratfuncAdicComplRingEquiv_apply (x : RatFuncAdicCompl K) :
10661067
ratfuncAdicComplRingEquiv K x = ratfuncAdicComplPkg.compare (LaurentSeriesPkg K) x := rfl
@@ -1071,6 +1072,17 @@ theorem coe_X_compare :
10711072
rw [PowerSeries.coe_X, ← RatFunc.coe_X, ← LaurentSeries_coe, ← compare_coe]
10721073
rfl
10731074

1075+
theorem algebraMap_apply (a : K) : algebraMap K K⸨X⸩ a = HahnSeries.C a := by
1076+
simp [RingHom.algebraMap_toAlgebra]
1077+
1078+
instance : Algebra K (RatFuncAdicCompl K) :=
1079+
RingHom.toAlgebra ((LaurentSeriesRingEquiv K).toRingHom.comp HahnSeries.C)
1080+
1081+
/-- The algebra equivalence between `K⸨X⸩` and the `X`-adic completion of `RatFunc X` -/
1082+
def LaurentSeriesAlgEquiv : K⸨X⸩ ≃ₐ[K] RatFuncAdicCompl K :=
1083+
AlgEquiv.ofRingEquiv (f := LaurentSeriesRingEquiv K)
1084+
(fun a ↦ by simp [RingHom.algebraMap_toAlgebra])
1085+
10741086
open Filter WithZero
10751087

10761088
open scoped WithZeroTopology Topology Multiplicative
@@ -1132,22 +1144,30 @@ section PowerSeries
11321144
/-- In order to compare `K⟦X⟧` with the valuation subring in the `X`-adic completion of
11331145
`RatFunc K` we consider its alias as a subring of `K⸨X⸩`. -/
11341146
abbrev powerSeries_as_subring : Subring K⸨X⸩ :=
1135-
RingHom.range (HahnSeries.ofPowerSeries ℤ K)
1147+
-- RingHom.range (HahnSeries.ofPowerSeries ℤ K)
1148+
Subring.map (HahnSeries.ofPowerSeries ℤ K) ⊤
11361149

11371150
/-- The ring `K⟦X⟧` is isomorphic to the subring `powerSeries_as_subring K` -/
1138-
abbrev powerSeriesEquivSubring : K⟦X⟧ ≃+* powerSeries_as_subring K := by
1139-
rw [powerSeries_as_subring, RingHom.range_eq_map]
1140-
exact ((Subring.topEquiv).symm).trans (Subring.equivMapOfInjective ⊤ (ofPowerSeries ℤ K)
1151+
abbrev powerSeriesEquivSubring : K⟦X⟧ ≃+* powerSeries_as_subring K :=
1152+
((Subring.topEquiv).symm).trans (Subring.equivMapOfInjective ⊤ (ofPowerSeries ℤ K)
11411153
ofPowerSeries_injective)
11421154

1155+
lemma powerSeriesEquivSubring_apply (f : K⟦X⟧) :
1156+
powerSeriesEquivSubring K f =
1157+
⟨HahnSeries.ofPowerSeries ℤ K f, Subring.mem_map.mpr ⟨f, trivial, rfl⟩⟩ :=
1158+
rfl
1159+
1160+
lemma powerSeriesEquivSubring_coe_apply (f : K⟦X⟧) :
1161+
(powerSeriesEquivSubring K f : K⸨X⸩) = ofPowerSeries ℤ K f :=
1162+
rfl
1163+
11431164
/- Through the isomorphism `LaurentSeriesRingEquiv`, power series land in the unit ball inside the
11441165
completion of `RatFunc K`. -/
11451166
theorem mem_integers_of_powerSeries (F : K⟦X⟧) :
11461167
(LaurentSeriesRingEquiv K) F ∈ (idealX K).adicCompletionIntegers (RatFunc K) := by
1147-
have : (LaurentSeriesRingEquiv K) F =
1148-
(LaurentSeriesPkg K).compare ratfuncAdicComplPkg (F : K⸨X⸩) := rfl
11491168
simp only [Subring.mem_map, exists_prop, ValuationSubring.mem_toSubring,
1150-
mem_adicCompletionIntegers, this, valuation_compare, val_le_one_iff_eq_coe]
1169+
mem_adicCompletionIntegers, LaurentSeriesRingEquiv_def,
1170+
valuation_compare, val_le_one_iff_eq_coe]
11511171
exact ⟨F, rfl⟩
11521172

11531173
/- Conversely, all elements in the unit ball inside the completion of `RatFunc K` come from a power
@@ -1166,20 +1186,57 @@ theorem powerSeries_ext_subring :
11661186
Subring.map (LaurentSeriesRingEquiv K).toRingHom (powerSeries_as_subring K) =
11671187
((idealX K).adicCompletionIntegers (RatFunc K)).toSubring := by
11681188
ext x
1169-
refine ⟨fun ⟨f, ⟨F, coe_F⟩, hF⟩ ↦ ?_, fun H ↦ ?_⟩
1189+
refine ⟨fun ⟨f, ⟨F, _, coe_F⟩, hF⟩ ↦ ?_, fun H ↦ ?_⟩
11701190
· simp only [ValuationSubring.mem_toSubring, ← hF, ← coe_F]
11711191
apply mem_integers_of_powerSeries
11721192
· obtain ⟨F, hF⟩ := exists_powerSeries_of_memIntegers K H
11731193
simp only [Equiv.toFun_as_coe, UniformEquiv.coe_toEquiv, exists_exists_eq_and,
11741194
UniformEquiv.coe_symm_toEquiv, Subring.mem_map, Equiv.invFun_as_coe]
1175-
exact ⟨F, ⟨F, rfl⟩, hF⟩
1195+
exact ⟨F, ⟨F, trivial, rfl⟩, hF⟩
11761196

11771197
/-- The ring isomorphism between `K⟦X⟧` and the unit ball inside the `X`-adic completion of
11781198
`RatFunc K`. -/
11791199
abbrev powerSeriesRingEquiv : K⟦X⟧ ≃+* (idealX K).adicCompletionIntegers (RatFunc K) :=
11801200
((powerSeriesEquivSubring K).trans (LaurentSeriesRingEquiv K).subringMap).trans
11811201
<| RingEquiv.subringCongr (powerSeries_ext_subring K)
11821202

1203+
lemma powerSeriesRingEquiv_coe_apply (f : K⟦X⟧) :
1204+
powerSeriesRingEquiv K f = LaurentSeriesRingEquiv K (f : K⸨X⸩) :=
1205+
rfl
1206+
1207+
lemma LaurentSeriesRingEquiv_mem_valuationSubring (f : K⟦X⟧) :
1208+
LaurentSeriesRingEquiv K f ∈ Valued.v.valuationSubring := by
1209+
simp only [Valuation.mem_valuationSubring_iff]
1210+
rw [LaurentSeriesRingEquiv_def, valuation_compare, val_le_one_iff_eq_coe]
1211+
use f
1212+
1213+
lemma algebraMap_C_mem_adicCompletionIntegers (x : K) :
1214+
((LaurentSeriesRingEquiv K).toRingHom.comp HahnSeries.C) x ∈
1215+
adicCompletionIntegers (RatFunc K) (idealX K) := by
1216+
have : HahnSeries.C x = ofPowerSeries ℤ K (PowerSeries.C K x) := by
1217+
simp [C_apply, ofPowerSeries_C]
1218+
simp only [RingHom.comp_apply, RingEquiv.toRingHom_eq_coe, RingHom.coe_coe, this]
1219+
apply LaurentSeriesRingEquiv_mem_valuationSubring
1220+
1221+
instance : Algebra K ((idealX K).adicCompletionIntegers (RatFunc K)) :=
1222+
RingHom.toAlgebra <|
1223+
((LaurentSeriesRingEquiv K).toRingHom.comp HahnSeries.C).codRestrict _
1224+
(algebraMap_C_mem_adicCompletionIntegers K)
1225+
1226+
instance : IsScalarTower K ((idealX K).adicCompletionIntegers (RatFunc K))
1227+
((idealX K).adicCompletion (RatFunc K)) :=
1228+
IsScalarTower.of_algebraMap_eq (fun _ ↦ by rfl)
1229+
1230+
/-- The algebra isomorphism between `K⟦X⟧` and the unit ball inside the `X`-adic completion of
1231+
`RatFunc K`. -/
1232+
def powerSeriesAlgEquiv : K⟦X⟧ ≃ₐ[K] (idealX K).adicCompletionIntegers (RatFunc K) := by
1233+
apply AlgEquiv.ofRingEquiv (f := powerSeriesRingEquiv K)
1234+
intro a
1235+
rw [PowerSeries.algebraMap_eq, RingHom.algebraMap_toAlgebra, ← Subtype.coe_inj,
1236+
powerSeriesRingEquiv_coe_apply,
1237+
RingHom.codRestrict_apply _ _ (algebraMap_C_mem_adicCompletionIntegers K)]
1238+
simp
1239+
11831240
end PowerSeries
11841241

11851242
end Comparison

0 commit comments

Comments
 (0)