@@ -76,16 +76,14 @@ class ValuativeRel (R : Type*) [CommRing R] where
7676 vle_total (x y) : vle x y ∨ vle y x
7777 vle_trans {z y x} : vle x y → vle y z → vle x z
7878 vle_add {x y z} : vle x z → vle y z → vle (x + y) z
79- vle_mul_right {x y} (z) : vle x y → vle (x * z) (y * z)
79+ mul_vle_mul_left {x y} (h : vle x y) (z) : vle (x * z) (y * z)
8080 vle_mul_cancel {x y z} : ¬ vle z 0 → vle (x * z) (y * z) → vle x y
8181 not_vle_one_zero : ¬ vle 1 0
8282
8383@[inherit_doc] infix :50 " ≤ᵥ " => ValuativeRel.vle
8484
8585macro_rules | `($a ≤ᵥ $b) => `(binrel% ValuativeRel.vle $a $b)
8686
87- attribute [gcongr] ValuativeRel.vle_mul_right
88-
8987namespace Valuation
9088
9189variable {R Γ : Type *} [CommRing R] [LinearOrderedCommMonoidWithZero Γ]
@@ -109,7 +107,7 @@ namespace ValuativeRel
109107@ [deprecated (since := "2025-12-20" )] alias rel_total := vle_total
110108@ [deprecated (since := "2025-12-20" )] alias rel_trans := vle_trans
111109@ [deprecated (since := "2025-12-20" )] alias rel_add := vle_add
112- @ [deprecated (since := "2025-12-20" )] alias rel_mul_right := vle_mul_right
110+ @ [deprecated (since := "2025-12-20" )] alias rel_mul_right := mul_vle_mul_left
113111@ [deprecated (since := "2025-12-20" )] alias rel_mul_cancel := vle_mul_cancel
114112@ [deprecated (since := "2025-12-20" )] alias not_rel_one_zero := not_vle_one_zero
115113
@@ -132,7 +130,7 @@ lemma srel_iff {x y : R} : x <ᵥ y ↔ ¬ y ≤ᵥ x := Iff.rfl
132130
133131@ [deprecated (since := "2025-12-20" )] alias not_srel_iff := not_vlt
134132
135- @[simp]
133+ @ [simp, refl ]
136134lemma vle_refl (x : R) : x ≤ᵥ x := by
137135 cases vle_total x x <;> assumption
138136
@@ -153,7 +151,7 @@ protected alias vle.rfl := vle_rfl
153151
154152@[simp]
155153theorem zero_vle (x : R) : 0 ≤ᵥ x := by
156- simpa using vle_mul_right x ((vle_total 0 1 ).resolve_right not_vle_one_zero)
154+ simpa using mul_vle_mul_left ((vle_total 0 1 ).resolve_right not_vle_one_zero) x
157155
158156@ [deprecated (since := "2025-12-20" )] alias zero_rel := zero_vle
159157
@@ -163,12 +161,19 @@ lemma zero_vlt_one : (0 : R) <ᵥ 1 :=
163161
164162@ [deprecated (since := "2025-12-20" )] alias zero_srel_one := zero_vlt_one
165163
166- @[gcongr]
167- lemma vle_mul_left {x y : R} (z) : x ≤ᵥ y → z * x ≤ᵥ z * y := by
164+ @ [deprecated mul_vle_mul_left (since := "2026-01-06" )]
165+ lemma vle_mul_right {x y : R} (z) (h : x ≤ᵥ y) : x * z ≤ᵥ y * z :=
166+ mul_vle_mul_left h z
167+
168+ lemma mul_vle_mul_right {x y : R} (h : x ≤ᵥ y) (z) : z * x ≤ᵥ z * y := by
168169 rw [mul_comm z x, mul_comm z y]
169- apply vle_mul_right
170+ exact mul_vle_mul_left h z
171+
172+ @ [deprecated mul_vle_mul_right (since := "2025-01-06" )]
173+ lemma vle_mul_left {x y : R} (z) (h : x ≤ᵥ y) : z * x ≤ᵥ z * y :=
174+ mul_vle_mul_right h z
170175
171- @ [deprecated (since := "2025-12-20" )] alias rel_mul_left := vle_mul_left
176+ @ [deprecated (since := "2025-12-20" )] alias rel_mul_left := mul_vle_mul_right
172177
173178instance : Trans (vle (R := R)) (vle (R := R)) (vle (R := R)) where
174179 trans h1 h2 := vle_trans h1 h2
@@ -187,14 +192,13 @@ protected alias vle.trans' := vle_trans'
187192@ [deprecated (since := "2025-12-20" )] protected alias Rel.trans' := vle.trans'
188193
189194@[gcongr]
190- lemma mul_vle_mul {x x' y y' : R} (h1 : x ≤ᵥ y) (h2 : x' ≤ᵥ y') : x * x' ≤ᵥ y * y' := by
191- calc x * x' ≤ᵥ x * y' := vle_mul_left _ h2
192- _ ≤ᵥ y * y' := vle_mul_right _ h1
195+ lemma mul_vle_mul {x x' y y' : R} (h1 : x ≤ᵥ y) (h2 : x' ≤ᵥ y') : x * x' ≤ᵥ y * y' :=
196+ (mul_vle_mul_left h1 _).trans (mul_vle_mul_right h2 _)
193197
194198@ [deprecated (since := "2025-12-20" )] alias mul_rel_mul := mul_vle_mul
195199
196200@[simp] lemma mul_vle_mul_iff_left (hz : 0 <ᵥ z) : x * z ≤ᵥ y * z ↔ x ≤ᵥ y :=
197- ⟨vle_mul_cancel hz, vle_mul_right _ ⟩
201+ ⟨vle_mul_cancel hz, (mul_vle_mul_left · _) ⟩
198202
199203@ [deprecated (since := "2025-12-20" )] alias mul_rel_mul_iff_left := mul_vle_mul_iff_left
200204
@@ -206,11 +210,17 @@ lemma mul_vle_mul {x x' y y' : R} (h1 : x ≤ᵥ y) (h2 : x' ≤ᵥ y') : x * x'
206210@[simp] lemma mul_vlt_mul_iff_left (hz : 0 <ᵥ z) : x * z <ᵥ y * z ↔ x <ᵥ y :=
207211 (mul_vle_mul_iff_left hz).not
208212
213+ @[gcongr] alias ⟨_, mul_vlt_mul_left⟩ := mul_vlt_mul_iff_left
214+ @ [deprecated (since := "2026-01-06" )] alias vlt_mul_right := mul_vlt_mul_left
215+
209216@ [deprecated (since := "2025-12-20" )] alias mul_srel_mul_iff_left := mul_vlt_mul_iff_left
210217
211218@[simp] lemma mul_vlt_mul_iff_right (hx : 0 <ᵥ x) : x * y <ᵥ x * z ↔ y <ᵥ z :=
212219 (mul_vle_mul_iff_right hx).not
213220
221+ @[gcongr] alias ⟨_, mul_vlt_mul_right⟩ := mul_vlt_mul_iff_right
222+ @ [deprecated (since := "2026-01-06" )] alias vlt_mul_left := mul_vlt_mul_right
223+
214224@ [deprecated (since := "2025-12-20" )] alias mul_srel_mul_iff_right := mul_vlt_mul_iff_right
215225
216226@ [deprecated (since := "2025-11-04" )] alias rel_mul := mul_vle_mul
@@ -441,24 +451,24 @@ instance : LE (ValueGroupWithZero R) where
441451 · refine propext ⟨fun h => vle_trans ?_ (zero_vle _), fun h => vle_trans ?_ (zero_vle _)⟩
442452 · apply vle_mul_cancel (s * v).prop
443453 rw [mul_right_comm, Submonoid.coe_mul, ← mul_assoc]
444- apply vle_trans (vle_mul_right (u : R) (vle_mul_right (v : R) h₂))
454+ apply (mul_vle_mul_left (mul_vle_mul_left h₂ v) u).trans
445455 rw [mul_right_comm x]
446- apply vle_trans (vle_mul_right (u : R) (vle_mul_right (t : R) h))
447- apply vle_trans (vle_mul_right (u : R) (vle_mul_right (t : R) (vle_mul_right (s : R) hz)) )
456+ apply (mul_vle_mul_left (mul_vle_mul_left h t) u).trans
457+ apply vle_trans (mul_vle_mul_left (mul_vle_mul_left (mul_vle_mul_left hz s) t) u )
448458 simp
449459 · apply vle_mul_cancel (t * u).prop
450460 rw [mul_right_comm, Submonoid.coe_mul, ← mul_assoc]
451- apply vle_trans (vle_mul_right (v : R) (vle_mul_right (u : R) h₁))
461+ apply (mul_vle_mul_left (mul_vle_mul_left h₁ u) v).trans
452462 rw [mul_right_comm y]
453- apply vle_trans (vle_mul_right (v : R) (vle_mul_right (s : R) h))
454- apply vle_trans (vle_mul_right (v : R) (vle_mul_right (s : R) (vle_mul_right (t : R) hw)) )
463+ apply (mul_vle_mul_left (mul_vle_mul_left h s) v).trans
464+ apply vle_trans (mul_vle_mul_left (mul_vle_mul_left (mul_vle_mul_left hw t) s) v )
455465 simp
456466 · absurd hz
457467 apply vle_mul_cancel u.prop
458- simpa using vle_trans h₃ (vle_mul_right (v : R) hw )
468+ simpa using h₃.trans (mul_vle_mul_left hw v )
459469 · absurd hw
460470 apply vle_mul_cancel v.prop
461- simpa using vle_trans h₄ (vle_mul_right (u : R) hz )
471+ simpa using h₄.trans (mul_vle_mul_left hz u )
462472 · refine propext ⟨fun h => ?_, fun h => ?_⟩
463473 · apply vle_mul_cancel s.prop
464474 apply vle_mul_cancel hz
@@ -491,9 +501,9 @@ instance : LinearOrder (ValueGroupWithZero R) where
491501 apply vle_mul_cancel b₂.prop
492502 calc a₁ * c₂ * b₂
493503 _ = a₁ * b₂ * c₂ := by rw [mul_right_comm]
494- _ ≤ᵥ b₁ * a₂ * c₂ := vle_mul_right (c₂ : R) hab
504+ _ ≤ᵥ b₁ * a₂ * c₂ := mul_vle_mul_left hab _
495505 _ = b₁ * c₂ * a₂ := by rw [mul_right_comm]
496- _ ≤ᵥ c₁ * b₂ * a₂ := vle_mul_right (a₂ : R) hbc
506+ _ ≤ᵥ c₁ * b₂ * a₂ := mul_vle_mul_left hbc _
497507 _ = c₁ * a₂ * b₂ := by rw [mul_right_comm]
498508 le_antisymm a b hab hba := by
499509 induction a using ValueGroupWithZero.ind
@@ -533,7 +543,7 @@ instance : IsOrderedMonoid (ValueGroupWithZero R) where
533543 simp only [ValueGroupWithZero.mk_mul_mk, ValueGroupWithZero.mk_le_mk, Submonoid.coe_mul]
534544 conv_lhs => apply mul_mul_mul_comm
535545 conv_rhs => apply mul_mul_mul_comm
536- exact vle_mul_right _ hab
546+ exact mul_vle_mul_left hab _
537547
538548instance : Inv (ValueGroupWithZero R) where
539549 inv := ValueGroupWithZero.lift (fun x s => by
@@ -543,10 +553,10 @@ instance : Inv (ValueGroupWithZero R) where
543553 · simp [hx, hy]
544554 · absurd hy
545555 apply vle_mul_cancel s.prop
546- simpa using vle_trans h₂ (vle_mul_right (t : R) hx )
556+ simpa using vle_trans h₂ (mul_vle_mul_left hx t )
547557 · absurd hx
548558 apply vle_mul_cancel t.prop
549- simpa using vle_trans h₁ (vle_mul_right (s : R) hy )
559+ simpa using vle_trans h₁ (mul_vle_mul_left hy s )
550560 · simp only [dif_neg hx, dif_neg hy]
551561 apply ValueGroupWithZero.sound
552562 · simpa [mul_comm] using h₂
@@ -618,7 +628,7 @@ def ofValuation
618628 vle_total x y := le_total (v x) (v y)
619629 vle_trans := le_trans
620630 vle_add hab hbc := (map_add_le_max v _ _).trans (sup_le hab hbc)
621- vle_mul_right _ h := by simp [map_mul]; gcongr
631+ mul_vle_mul_left _ h := by simp [map_mul]; gcongr
622632 vle_mul_cancel h0 h := by
623633 rw [map_zero, le_zero_iff] at h0
624634 simp only [map_mul] at h
@@ -716,7 +726,7 @@ instance : ValuativeRel (WithPreorder R) where
716726 vle_total := vle_total (R := R)
717727 vle_trans := vle_trans (R := R)
718728 vle_add := vle_add (R := R)
719- vle_mul_right := vle_mul_right (R := R)
729+ mul_vle_mul_left := mul_vle_mul_left (R := R)
720730 vle_mul_cancel := vle_mul_cancel (R := R)
721731 not_vle_one_zero := not_vle_one_zero (R := R)
722732
@@ -729,7 +739,7 @@ def supp : Ideal R where
729739 carrier := { x | x ≤ᵥ 0 }
730740 add_mem' ha hb := vle_add ha hb
731741 zero_mem' := vle_refl _
732- smul_mem' x _ h := by simpa using vle_mul_left _ h
742+ smul_mem' x _ h := by simpa using mul_vle_mul_right h _
733743
734744@[simp]
735745lemma supp_def (x : R) : x ∈ supp R ↔ x ≤ᵥ 0 := Iff.refl _
@@ -774,48 +784,40 @@ lemma vlt.trans (hab : a <ᵥ b) (hbc : b <ᵥ c) : a <ᵥ c :=
774784
775785@ [deprecated (since := "2025-12-20" )] alias SRel.trans := vlt.trans
776786
777- lemma vle_mul_right_iff (hc : 0 <ᵥ c) : a * c ≤ᵥ b * c ↔ a ≤ᵥ b :=
778- ⟨vle_mul_cancel hc, vle_mul_right _⟩
787+ @ [deprecated (since := "2026-01-06" )] alias vle_mul_right_iff := mul_vle_mul_iff_left
779788
780789@ [deprecated (since := "2025-12-20" )] alias rel_mul_right_iff := vle_mul_right_iff
781790
782- lemma vle_mul_left_iff (hc : 0 <ᵥ c) : c * a ≤ᵥ c * b ↔ a ≤ᵥ b := by
783- simp [mul_comm c, vle_mul_right_iff hc]
784-
785- @ [deprecated (since := "2025-12-20" )] alias rel_mul_left_iff := vle_mul_left_iff
786-
787- lemma vlt_mul_right_iff (hc : 0 <ᵥ c) : a * c <ᵥ b * c ↔ a <ᵥ b :=
788- (vle_mul_right_iff hc).not
791+ @ [deprecated (since := "2026-01-06" )] alias vle_mul_left_iff := mul_vle_mul_iff_right
789792
790- @ [deprecated (since := "2025-12-20" )] alias srel_mul_right_iff := vlt_mul_right_iff
793+ @ [deprecated (since := "2025-12-20" )] alias rel_mul_left_iff := mul_vle_mul_iff_right
791794
792- @[gcongr ] alias ⟨_, vlt_mul_right⟩ := vlt_mul_right_iff
795+ @ [deprecated (since := "2026-01-06" ) ] alias vlt_mul_right_iff := mul_vlt_mul_iff_left
793796
794- @ [deprecated (since := "2025-12-20" )] alias srel_mul_right := vlt_mul_right
797+ @ [deprecated (since := "2025-12-20" )] alias srel_mul_right_iff := mul_vlt_mul_iff_left
795798
796- lemma vlt_mul_left_iff (hc : 0 <ᵥ c) : c * a <ᵥ c * b ↔ a <ᵥ b :=
797- (vle_mul_left_iff hc).not
799+ @ [deprecated (since := "2025-12-20" )] alias srel_mul_right := mul_vlt_mul_right
798800
799- @ [deprecated (since := "2025-12-20 " )] alias srel_mul_left_iff := vlt_mul_left_iff
801+ @ [deprecated (since := "2026-01-06 " )] alias vlt_mul_left_iff := mul_vlt_mul_iff_right
800802
801- @[gcongr ] alias ⟨_, vlt_mul_left⟩ := vlt_mul_left_iff
803+ @ [deprecated (since := "2025-12-20" ) ] alias srel_mul_left_iff := mul_vlt_mul_iff_right
802804
803- @ [deprecated (since := "2025-12-20" )] alias srel_mul_left := vlt_mul_left
805+ @ [deprecated (since := "2025-12-20" )] alias srel_mul_left := mul_vlt_mul_right
804806
805807lemma mul_vlt_mul_of_vlt_of_vle (hab : a <ᵥ b) (hcd : c ≤ᵥ d) (hd : 0 <ᵥ d) :
806808 a * c <ᵥ b * d :=
807- (vle_mul_left _ hcd).trans_vlt (vlt_mul_right hd hab)
809+ (mul_vle_mul_right hcd _ ).trans_vlt (mul_vlt_mul_left hd hab)
808810
809811@ [deprecated (since := "2025-12-20" )] alias mul_srel_mul_of_srel_of_rel := mul_vlt_mul_of_vlt_of_vle
810812
811813lemma mul_vlt_mul_of_vle_of_vlt (hab : a ≤ᵥ b) (hcd : c <ᵥ d) (ha : 0 <ᵥ a) :
812814 a * c <ᵥ b * d :=
813- (vlt_mul_left ha hcd).trans_vle (vle_mul_right _ hab)
815+ (mul_vlt_mul_right ha hcd).trans_vle (mul_vle_mul_left hab _ )
814816
815817@ [deprecated (since := "2025-12-20" )] alias mul_srel_mul_of_rel_of_srel := mul_vlt_mul_of_vle_of_vlt
816818
817819lemma mul_vlt_mul (hab : a <ᵥ b) (hcd : c <ᵥ d) : a * c <ᵥ b * d :=
818- (vle_mul_left _ hcd.vle).trans_vlt (vlt_mul_right ((zero_vle c).trans_vlt hcd) hab)
820+ (mul_vle_mul_right hcd.vle _ ).trans_vlt (mul_vlt_mul_left ((zero_vle c).trans_vlt hcd) hab)
819821
820822@ [deprecated (since := "2025-12-20" )] alias mul_srel_mul := mul_vlt_mul
821823
@@ -827,24 +829,22 @@ lemma pow_vle_pow (hab : a ≤ᵥ b) (n : ℕ) : a ^ n ≤ᵥ b ^ n := by
827829@ [deprecated (since := "2025-12-20" )] alias pow_rel_pow := pow_vle_pow
828830
829831lemma pow_vlt_pow (hab : a <ᵥ b) {n : ℕ} (hn : n ≠ 0 ) : a ^ n <ᵥ b ^ n := by
830- obtain (rfl | n) := n
831- · aesop
832- clear hn
833- induction n with
834- | zero => aesop
835- | succ _ _ => simp_all [pow_succ, mul_vlt_mul]
832+ induction n using Nat.twoStepInduction with
833+ | zero => contradiction
834+ | one => simpa
835+ | more _ _ => simp_all [pow_succ, mul_vlt_mul]
836836
837837@ [deprecated (since := "2025-12-20" )] alias pow_srel_pow := pow_vlt_pow
838838
839839lemma pow_vle_pow_of_vle_one (ha : a ≤ᵥ 1 ) {n m : ℕ} (hnm : n ≤ m) : a ^ m ≤ᵥ a ^ n := by
840840 obtain ⟨m, rfl⟩ := exists_add_of_le hnm
841- simpa [pow_add] using vle_mul_left (a ^ n) ( pow_vle_pow ha m)
841+ simpa [pow_add] using mul_vle_mul_right ( pow_vle_pow ha m) _
842842
843843@ [deprecated (since := "2025-12-20" )] alias pow_rel_pow_of_rel_one := pow_vle_pow_of_vle_one
844844
845845lemma pow_vle_pow_of_one_vle (ha : 1 ≤ᵥ a) {n m : ℕ} (hnm : n ≤ m) : a ^ n ≤ᵥ a ^ m := by
846846 obtain ⟨m, rfl⟩ := exists_add_of_le hnm
847- simpa [pow_add] using vle_mul_left (a ^ n) ( pow_vle_pow ha m)
847+ simpa [pow_add] using mul_vle_mul_right ( pow_vle_pow ha m) _
848848
849849@ [deprecated (since := "2025-12-20" )] alias pow_rel_pow_of_one_rel := pow_vle_pow_of_one_vle
850850
@@ -867,12 +867,12 @@ lemma zero_vlt_iff : 0 <ᵥ a ↔ a ≠ 0 := by
867867@ [deprecated (since := "2025-12-20" )] alias zero_srel_iff := zero_vlt_iff
868868
869869lemma vle_div_iff (hc : c ≠ 0 ) : a ≤ᵥ b / c ↔ a * c ≤ᵥ b := by
870- rw [← vle_mul_right_iff (c := c) (by simpa), div_mul_cancel₀ _ (by aesop)]
870+ rw [← mul_vle_mul_iff_left (by simpa), div_mul_cancel₀ _ (by aesop)]
871871
872872@ [deprecated (since := "2025-12-20" )] alias rel_div_iff := vle_div_iff
873873
874874lemma div_vle_iff (hc : c ≠ 0 ) : a / c ≤ᵥ b ↔ a ≤ᵥ b * c := by
875- rw [← vle_mul_right_iff (c := c) (by simpa), div_mul_cancel₀ _ (by aesop)]
875+ rw [← mul_vle_mul_iff_left (by simpa), div_mul_cancel₀ _ (by aesop)]
876876
877877@ [deprecated (since := "2025-12-20" )] alias div_rel_iff := div_vle_iff
878878
@@ -901,8 +901,8 @@ lemma inv_vlt_one (hx : x ≠ 0) : x⁻¹ <ᵥ 1 ↔ 1 <ᵥ x :=
901901
902902@ [deprecated (since := "2025-12-20" )] alias inv_srel_one := inv_vlt_one
903903
904- lemma one_vlt_inv (hx : x ≠ 0 ) : x⁻¹ <ᵥ 1 ↔ 1 <ᵥ x :=
905- (one_vle_inv hx).not
904+ lemma one_vlt_inv (hx : x ≠ 0 ) : 1 <ᵥ x⁻¹ ↔ x <ᵥ 1 :=
905+ (inv_vle_one hx).not
906906
907907@ [deprecated (since := "2025-12-20" )] alias one_srel_inv := one_vlt_inv
908908
0 commit comments