Skip to content

Commit fb6a587

Browse files
committed
feat(Valuation/RankOne): equivalence with ValuativeRel.isRankLeOne (#26754)
refactor to have Valuation.RankOne extend the new Valuation.IsNontrivial and characterization iffs for ValuativeRel.IsNontrivial relating to units of value group, or Valuation.IsNontrivial
1 parent c4c10f2 commit fb6a587

File tree

5 files changed

+83
-11
lines changed

5 files changed

+83
-11
lines changed

Mathlib/NumberTheory/NumberField/FinitePlaces.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ noncomputable instance instRankOneValuedAdicCompletion :
104104
map_mul' := MonoidWithZeroHom.map_mul (toNNReal (absNorm_ne_zero v))
105105
}
106106
strictMono' := toNNReal_strictMono (one_lt_absNorm_nnreal v)
107-
nontrivial' := by
107+
exists_val_nontrivial := by
108108
rcases Submodule.exists_mem_ne_zero_of_ne_bot v.ne_bot with ⟨x, hx1, hx2⟩
109109
use x
110110
dsimp [adicCompletion]

Mathlib/NumberTheory/Padics/Complex.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ theorem valuation_p (p : ℕ) [Fact p.Prime] : Valued.v (p : PadicAlgCl p) = 1 /
9595
instance : RankOne (PadicAlgCl.valued p).v where
9696
hom := MonoidWithZeroHom.id ℝ≥0
9797
strictMono' := strictMono_id
98-
nontrivial' := by
98+
exists_val_nontrivial := by
9999
use p
100100
have hp : Nat.Prime p := hp.1
101101
simp only [valuation_p, one_div, ne_eq, inv_eq_zero, Nat.cast_eq_zero, inv_eq_one,
@@ -152,7 +152,7 @@ theorem valuation_p : Valued.v (p : ℂ_[p]) = 1 / (p : ℝ≥0) := by
152152
instance : RankOne (PadicComplex.valued p).v where
153153
hom := MonoidWithZeroHom.id ℝ≥0
154154
strictMono' := strictMono_id
155-
nontrivial' := by
155+
exists_val_nontrivial := by
156156
use p
157157
have hp : Nat.Prime p := hp.1
158158
simp only [valuation_p, one_div, ne_eq, inv_eq_zero, Nat.cast_eq_zero, inv_eq_one,

Mathlib/RingTheory/Valuation/RankOne.lean

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Copyright (c) 2024 María Inés de Frutos-Fernández. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: María Inés de Frutos-Fernández
55
-/
6-
import Mathlib.Data.NNReal.Defs
7-
import Mathlib.RingTheory.Valuation.Basic
6+
import Mathlib.RingTheory.Valuation.ValuativeRel
87

98
/-!
109
# Rank one valuations
@@ -32,19 +31,18 @@ namespace Valuation
3231

3332
/-- A valuation has rank one if it is nontrivial and its image is contained in `ℝ≥0`.
3433
Note that this class includes the data of an inclusion morphism `Γ₀ → ℝ≥0`. -/
35-
class RankOne (v : Valuation R Γ₀) where
34+
class RankOne (v : Valuation R Γ₀) extends Valuation.IsNontrivial v where
3635
/-- The inclusion morphism from `Γ₀` to `ℝ≥0`. -/
3736
hom : Γ₀ →*₀ ℝ≥0
3837
strictMono' : StrictMono hom
39-
nontrivial' : ∃ r : R, v r ≠ 0 ∧ v r ≠ 1
4038

4139
namespace RankOne
4240

4341
variable (v : Valuation R Γ₀) [RankOne v]
4442

4543
lemma strictMono : StrictMono (hom v) := strictMono'
4644

47-
lemma nontrivial : ∃ r : R, v r ≠ 0 ∧ v r ≠ 1 := nontrivial'
45+
lemma nontrivial : ∃ r : R, v r ≠ 0 ∧ v r ≠ 1 := IsNontrivial.exists_val_nontrivial
4846

4947
/-- If `v` is a rank one valuation and `x : Γ₀` has image `0` under `RankOne.hom v`, then
5048
`x = 0`. -/
@@ -74,3 +72,37 @@ instance [RankOne v] : IsNontrivial v where
7472
end RankOne
7573

7674
end Valuation
75+
76+
section ValuativeRel
77+
78+
open ValuativeRel
79+
80+
variable {R : Type*} [CommRing R] [ValuativeRel R]
81+
82+
/-- A valuative relation has a rank one valuation when it is both nontrivial
83+
and the rank is at most one. -/
84+
def Valuation.RankOne.ofRankLeOneStruct [ValuativeRel.IsNontrivial R] (e : RankLeOneStruct R) :
85+
Valuation.RankOne (valuation R) where
86+
__ : Valuation.IsNontrivial (valuation R) := isNontrivial_iff_isNontrivial.mp inferInstance
87+
hom := e.emb
88+
strictMono' := e.strictMono
89+
90+
instance [IsNontrivial R] [IsRankLeOne R] :
91+
Valuation.RankOne (valuation R) :=
92+
Valuation.RankOne.ofRankLeOneStruct IsRankLeOne.nonempty.some
93+
94+
/-- Convert between the rank one statement on valuative relation's induced valuation. -/
95+
def Valuation.RankOne.rankLeOneStruct (e : Valuation.RankOne (valuation R)) :
96+
RankLeOneStruct R where
97+
emb := e.hom
98+
strictMono := e.strictMono
99+
100+
lemma ValuativeRel.isRankLeOne_of_rankOne [h : (valuation R).RankOne] :
101+
IsRankLeOne R :=
102+
⟨⟨h.rankLeOneStruct⟩⟩
103+
104+
lemma ValuativeRel.isNontrivial_of_rankOne [h : (valuation R).RankOne] :
105+
ValuativeRel.IsNontrivial R :=
106+
isNontrivial_iff_isNontrivial.mpr h.toIsNontrivial
107+
108+
end ValuativeRel

Mathlib/RingTheory/Valuation/ValuativeRel.lean

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ class ValuativeRel (R : Type*) [CommRing R] where
7575
rel_mul_cancel {x y z} : ¬ rel z 0 → rel (x * z) (y * z) → rel x y
7676
not_rel_one_zero : ¬ rel 1 0
7777

78-
@[inherit_doc] infix:50 " ≤ᵥ " => ValuativeRel.rel
78+
@[inherit_doc ValuativeRel.rel]
79+
notation:50 (name := valuativeRel) a:50 " ≤ᵥ " b:51 => binrel% ValuativeRel.rel a b
7980

8081
namespace Valuation
8182

@@ -120,7 +121,14 @@ lemma rel_mul_left {x y : R} (z) : x ≤ᵥ y → (z * x) ≤ᵥ (z * y) := by
120121
instance : Trans (rel (R := R)) (rel (R := R)) (rel (R := R)) where
121122
trans h1 h2 := rel_trans h1 h2
122123

123-
lemma rel_mul {x x' y y' : R} (h1 : x ≤ᵥ y) (h2 : x' ≤ᵥ y') : x * x' ≤ᵥ y * y' := by
124+
protected alias rel.trans := rel_trans
125+
126+
lemma rel_trans' {x y z : R} (h1 : y ≤ᵥ z) (h2 : x ≤ᵥ y) : x ≤ᵥ z :=
127+
h2.trans h1
128+
129+
protected alias rel.trans' := rel_trans'
130+
131+
lemma rel_mul {x x' y y' : R} (h1 : x ≤ᵥ y) (h2 : x' ≤ᵥ y') : (x * x') ≤ᵥ y * y' := by
124132
calc x * x' ≤ᵥ x * y' := rel_mul_left _ h2
125133
_ ≤ᵥ y * y' := rel_mul_right _ h1
126134

@@ -259,6 +267,10 @@ theorem ValueGroupWithZero.mk_one_one : ValueGroupWithZero.mk (1 : R) 1 = 1 :=
259267
ValueGroupWithZero.sound (by simp) (by simp)
260268

261269
@[simp]
270+
theorem ValueGroupWithZero.mk_eq_one (x : R) (y : posSubmonoid R) :
271+
ValueGroupWithZero.mk x y = 1 ↔ x ≤ᵥ y ∧ y ≤ᵥ x := by
272+
simp [← mk_one_one, mk_eq_mk]
273+
262274
theorem ValueGroupWithZero.lift_zero {α : Sort*} (f : R → posSubmonoid R → α)
263275
(hf : ∀ (x y : R) (t s : posSubmonoid R), x * t ≤ᵥ y * s → y * s ≤ᵥ x * t → f x s = f y t) :
264276
ValueGroupWithZero.lift f hf 0 = f 0 1 :=
@@ -592,6 +604,34 @@ variable (R) in
592604
class IsNontrivial where
593605
condition : ∃ γ : ValueGroupWithZero R, γ ≠ 0 ∧ γ ≠ 1
594606

607+
lemma isNontrivial_iff_nontrivial_units :
608+
IsNontrivial R ↔ Nontrivial (ValueGroupWithZero R)ˣ := by
609+
constructor
610+
· rintro ⟨γ, hγ, hγ'⟩
611+
refine ⟨Units.mk0 _ hγ, 1, ?_⟩
612+
simp [← Units.val_eq_one, hγ']
613+
· rintro ⟨r, s, h⟩
614+
rcases eq_or_ne r 1 with rfl | hr
615+
· exact ⟨s.val, by simp, by simpa using h.symm⟩
616+
· exact ⟨r.val, by simp, by simpa using hr⟩
617+
618+
lemma isNontrivial_iff_isNontrivial :
619+
IsNontrivial R ↔ (valuation R).IsNontrivial := by
620+
constructor
621+
· rintro ⟨r, hr, hr'⟩
622+
induction r using ValueGroupWithZero.ind with | mk r s
623+
by_cases hs : valuation R s = 1
624+
· refine ⟨r, ?_, ?_⟩
625+
· simpa [valuation] using hr
626+
· simp only [ne_eq, ValueGroupWithZero.mk_eq_one, not_and, valuation, Valuation.coe_mk,
627+
MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, OneMemClass.coe_one] at hr' hs ⊢
628+
contrapose! hr'
629+
exact hr'.imp hs.right.trans' hs.left.trans
630+
· refine ⟨s, ?_, hs⟩
631+
simp [valuation, ← posSubmonoid_def]
632+
· rintro ⟨r, hr, hr'⟩
633+
exact ⟨valuation R r, hr, hr'⟩
634+
595635
variable (R) in
596636
/-- A ring with a valuative relation is discrete if its value group-with-zero
597637
has a maximal element `< 1`. -/

Mathlib/Topology/Algebra/Valued/NormedValued.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ instance {K : Type*} [NontriviallyNormedField K] [IsUltrametricDist K] :
6363
Valuation.RankOne (valuation (K := K)) where
6464
hom := .id _
6565
strictMono' := strictMono_id
66-
nontrivial' := (exists_one_lt_norm K).imp fun x h ↦ by
66+
exists_val_nontrivial := (exists_one_lt_norm K).imp fun x h ↦ by
6767
have h' : x ≠ 0 := norm_eq_zero.not.mp (h.gt.trans' (by simp)).ne'
6868
simp [valuation_apply, ← NNReal.coe_inj, h.ne', h']
6969

0 commit comments

Comments
 (0)