Skip to content

Commit 2050510

Browse files
faenuccioRuben-VandeVeldeYaelDilliespecherskymariainesdff
authored
chore(RingTheory/Valuation/RankOne): modify the definition of Valuation.RankOne using its range rather than its codomain (#26872)
* try again * added restrict0 * Update Range.lean * removed min_imports * added results on restrict * added * removed spaces * removed imports * min some imports * Update Range.lean * created v.restrict * updated range * wip * some updates * fixed linter * wip * created mul_iso * Update Mathlib/Algebra/GroupWithZero/WithZero.lean Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> * Update Mathlib/Algebra/GroupWithZero/WithZero.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/GroupWithZero/WithZero.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * build fix * Update Mathlib/Algebra/GroupWithZero/WithZero.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * fixed apostrophes * wip * perhaps stopping here * fixed build using Yakov' PR * updated * applied reviewer's suggestions * Update Mathlib/Algebra/Order/GroupWithZero/WithZero.lean Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com> * moving towards yakov's suggestion * Update Mathlib/Algebra/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/Order/GroupWithZero/WithZero.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * removed extra basic * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Range.lean * Update Range.lean * removed an equiv * fixed something * fix build * Update Mathlib/Algebra/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * commented withZeroUnits_mul * first commit * Update Mathlib/Algebra/GroupWithZero/WithZero.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/GroupWithZero/WithZero.lean * moved variable * commented IsOrderedMonoid * fixed build * Update Mathlib/Algebra/GroupWithZero/Range.lean Yes, certainly much better, thanks. Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * fixed HomClass * addressed reviewer's comments * one more comment * one more comment * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * updated name * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * changed capitalization * updated docstring * renaming * Update Mathlib/Algebra/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * fix build * fix build+reviewer's comments * fixed build * removed simp * reverted remove import * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * perhaps OK? * fixed capitalization of OrderEmbedding * mk_all * fix build * module * Update Mathlib/Algebra/Order/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * WIP * WIP * WIP * fix DiscreteValuativeRel * Update Mathlib/Algebra/GroupWithZero/Range.lean Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * remove simp lemma * WIP * WIP * WIP * last files * remove simp, add namespace * fix * remove decidable assumption * more changes * delete space * some build fix * add embedding_strictMono back * delete orderEmbedding * fix Valuation.Basic * update ValuativeRel.Basic * merging with some errors * almost fix build * tries * add WithVal.valueGroup₀_equiv * fill in proofs * add strictMono statement * closed strictMono_valueGroup₀_equiv * progress on IsEquiv.uniformContinuous_equivWithVal * WIP * partial fixes * another fix * fix one error * minigolf * add exists_div_eq_of_unit * added two lemmas while proving uniformContinuous_congr * WIP * prove IsEquiv.uniformContinuous_equiv * advancing on congr * added Salvatore's fix * WIP * delete old proof * valuation_compare fixed? who knows * WIP * ops * WIP * delete sorries * move lemma * wip * closed something * removed useless lemma * WIP * with barmonoid * WIP * trying with inv * WIP * WIP * fix name * prove order preserving * working on Kenny's prf * WIP * add orderMonoidIso * delete comments * wip * fix file * finish? * fixing some build * fixed other builds * fix * clean up * some golfing * first fifteen files are done * second round of reviews * fixed RatFunc notation * applied one correction * two deprecatsion and one ToD0 * added one reviewer's comment * first suggestion by Salvatore * Update Mathlib/Topology/Algebra/Valued/ValuedField.lean Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk> * WIP * one more leftover * even more leftovers * WIP * restored MI's trials * implemented more comments * add valueGroup.mk * fix merge issue * add missing docstrings * applied reviewer's comment * applied comments * review changes * review changes --------- Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com> Co-authored-by: mariainesdff <mariainesdff@gmail.com> Co-authored-by: María Inés de Frutos-Fernández <88536493+mariainesdff@users.noreply.github.com> Co-authored-by: mariainesdff <mariaines.dff@gmail.com> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com> Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
1 parent c328044 commit 2050510

File tree

26 files changed

+1358
-400
lines changed

26 files changed

+1358
-400
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6656,6 +6656,7 @@ public import Mathlib.RingTheory.Valuation.AlgebraInstances
66566656
public import Mathlib.RingTheory.Valuation.Archimedean
66576657
public import Mathlib.RingTheory.Valuation.Basic
66586658
public import Mathlib.RingTheory.Valuation.Discrete.Basic
6659+
public import Mathlib.RingTheory.Valuation.Discrete.RankOne
66596660
public import Mathlib.RingTheory.Valuation.DiscreteValuativeRel
66606661
public import Mathlib.RingTheory.Valuation.ExtendToLocalization
66616662
public import Mathlib.RingTheory.Valuation.Extension

Mathlib/Algebra/GroupWithZero/Range.lean

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ elements in `range f` and `MonoidWithZeroHom.ValueGroup₀` adds a `0` to the pr
2424
2525
When `B` is commutative, then both `MonoidWithZeroHom.valueGroup f` and
2626
`MonoidWithZeroHom.ValueGroup₀ f` are also commutative and the former can be described more
27-
explicitly (see `MonoidWithZeroHom.mem_valueGroup_iff_of_comm`).
27+
explicitly (see `MonoidWithZeroHom.mem_valueGroup_iff_of_comm` and `mem_valueGroup_iff_of_comm'`).
2828
2929
## Main declarations
3030
@@ -224,6 +224,7 @@ section CommGroupWithZero
224224
--
225225
variable [MonoidWithZero A] [CommGroupWithZero B] [MonoidWithZeroHomClass F A B]
226226

227+
/- See also `mem_valueGroup_iff_of_comm'` for a version proving that `f x ≠ 0`. -/
227228
theorem mem_valueGroup_iff_of_comm {y : Bˣ} :
228229
y ∈ valueGroup f ↔ ∃ a, f a ≠ 0 ∧ ∃ x, f a * y = f x := by
229230
refine ⟨fun hy ↦ ?_, fun ⟨a, ha, x, hy⟩ ↦ ?_⟩
@@ -255,6 +256,64 @@ theorem mem_valueGroup_iff_of_comm {y : Bˣ} :
255256
· apply mem_valueGroup
256257
use x
257258

259+
theorem mem_valueGroup_iff_of_comm' {y : Bˣ} :
260+
y ∈ valueGroup f ↔ ∃ a, f a ≠ 0 ∧ ∃ x, f x ≠ 0 ∧ f a * y = f x := by
261+
rw [mem_valueGroup_iff_of_comm]
262+
exact ⟨fun ⟨a, ha, x, hax⟩ ↦ ⟨a, ha, x, by aesop, hax⟩, fun ⟨a, ha, x, hx, hax⟩ ↦ ⟨a, ha, x, hax⟩⟩
263+
264+
namespace valueGroup
265+
266+
variable {r₁ s₁ r₂ s₂ : A}
267+
268+
/-- The map sending a pair of nonzero `r s : A` to the element `(v r)⁻¹ * (v s)`
269+
of `ValueGroup₀ v`. -/
270+
def mk (r s : A) (hr : f r ≠ 0) (hs : f s ≠ 0) : valueGroup f :=
271+
(⟨(.mk0 _ hr)⁻¹ * (.mk0 _ hs), mul_mem (inv_mem (mem_valueGroup _ (by simp)))
272+
(mem_valueGroup _ (by simp))⟩ : valueGroup f)
273+
274+
@[simp] theorem mk_inj {hr₁ : f r₁ ≠ 0} {hs₁ : f s₁ ≠ 0} {hr₂ : f r₂ ≠ 0} {hs₂ : f s₂ ≠ 0} :
275+
mk f r₁ s₁ hr₁ hs₁ = mk f r₂ s₂ hr₂ hs₂ ↔ f (r₁ * s₂) = f (r₂ * s₁) := by
276+
simp only [mk, Subtype.mk.injEq, map_mul]
277+
rw [inv_mul_eq_inv_mul_iff_mul_eq_mul, eq_comm]
278+
simp [Units.ext_iff, mul_comm (f r₂), mul_comm (f s₂)]
279+
280+
@[simp] theorem mk_mul {hr₁ : f r₁ ≠ 0} {hs₁ : f s₁ ≠ 0} {hr₂ : f r₂ ≠ 0} {hs₂ : f s₂ ≠ 0} :
281+
mk f r₁ s₁ hr₁ hs₁ * mk f r₂ s₂ hr₂ hs₂ =
282+
mk f (r₁ * r₂) (s₁ * s₂) (by simp_all) (by simp_all) := by
283+
simp only [mk, map_mul, MulMemClass.mk_mul_mk, Units.mk0_mul, Subtype.mk.injEq]
284+
rw [mul_mul_mul_comm, mul_inv]
285+
286+
end valueGroup
287+
namespace ValueGroup₀
288+
289+
/-- The map sending a pair of nonzero `r s : A` to the element `(v r)⁻¹ * (v s)`
290+
of `ValueGroup₀ v`. -/
291+
def mk [DecidablePred fun b : B ↦ b = 0] (r s : A) : ValueGroup₀ f :=
292+
if h : f r = 0 ∨ f s = 0 then 0 else
293+
valueGroup.mk f r s ((not_or.mp h).1) ((not_or.mp h).2)
294+
295+
lemma mk_eq_of_ne_zero [DecidablePred fun b : B ↦ b = 0] (r s : A) (hr : f r ≠ 0) (hs : f s ≠ 0) :
296+
ValueGroup₀.mk f r s = valueGroup.mk f r s hr hs := by
297+
simp [ValueGroup₀.mk, hr, hs]
298+
299+
theorem zero_or_exists_mk (x : ValueGroup₀ f) :
300+
x = 0 ∨ ∃ r s hr hs, x = valueGroup.mk f r s hr hs := by
301+
obtain _ | ⟨x, hx⟩ := x
302+
· left; rfl
303+
· rw [mem_valueGroup_iff_of_comm'] at hx
304+
obtain ⟨r, hr, s, hs, hrs⟩ := hx
305+
refine .inr ⟨r, s, hr, hs, Option.some_inj.mpr <| by
306+
simp only [valueGroup.mk, Subtype.mk.injEq]
307+
rw [eq_inv_mul_iff_mul_eq]
308+
simp [← hrs, mul_comm]⟩
309+
310+
theorem zero_or_exists_mk' (x : ValueGroup₀ f) :
311+
x = 0 ∨ ∃ d : {xy : A × A // f xy.10 ∧ f xy.20}, x =
312+
valueGroup.mk f d.1.1 d.1.2 d.2.1 d.2.2 :=
313+
x.zero_or_exists_mk.imp _root_.id fun ⟨r, s, hr, hs, hx⟩ ↦ ⟨⟨(r, s), ⟨hr, hs⟩⟩, hx⟩
314+
315+
end ValueGroup₀
316+
258317
instance : CommGroupWithZero (ValueGroup₀ f) where
259318

260319
end CommGroupWithZero

Mathlib/FieldTheory/RatFunc/AsPolynomial.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,13 @@ instance : Valued K⟮X⟯ ℤᵐ⁰ := Valued.mk' ((idealX K).valuation _)
401401
theorem v_def {x : K⟮X⟯} :
402402
Valued.v x = (idealX K).valuation _ x := rfl
403403

404+
lemma valuation_surjective : Function.Surjective (Valued.v (R := RatFunc K)) := by
405+
intro n
406+
by_cases hn0 : n = 0
407+
· use 0; simp [hn0]
408+
· use (RatFunc.X ^ (-WithZero.log n))
409+
simp [WithZero.exp_log hn0]
410+
404411
end RatFunc
405412

406413
end AdicValuation

Mathlib/NumberTheory/FunctionField.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ instance : Inhabited (FqtInfty Fq) :=
253253
/-- The valuation at infinity on `k(t)` extends to a valuation on `FqtInfty`. -/
254254
instance valuedFqtInfty : Valued (FqtInfty Fq) ℤᵐ⁰ := (inftyValuedFqt Fq).valuedCompletion
255255

256-
theorem valuedFqtInfty.def {x : FqtInfty Fq} : Valued.v x = (inftyValuedFqt Fq).extension x := rfl
256+
theorem valuedFqtInfty.def {x : FqtInfty Fq} :
257+
Valued.v x = (inftyValuedFqt Fq).extensionValuation x := rfl
257258

258259
end InftyValuation
259260

Mathlib/NumberTheory/LocalField/Basic.lean

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,16 @@ lemma isCompact_closedBall (γ : ValueGroupWithZero K) : IsCompact { x | valuati
8686
intro x hx
8787
dsimp at hx ⊢
8888
exact hx.trans_lt (hr.trans_le hr1)
89+
simp_rw [← (valuation K).restrict_le_iff] at H ⊢
8990
convert (hs'.of_isClosed_subset (Valued.isClosed_closedBall K _) H).image
9091
(Homeomorph.mulLeft₀ (γ / r) (by simp [hr, div_eq_zero_iff, hγ])).continuous using 1
9192
refine .trans ?_ (Equiv.image_eq_preimage_symm _ _).symm
9293
ext x
93-
simp [div_mul_eq_mul_div, div_le_iff₀, IsValuativeTopology.v_eq_valuation, hγ, hr]
94+
simp only [Set.mem_setOf_eq, Homeomorph.coe_symm_toEquiv, Homeomorph.mulLeft₀_symm_apply, inv_div,
95+
Set.preimage_setOf_eq, map_mul, map_div₀, Valuation.restrict_le_iff]
96+
rw [div_mul_eq_mul_div, div_le_iff₀ (by simp [hγ])]
97+
simp only [IsValuativeTopology.v_eq_valuation, ← map_mul, Valuation.restrict_le_iff]
98+
simp [hr]
9499

95100
instance : CompactSpace 𝒪[K] := isCompact_iff_compactSpace.mp (isCompact_closedBall K 1)
96101

@@ -132,7 +137,9 @@ instance : Finite 𝓀[K] :=
132137
letI := IsTopologicalAddGroup.rightUniformSpace K
133138
haveI := isUniformAddGroup_of_addCommGroup (G := K)
134139
letI : (Valued.v (R := K)).RankOne :=
135-
⟨IsRankLeOne.nonempty.some.emb, IsRankLeOne.nonempty.some.strictMono⟩
140+
{ hom' := IsRankLeOne.nonempty.some.emb (R := K).comp MonoidWithZeroHom.ValueGroup₀.embedding
141+
strictMono' := IsRankLeOne.nonempty.some.strictMono.comp
142+
MonoidWithZeroHom.ValueGroup₀.embedding_strictMono }
136143
(compactSpace_iff_completeSpace_and_isDiscreteValuationRing_and_finite_residueField.mp
137144
(inferInstanceAs (CompactSpace 𝒪[K]))).2.2
138145

@@ -147,15 +154,19 @@ variable (K : Type*) [Field K] [ValuativeRel K]
147154

148155
instance : CompleteSpace K :=
149156
letI : (Valued.v (R := K)).RankOne :=
150-
⟨IsRankLeOne.nonempty.some.emb, IsRankLeOne.nonempty.some.strictMono⟩
157+
{ hom' := IsRankLeOne.nonempty.some.emb (R := K).comp MonoidWithZeroHom.ValueGroup₀.embedding
158+
strictMono' := IsRankLeOne.nonempty.some.strictMono.comp
159+
MonoidWithZeroHom.ValueGroup₀.embedding_strictMono }
151160
open scoped Valued in
152161
have : ProperSpace K := .of_nontriviallyNormedField_of_weaklyLocallyCompactSpace K
153162
(properSpace_iff_completeSpace_and_isDiscreteValuationRing_integer_and_finite_residueField.mp
154163
inferInstance).1
155164

156165
instance : CompleteSpace 𝒪[K] :=
157166
letI : (Valued.v (R := K)).RankOne :=
158-
⟨IsRankLeOne.nonempty.some.emb, IsRankLeOne.nonempty.some.strictMono⟩
167+
{ hom' := IsRankLeOne.nonempty.some.emb (R := K).comp MonoidWithZeroHom.ValueGroup₀.embedding
168+
strictMono' := IsRankLeOne.nonempty.some.strictMono.comp
169+
MonoidWithZeroHom.ValueGroup₀.embedding_strictMono }
159170
(compactSpace_iff_completeSpace_and_isDiscreteValuationRing_and_finite_residueField.mp
160171
(inferInstanceAs (CompactSpace 𝒪[K]))).1
161172

Mathlib/NumberTheory/NumberField/FinitePlaces.lean

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public import Mathlib.RingTheory.Ideal.Norm.AbsNorm
1515
public import Mathlib.RingTheory.Valuation.Archimedean
1616
public import Mathlib.Topology.Algebra.Valued.NormedValued
1717
public import Mathlib.LinearAlgebra.FreeModule.IdealQuotient
18+
public import Mathlib.RingTheory.Valuation.Discrete.RankOne
1819

1920
import Mathlib.Algebra.FiniteSupport.Basic
2021

@@ -58,15 +59,8 @@ instance : IsPrincipalIdealRing (v.valuation K).integer := by
5859
WithZero.denselyOrdered_set_iff_subsingleton]
5960
simpa using (v.valuation K).toMonoidWithZeroHom.range_nontrivial
6061

61-
-- TODO: make this inferred from `IsRankOneDiscrete`
62-
instance : IsDiscreteValuationRing (v.valuation K).integer where
63-
not_a_field' := by
64-
simp only [ne_eq, Ideal.ext_iff, IsLocalRing.mem_maximalIdeal, mem_nonunits_iff,
65-
Valuation.Integer.not_isUnit_iff_valuation_lt_one, Ideal.mem_bot, Subtype.forall, not_forall]
66-
obtain ⟨π, hπ⟩ := v.valuation_exists_uniformizer K
67-
use π
68-
simp [Valuation.mem_integer_iff, ← exp_zero, Subtype.ext_iff, -exp_neg,
69-
← (v.valuation K).map_eq_zero_iff, hπ]
62+
instance : IsDiscreteValuationRing (v.valuation K).integer :=
63+
(v.valuation K).valuationSubring_isDiscreteValuationRing
7064

7165
instance : IsPrincipalIdealRing (v.adicCompletionIntegers K) := by
7266
unfold HeightOneSpectrum.adicCompletionIntegers
@@ -137,24 +131,24 @@ noncomputable def FinitePlace.embedding : K →+* adicCompletion K v :=
137131

138132
theorem FinitePlace.embedding_apply (x : K) : embedding v x = ↑x := rfl
139133

140-
noncomputable instance : (v.valuation K).RankOne where
141-
hom := toNNReal (absNorm_ne_zero v)
142-
strictMono' := toNNReal_strictMono (one_lt_absNorm_nnreal v)
143-
exists_val_nontrivial := by
144-
rcases Submodule.exists_mem_ne_zero_of_ne_bot v.ne_bot with ⟨x, hx1, hx2
145-
use x
146-
rw [valuation_of_algebraMap]
147-
exact ⟨v.intValuation_ne_zero _ hx2, ((intValuation_lt_one_iff_mem _ _).2 hx1).ne⟩
148-
149-
noncomputable instance instRankOneValuedAdicCompletion :
150-
Valuation.RankOne (Valued.v : Valuation (v.adicCompletion K) ℤᵐ⁰) where
151-
hom := toNNReal (absNorm_ne_zero v)
152-
strictMono' := toNNReal_strictMono (one_lt_absNorm_nnreal v)
153-
exists_val_nontrivial := by
154-
rcases Submodule.exists_mem_ne_zero_of_ne_bot v.ne_bot with ⟨x, hx1, hx2⟩
155-
use x
156-
rw [valuedAdicCompletion_eq_valuation' v (x : K)]
157-
simpa [valuation_of_algebraMap] using ⟨v.intValuation_ne_zero _ hx2, hx1⟩
134+
noncomputable instance : ((Valued.v : Valuation (v.adicCompletion K) ℤᵐ⁰)).IsRankOneDiscrete where
135+
exists_generator_lt_one' := by
136+
have h : (v.valuation K).IsRankOneDiscrete := Valuation.IsRankOneDiscrete.mk' (valuation K v)
137+
exact ⟨h.generator, by rw [h.generator_zpowers_eq_valueGroup, adicCompletion_valueGroup_eq],
138+
h.generator_lt_one
139+
140+
open Valuation.IsRankOneDiscrete
141+
142+
noncomputable instance : (v.valuation K).RankOne :=
143+
rankOne (v.valuation K) (one_lt_absNorm_nnreal v)
144+
145+
noncomputable instance instRankOneAdicCompletion :
146+
(Valued.v : Valuation (v.adicCompletion K) ℤᵐ⁰).RankOne :=
147+
rankOne (Valued.v : Valuation (v.adicCompletion K) ℤᵐ⁰) (one_lt_absNorm_nnreal v)
148+
149+
lemma rankOne_hom'_def :
150+
(instRankOneAdicCompletion v).hom' = (toNNReal (absNorm_ne_zero v)).comp
151+
(valueGroup₀_equiv_withZeroMulInt Valued.v).toMonoidWithZeroHom := rfl
158152

159153
/-- The `v`-adic completion of `K` is a normed field. -/
160154
noncomputable instance instNormedFieldValuedAdicCompletion : NormedField (adicCompletion K v) :=
@@ -185,10 +179,12 @@ lemma isFinitePlace_iff (v : AbsoluteValue K ℝ) :
185179

186180
/-- The norm of the image after the embedding associated to `v` is equal to the `v`-adic absolute
187181
value. -/
188-
theorem FinitePlace.norm_def (x : K) :
189-
‖embedding v x‖ = adicAbv v x := by
190-
simp +instances [NormedField.toNorm, instNormedFieldValuedAdicCompletion, Valued.toNormedField,
191-
Valued.norm, Valuation.RankOne.hom, embedding_apply, adicAbv_def]
182+
theorem FinitePlace.norm_def (x : K) : ‖embedding v x‖ = adicAbv v x := by
183+
simp +instances [NormedField.toNorm, instNormedFieldValuedAdicCompletion,
184+
Valued.toNormedField, Valued.norm, Valuation.RankOne.hom,
185+
embedding_apply, adicAbv_def, rankOne_hom'_def,
186+
valueGroup₀_equiv_withZeroMulInt_restrict_apply_of_surjective
187+
(valuedAdicCompletion_surjective K v)]
192188

193189
/-- The norm of the image after the embedding associated to `v` is equal to the norm of `v` raised
194190
to the power of the `v`-adic valuation. -/

Mathlib/NumberTheory/Padics/Complex.lean

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@ theorem valuation_p (p : ℕ) [Fact p.Prime] : Valued.v (p : PadicAlgCl p) = 1 /
102102
rw [valuation_coe, norm_extends, Padic.norm_p, one_div, NNReal.coe_inv,
103103
NNReal.coe_natCast]
104104

105+
open MonoidWithZeroHom.ValueGroup₀
106+
105107
set_option backward.isDefEq.respectTransparency false in
106108
set_option linter.style.whitespace false in -- manual alignment is not recognised
107109
/-- The valuation on `PadicAlgCl p` has rank one. -/
108110
instance : RankOne (PadicAlgCl.valued p).v where
109-
hom := MonoidWithZeroHom.id ℝ≥0
110-
strictMono' := strictMono_id
111+
hom' := embedding
112+
strictMono' := embedding_strictMono
111113
exists_val_nontrivial := by
112114
use p
113115
have hp : Nat.Prime p := hp.1
@@ -148,7 +150,7 @@ instance valued : Valued ℂ_[p] ℝ≥0 := Valued.valuedCompletion
148150
set_option backward.isDefEq.respectTransparency false in
149151
/-- The valuation on `ℂ_[p]` extends the valuation on `PadicAlgCl p`. -/
150152
theorem valuation_extends (x : PadicAlgCl p) : Valued.v (x : ℂ_[p]) = Valued.v x :=
151-
Valued.extension_extends _
153+
Valued.extensionValuation_apply_coe _
152154

153155
set_option backward.isDefEq.respectTransparency false in
154156
theorem coe_eq (x : PadicAlgCl p) : (x : ℂ_[p]) = algebraMap (PadicAlgCl p) ℂ_[p] x := rfl
@@ -169,21 +171,23 @@ theorem valuation_p : Valued.v (p : ℂ_[p]) = 1 / (p : ℝ≥0) := by
169171
rw [← map_natCast (algebraMap (PadicAlgCl p) ℂ_[p]), ← coe_eq, valuation_extends,
170172
PadicAlgCl.valuation_p]
171173

174+
open MonoidWithZeroHom.ValueGroup₀
175+
172176
set_option backward.isDefEq.respectTransparency false in
173177
set_option linter.style.whitespace false in -- manual alignment is not recognised
174178
/-- The valuation on `ℂ_[p]` has rank one. -/
175179
instance : RankOne (PadicComplex.valued p).v where
176-
hom := MonoidWithZeroHom.id ℝ≥0
177-
strictMono' := strictMono_id
180+
hom' := embedding
181+
strictMono' := embedding_strictMono
178182
exists_val_nontrivial := by
179183
use p
180184
have hp : Nat.Prime p := hp.1
181185
simp only [valuation_p, one_div, ne_eq, inv_eq_zero, Nat.cast_eq_zero, inv_eq_one,
182186
Nat.cast_eq_one]
183187
exact ⟨hp.ne_zero, hp.ne_one⟩
184188

185-
lemma rankOne_hom_eq :
186-
RankOne.hom (PadicComplex.valued p).v = RankOne.hom (PadicAlgCl.valued p).v := rfl
189+
@[simp]
190+
theorem RankOne.hom_eq_embedding : RankOne.hom (PadicComplex.valued p).v = embedding := rfl
187191

188192
/-- `ℂ_[p]` is a normed field, where the norm extends from `PadicAlgCl` along completion. -/
189193
instance normedField : NormedField ℂ_[p] := inferInstance
@@ -215,7 +219,8 @@ theorem norm_eq_norm' : (‖·‖ : ℂ_[p] → ℝ) = Valued.norm := by
215219
letI := S.toNonUnitalSeminormedRing.toSeminormedAddCommGroup.toSeminormedAddGroup
216220
exact @uniformContinuous_norm ℂ_[p] this
217221
· intro x
218-
simp only [Valued.norm_def, valuation_extends]
222+
simp only [Valued.norm_def, RankOne.hom_eq_embedding]
223+
erw [embedding_restrict (PadicComplex.valued p).v x, valuation_extends]
219224
exact (PadicAlgCl.valuation_coe p x).symm
220225

221226
/-- The norm on `ℂ_[p]` is compatible with the valuation. -/

Mathlib/NumberTheory/Padics/HeightOneSpectrum.lean

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ open Valuation
141141
noncomputable def withValEquiv (v : HeightOneSpectrum R) :
142142
WithVal (v.valuation ℚ) ≃ᵤ WithVal (padicValuation (primesEquiv v)) :=
143143
(valuation_equiv_padicValuation v).uniformEquiv
144-
(exists_div_eq_of_surjective (v.valuation_surjective ℚ))
145-
(exists_div_eq_of_surjective (surjective_padicValuation (primesEquiv v)))
146144

147145
/-- The continuous `ℚ`-algebra isomorphism between `v.adicCompletion ℚ` and `ℚ_[primesEquiv v]`. -/
148146
noncomputable def adicCompletion.padicEquiv (v : HeightOneSpectrum R) :
@@ -159,11 +157,9 @@ noncomputable def adicCompletionIntegers.padicIntEquiv (v : HeightOneSpectrum R)
159157
__ := let e := (mapRingEquiv _ (withValEquiv v).continuous
160158
(withValEquiv v).symm.continuous).restrict _ _ fun _ ↦ by
161159
simpa using (valuation_equiv_padicValuation v).valuedCompletion_le_one_iff
162-
(v.valuation_surjective ℚ) (surjective_padicValuation _)
163160
e.trans withValIntegersRingEquiv
164161
__ := let e := (mapEquiv (withValEquiv v)).subtype fun _ ↦ by
165162
simpa using (valuation_equiv_padicValuation v).valuedCompletion_le_one_iff
166-
(v.valuation_surjective ℚ) (surjective_padicValuation _)
167163
(e.trans withValIntegersUniformEquiv).toHomeomorph
168164
commutes' := by simp
169165

0 commit comments

Comments
 (0)