Skip to content

Commit fc35a05

Browse files
committed
chore: fix naming in WithVal (#35972)
Minor cleanup post #34049
1 parent 207001c commit fc35a05

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Mathlib/NumberTheory/Padics/WithVal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ theorem withValUniformEquiv_norm_le_one_iff {p : ℕ} [Fact p.Prime]
177177
(Valued.isClopen_closedBall _ one_ne_zero)
178178
simpa [Metric.closedBall] using IsUltrametricDist.isClopen_closedBall (0 : ℚ_[p]) one_ne_zero
179179
| ih a =>
180-
rw [Valued.valuedCompletion_apply, ← WithVal.apply_equiv, withValUniformEquiv_cast_apply]
180+
rw [Valued.valuedCompletion_apply, ← WithVal.apply_ofVal, withValUniformEquiv_cast_apply]
181181
exact (norm_rat_le_one_iff_padicValuation_le_one p)
182182

183183
end Padic

Mathlib/RingTheory/LaurentSeries.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ theorem valuation_LaurentSeries_equal_extension :
10401040
(LaurentSeriesPkg K).isDenseInducing.extend Valued.v = (Valued.v : K⸨X⸩ → ℤᵐ⁰) := by
10411041
apply IsDenseInducing.extend_unique
10421042
· intro x
1043-
rw [← WithVal.apply_equiv, valuation_eq_LaurentSeries_valuation K]
1043+
rw [← WithVal.apply_ofVal, valuation_eq_LaurentSeries_valuation K]
10441044
rfl
10451045
· exact Valued.continuous_valuation (K := K⸨X⸩)
10461046

Mathlib/Topology/Algebra/Valued/WithVal.lean

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ def valuation : Valuation (WithVal v) Γ₀ := v.comap (equiv v)
155155

156156
instance : Valued (WithVal v) Γ₀ := Valued.mk' (valuation v)
157157

158-
theorem apply_equiv (r : WithVal v) : v r.ofVal = Valued.v r := rfl
159-
@[simp] theorem apply_symm_equiv (r : R) : Valued.v (toVal v r) = v r := rfl
158+
theorem apply_ofVal (r : WithVal v) : v r.ofVal = Valued.v r := rfl
159+
@[simp] theorem valued_toVal (r : R) : Valued.v (toVal v r) = v r := rfl
160+
161+
@[deprecated (since := "2026-03-02")] alias apply_equiv := apply_ofVal
162+
@[deprecated (since := "2026-03-02")] alias apply_symm_equiv := valued_toVal
160163

161164
instance [CharZero R] : CharZero (WithVal v) :=
162165
.of_addMonoidHom (equiv v).symm.toAddMonoidHom (by simp) (equiv v).symm.injective
@@ -381,7 +384,7 @@ theorem IsEquiv.uniformContinuous_congr
381384
intro γ
382385
obtain ⟨r, s, hr₀, hs₀, hr⟩ := hw γ
383386
use .mk0 (v r / v s) (by simp [h.eq_zero, hr₀.ne.symm, hs₀.ne.symm]), fun x hx ↦ ?_
384-
rw [← hr, congr_apply, RingEquiv.refl_apply, Set.mem_setOf_eq, apply_symm_equiv, lt_div_iff₀ hs₀,
387+
rw [← hr, congr_apply, RingEquiv.refl_apply, Set.mem_setOf_eq, valued_toVal, lt_div_iff₀ hs₀,
385388
← map_mul, ← lt_def, ← ofVal_mul, ← h.orderRingIso_apply, ← h.orderRingIso.lt_symm_apply]
386389
simpa [lt_def, lt_div_iff₀ (h.pos_iff.2 hs₀)] using hx
387390

@@ -407,7 +410,7 @@ theorem IsEquiv.uniformContinuous_equiv_symm [Valued R Γ₀'] (hv : Valued.v =
407410
intro γ
408411
obtain ⟨r, s, hr₀, hs₀, hr⟩ := hw γ
409412
use .mk0 (w r / w s) (by simp [h.eq_zero, hr₀.ne.symm, hs₀.ne.symm]), fun x hx ↦ ?_
410-
simp only [equiv_symm_apply, Set.mem_setOf_eq, apply_symm_equiv]
413+
simp only [equiv_symm_apply, Set.mem_setOf_eq, valued_toVal]
411414
simp [hv] at hx
412415
rw [← hr, lt_div_iff₀ hs₀, ← map_mul, ← lt_def,
413416
← h.orderRingIso_apply, ← h.orderRingIso.lt_symm_apply]
@@ -452,7 +455,7 @@ theorem IsEquiv.valuedCompletion_le_one_iff {K : Type*} [Field K] {v : Valuation
452455
| hp =>
453456
exact (mapEquiv (h.uniformEquiv _ _)).toHomeomorph.isClosed_setOf_iff
454457
(Valued.isClopen_closedBall _ one_ne_zero) (Valued.isClopen_closedBall _ one_ne_zero)
455-
| ih a => simpa [Valued.valuedCompletion_apply, ← WithVal.apply_equiv] using h.le_one_iff_le_one
458+
| ih a => simpa [Valued.valuedCompletion_apply, ← WithVal.apply_ofVal] using h.le_one_iff_le_one
456459

457460
end Equivalence
458461

0 commit comments

Comments
 (0)