Skip to content

Commit 207daae

Browse files
committed
feat(RingTheory/Valuation/ValuativeRel): strict valuative relation (#30262)
extracted out of #27163 a way of discussing unbundled `posSubmonoid`
1 parent 95fae5d commit 207daae

File tree

1 file changed

+41
-15
lines changed
  • Mathlib/RingTheory/Valuation/ValuativeRel

1 file changed

+41
-15
lines changed

Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ namespace ValuativeRel
101101

102102
variable {R : Type*} [CommRing R] [ValuativeRel R]
103103

104+
/-- The strict version of the valuative relation. -/
105+
def srel (x y : R) : Prop := ¬ y ≤ᵥ x
106+
107+
@[inherit_doc] infix:50 " <ᵥ " => ValuativeRel.srel
108+
109+
macro_rules | `($a <ᵥ $b) => `(binrel% ValuativeRel.srel $a $b)
110+
111+
lemma srel_iff (x y : R) : x <ᵥ y ↔ ¬ y ≤ᵥ x := Iff.rfl
112+
113+
@[simp]
114+
lemma not_srel_iff {x y : R} : ¬ x <ᵥ y ↔ y ≤ᵥ x := Iff.rfl.not_left
115+
104116
@[simp]
105117
lemma rel_refl (x : R) : x ≤ᵥ x := by
106118
cases rel_total x x <;> assumption
@@ -116,6 +128,10 @@ protected alias rel.rfl := rel_rfl
116128
theorem zero_rel (x : R) : 0 ≤ᵥ x := by
117129
simpa using rel_mul_right x ((rel_total 0 1).resolve_right not_rel_one_zero)
118130

131+
@[simp]
132+
lemma zero_srel_one : (0 : R) <ᵥ 1 :=
133+
not_rel_one_zero
134+
119135
lemma rel_mul_left {x y : R} (z) : x ≤ᵥ y → (z * x) ≤ᵥ (z * y) := by
120136
rw [mul_comm z x, mul_comm z y]
121137
apply rel_mul_right
@@ -137,19 +153,21 @@ lemma rel_mul {x x' y y' : R} (h1 : x ≤ᵥ y) (h2 : x' ≤ᵥ y') : (x * x')
137153
theorem rel_add_cases (x y : R) : x + y ≤ᵥ x ∨ x + y ≤ᵥ y :=
138154
(rel_total y x).imp (fun h => rel_add .rfl h) (fun h => rel_add h .rfl)
139155

156+
lemma zero_srel_mul {x y : R} (hx : 0 <ᵥ x) (hy : 0 <ᵥ y) : 0 <ᵥ x * y := by
157+
contrapose! hy
158+
rw [not_srel_iff] at hy ⊢
159+
rw [show (0 : R) = x * 0 by simp, mul_comm x y, mul_comm x 0] at hy
160+
exact rel_mul_cancel hx hy
161+
140162
variable (R) in
141163
/-- The submonoid of elements `x : R` whose valuation is positive. -/
142164
def posSubmonoid : Submonoid R where
143-
carrier := { x | ¬ x ≤ᵥ 0}
144-
mul_mem' {x y} hx hy := by
145-
dsimp only [Set.mem_setOf_eq] at hx hy ⊢
146-
contrapose! hy
147-
rw [show (0 : R) = x * 0 by simp, mul_comm x y, mul_comm x 0] at hy
148-
exact rel_mul_cancel hx hy
149-
one_mem' := not_rel_one_zero
165+
carrier := { x | 0 <ᵥ x }
166+
mul_mem' := zero_srel_mul
167+
one_mem' := zero_srel_one
150168

151169
@[simp]
152-
lemma posSubmonoid_def (x : R) : x ∈ posSubmonoid R ↔ ¬ x ≤ᵥ 0 := Iff.refl _
170+
lemma posSubmonoid_def (x : R) : x ∈ posSubmonoid R ↔ 0 <ᵥ x := Iff.rfl
153171

154172
@[simp]
155173
lemma right_cancel_posSubmonoid (x y : R) (u : posSubmonoid R) :
@@ -421,9 +439,8 @@ instance : LinearOrder (ValueGroupWithZero R) where
421439

422440
@[simp]
423441
theorem ValueGroupWithZero.mk_lt_mk (x y : R) (t s : posSubmonoid R) :
424-
ValueGroupWithZero.mk x t < ValueGroupWithZero.mk y s ↔
425-
x * s ≤ᵥ y * t ∧ ¬ y * t ≤ᵥ x * s :=
426-
Iff.rfl
442+
ValueGroupWithZero.mk x t < ValueGroupWithZero.mk y s ↔ x * s <ᵥ y * t := by
443+
rw [lt_iff_not_ge, srel_iff, mk_le_mk]
427444

428445
instance : Bot (ValueGroupWithZero R) where
429446
bot := 0
@@ -552,6 +569,11 @@ lemma isEquiv {Γ₁ Γ₂ : Type*}
552569
intro x y
553570
simp_rw [← Valuation.Compatible.rel_iff_le]
554571

572+
lemma _root_.Valuation.Compatible.srel_iff_lt {Γ₀ : Type*}
573+
[LinearOrderedCommMonoidWithZero Γ₀] {v : Valuation R Γ₀} [v.Compatible] {x y : R} :
574+
x <ᵥ y ↔ v x < v y := by
575+
simp [lt_iff_not_ge, ← Valuation.Compatible.rel_iff_le, srel_iff]
576+
555577
@[simp]
556578
lemma _root_.Valuation.apply_posSubmonoid_ne_zero {Γ : Type*} [LinearOrderedCommMonoidWithZero Γ]
557579
(v : Valuation R Γ) [v.Compatible] (x : posSubmonoid R) :
@@ -689,9 +711,9 @@ lemma exists_valuation_posSubmonoid_div_valuation_posSubmonoid_eq (γ : (ValueGr
689711
∃ (a b : posSubmonoid R), valuation R a / valuation _ (b : R) = γ := by
690712
obtain ⟨a, b, hab⟩ := exists_valuation_div_valuation_eq γ.val
691713
lift a to posSubmonoid R using by
692-
rw [posSubmonoid_def, ← valuation_eq_zero_iff]
693-
intro H
694-
simp [H, eq_comm] at hab
714+
contrapose! hab
715+
rw [posSubmonoid_def, not_srel_iff, ← valuation_eq_zero_iff] at hab
716+
simp [hab, eq_comm]
695717
use a, b
696718

697719
-- See `exists_valuation_div_valuation_eq` for the version that works for all rings.
@@ -784,13 +806,17 @@ variable {A B : Type*} [CommRing A] [CommRing B]
784806
[ValuativeRel A] [ValuativeRel B] [Algebra A B]
785807
[ValuativeExtension A B]
786808

809+
lemma srel_iff_srel (a b : A) :
810+
algebraMap A B a <ᵥ algebraMap A B b ↔ a <ᵥ b := by
811+
rw [srel_iff, rel_iff_rel, srel_iff]
812+
787813
variable (A B) in
788814
/-- The morphism of `posSubmonoid`s associated to an algebra map.
789815
This is used in constructing `ValuativeExtension.mapValueGroupWithZero`. -/
790816
@[simps]
791817
def mapPosSubmonoid : posSubmonoid A →* posSubmonoid B where
792818
toFun := fun ⟨a,ha⟩ => ⟨algebraMap _ _ a,
793-
by simpa only [posSubmonoid_def, ← (algebraMap A B).map_zero, rel_iff_rel] using ha⟩
819+
by simpa only [posSubmonoid_def, ← (algebraMap A B).map_zero, srel_iff_srel] using ha⟩
794820
map_one' := by simp
795821
map_mul' := by simp
796822

0 commit comments

Comments
 (0)