Skip to content

Commit 8df0e1b

Browse files
committed
perf: make valuation unexposed (#41492)
1 parent 32ea179 commit 8df0e1b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Mathlib/RingTheory/DedekindDomain/AdicValuation.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,15 @@ theorem intValuation_eq_one_iff {v : HeightOneSpectrum R} {x : R} :
324324
variable (K) in
325325
/-- The `v`-adic valuation of `x : K` is the valuation of `r` divided by the valuation of `s`,
326326
where `r` and `s` are chosen so that `x = r/s`. -/
327+
@[no_expose]
327328
def valuation (v : HeightOneSpectrum R) : Valuation K ℤᵐ⁰ :=
328329
v.intValuation.extendToLocalization
329330
(fun r hr => Set.mem_compl <| v.intValuation_ne_zero' ⟨r, hr⟩) K
330331

331332
theorem valuation_def (x : K) :
332333
v.valuation K x =
333334
v.intValuation.extendToLocalization
334-
(fun r hr => Set.mem_compl (v.intValuation_ne_zero' ⟨r, hr⟩)) K x :=
335-
rfl
335+
(fun r hr => Set.mem_compl (v.intValuation_ne_zero' ⟨r, hr⟩)) K x := by rw [valuation]
336336

337337
/--
338338
The `v`-adic valuation of `r / s : K` is the valuation of `r` divided by the valuation of `s`. -/

Mathlib/RingTheory/DedekindDomain/SelmerGroup.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def valuationOfNeZeroToFun (x : Kˣ) : Multiplicative ℤ :=
9696
theorem valuationOfNeZeroToFun_eq (x : Kˣ) :
9797
(v.valuationOfNeZeroToFun x : ℤᵐ⁰) = v.valuation K x := by
9898
classical
99-
rw [show v.valuation K x = _ * _ by rfl]
99+
rw [show v.valuation K x = _ * _ by rw [valuation_def]; rfl]
100100
rw [Units.val_inv_eq_inv_val]
101101
change _ = ite _ _ _ * (ite _ _ _)⁻¹
102102
simp_rw [IsLocalization.toLocalizationMap_sec, SubmonoidClass.coe_subtype,

0 commit comments

Comments
 (0)