Skip to content

Commit

Permalink
chore: more simpNF cleanup (#19395)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Nov 23, 2024
1 parent 9b9e6ff commit b5155f3
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 92 deletions.
24 changes: 1 addition & 23 deletions Mathlib/LinearAlgebra/Multilinear/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,6 @@ theorem curryFinFinset_symm_apply {k l n : ℕ} {s : Finset (Fin n)} (hk : #s =
m <| finSumEquivOfFinset hk hl (Sum.inr i) :=
rfl

-- @[simp] -- Porting note: simpNF linter, lhs simplifies, added aux version below
theorem curryFinFinset_symm_apply_piecewise_const {k l n : ℕ} {s : Finset (Fin n)} (hk : #s = k)
(hl : #sᶜ = l)
(f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
Expand All @@ -1734,42 +1733,21 @@ theorem curryFinFinset_symm_apply_piecewise_const {k l n : ℕ} {s : Finset (Fin
rw [finSumEquivOfFinset_inr, Finset.piecewise_eq_of_not_mem]
exact Finset.mem_compl.1 (Finset.orderEmbOfFin_mem _ _ _)

@[simp]
theorem curryFinFinset_symm_apply_piecewise_const_aux {k l n : ℕ} {s : Finset (Fin n)}
(hk : #s = k) (hl : #sᶜ = l)
(f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
(x y : M') :
((⇑f fun _ => x) (fun i => (Finset.piecewise s (fun _ => x) (fun _ => y)
((sᶜ.orderEmbOfFin hl) i))) = f (fun _ => x) fun _ => y) := by
have := curryFinFinset_symm_apply_piecewise_const hk hl f x y
simp only [curryFinFinset_symm_apply, finSumEquivOfFinset_inl, Finset.orderEmbOfFin_mem,
Finset.piecewise_eq_of_mem, finSumEquivOfFinset_inr] at this
exact this

@[simp]
theorem curryFinFinset_symm_apply_const {k l n : ℕ} {s : Finset (Fin n)} (hk : #s = k)
(hl : #sᶜ = l)
(f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
(x : M') : ((curryFinFinset R M₂ M' hk hl).symm f fun _ => x) = f (fun _ => x) fun _ => x :=
rfl

-- @[simp] -- Porting note: simpNF, lhs simplifies, added aux version below
theorem curryFinFinset_apply_const {k l n : ℕ} {s : Finset (Fin n)} (hk : #s = k)
(hl : #sᶜ = l) (f : MultilinearMap R (fun _ : Fin n => M') M₂) (x y : M') :
(curryFinFinset R M₂ M' hk hl f (fun _ => x) fun _ => y) =
f (s.piecewise (fun _ => x) fun _ => y) := by
-- Porting note: `rw` fails
refine (curryFinFinset_symm_apply_piecewise_const hk hl _ _ _).symm.trans ?_
-- `rw` fails
rw [LinearEquiv.symm_apply_apply]

@[simp]
theorem curryFinFinset_apply_const_aux {k l n : ℕ} {s : Finset (Fin n)} (hk : #s = k)
(hl : #sᶜ = l) (f : MultilinearMap R (fun _ : Fin n => M') M₂) (x y : M') :
(f fun i => Sum.elim (fun _ => x) (fun _ => y) ((⇑ (Equiv.symm (finSumEquivOfFinset hk hl))) i))
= f (s.piecewise (fun _ => x) fun _ => y) := by
rw [← curryFinFinset_apply]
apply curryFinFinset_apply_const

end MultilinearMap

end Currying
Expand Down
3 changes: 0 additions & 3 deletions Mathlib/NumberTheory/Modular.lean
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ def lcRow0Extend {cd : Fin 2 → ℤ} (hcd : IsCoprime (cd 0) (cd 1)) :
rw [neg_sq]
exact hcd.sq_add_sq_ne_zero, LinearEquiv.refl ℝ (Fin 2 → ℝ)]

-- `simpNF` times out, but only in CI where all of `Mathlib` is imported
attribute [nolint simpNF] lcRow0Extend_apply lcRow0Extend_symm_apply

/-- The map `lcRow0` is proper, that is, preimages of cocompact sets are finite in
`[[* , *], [c, d]]`. -/
theorem tendsto_lcRow0 {cd : Fin 2 → ℤ} (hcd : IsCoprime (cd 0) (cd 1)) :
Expand Down
6 changes: 5 additions & 1 deletion Mathlib/NumberTheory/ModularForms/SlashActions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,14 @@ theorem is_invariant_const (A : SL(2, ℤ)) (x : ℂ) :
zpow_neg, zpow_one, inv_one, mul_one, neg_zero, zpow_zero]

/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/
-- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex
theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) :=
is_invariant_const _ _

/-- Variant of `is_invariant_one` with the left hand side in simp normal form. -/
@[simp]
theorem is_invariant_one' (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] (A : GL(2, ℝ)⁺) = 1 := by
simpa using is_invariant_one A

/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`,
if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`,
and it acts on `ℍ` via Möbius transformations. -/
Expand Down
16 changes: 7 additions & 9 deletions Mathlib/NumberTheory/Padics/PadicIntegers.lean
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ def Coe.ringHom : ℤ_[p] →+* ℚ_[p] := (subring p).subtype
@[simp, norm_cast]
theorem coe_pow (x : ℤ_[p]) (n : ℕ) : (↑(x ^ n) : ℚ_[p]) = (↑x : ℚ_[p]) ^ n := rfl

-- @[simp] -- Porting note: not in simpNF
theorem mk_coe (k : ℤ_[p]) : (⟨k, k.2⟩ : ℤ_[p]) = k := Subtype.coe_eta _ _
theorem mk_coe (k : ℤ_[p]) : (⟨k, k.2⟩ : ℤ_[p]) = k := by simp

/-- The inverse of a `p`-adic integer with norm equal to `1` is also a `p`-adic integer.
Otherwise, the inverse is defined to be `0`. -/
Expand All @@ -165,10 +164,8 @@ instance : CharZero ℤ_[p] where
cast_injective m n h :=
Nat.cast_injective (R := ℚ_[p]) (by rw [Subtype.ext_iff] at h; norm_cast at h)

@[norm_cast] -- @[simp] -- Porting note: not in simpNF
theorem intCast_eq (z1 z2 : ℤ) : (z1 : ℤ_[p]) = z2 ↔ z1 = z2 := by
suffices (z1 : ℚ_[p]) = z2 ↔ z1 = z2 from Iff.trans (by norm_cast) this
norm_cast
@[norm_cast]
theorem intCast_eq (z1 z2 : ℤ) : (z1 : ℤ_[p]) = z2 ↔ z1 = z2 := by simp

@[deprecated (since := "2024-04-05")] alias coe_int_eq := intCast_eq

Expand Down Expand Up @@ -280,8 +277,7 @@ theorem norm_eq_padic_norm {q : ℚ_[p]} (hq : ‖q‖ ≤ 1) : @norm ℤ_[p] _
@[simp]
theorem norm_p : ‖(p : ℤ_[p])‖ = (p : ℝ)⁻¹ := padicNormE.norm_p

-- @[simp] -- Porting note: not in simpNF
theorem norm_p_pow (n : ℕ) : ‖(p : ℤ_[p]) ^ n‖ = (p : ℝ) ^ (-n : ℤ) := padicNormE.norm_p_pow n
theorem norm_p_pow (n : ℕ) : ‖(p : ℤ_[p]) ^ n‖ = (p : ℝ) ^ (-n : ℤ) := by simp

private def cauSeq_to_rat_cauSeq (f : CauSeq ℤ_[p] norm) : CauSeq ℚ_[p] fun a => ‖a‖ :=
fun n => f n, fun _ hε => by simpa [norm, norm_def] using f.cauchy hε⟩
Expand Down Expand Up @@ -413,10 +409,12 @@ theorem norm_lt_one_mul {z1 z2 : ℤ_[p]} (hz2 : ‖z2‖ < 1) : ‖z1 * z2‖ <
‖z1 * z2‖ = ‖z1‖ * ‖z2‖ := by simp
_ < 1 := mul_lt_one_of_nonneg_of_lt_one_right (norm_le_one _) (norm_nonneg _) hz2

-- @[simp] -- Porting note: not in simpNF
theorem mem_nonunits {z : ℤ_[p]} : z ∈ nonunits ℤ_[p] ↔ ‖z‖ < 1 := by
rw [lt_iff_le_and_ne]; simp [norm_le_one z, nonunits, isUnit_iff]

theorem not_isUnit_iff {z : ℤ_[p]} : ¬IsUnit z ↔ ‖z‖ < 1 := by
simpa using mem_nonunits

/-- A `p`-adic number `u` with `‖u‖ = 1` is a unit of `ℤ_[p]`. -/
def mkUnits {u : ℚ_[p]} (h : ‖u‖ = 1) : ℤ_[p]ˣ :=
let z : ℤ_[p] := ⟨u, le_of_eq h⟩
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/NumberTheory/Padics/RingHoms.lean
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ theorem ker_toZModPow (n : ℕ) :
rw [zmod_congr_of_sub_mem_span n x _ 0 _ h, cast_zero]
apply appr_spec

-- @[simp] -- Porting note: not in simpNF
-- This is not a simp lemma; simp can't match the LHS.
theorem zmod_cast_comp_toZModPow (m n : ℕ) (h : m ≤ n) :
(ZMod.castHom (pow_dvd_pow p h) (ZMod (p ^ m))).comp (@toZModPow p _ n) = @toZModPow p _ m := by
apply ZMod.ringHom_eq_of_ker_eq
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Order/Closure.lean
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ variable [PartialOrder α] [PartialOrder β] {u : β → α} (l : LowerAdjoint u
theorem mem_closed_iff_closure_le (x : α) : x ∈ l.closed ↔ u (l x) ≤ x :=
l.closureOperator.isClosed_iff_closure_le

@[simp, nolint simpNF] -- Porting note: lemma does prove itself, seems to be a linter error
@[simp]
theorem closure_is_closed (x : α) : u (l x) ∈ l.closed :=
l.idempotent x

Expand Down
6 changes: 2 additions & 4 deletions Mathlib/Order/Compare.lean
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ theorem cmp_swap [Preorder α] [@DecidableRel α (· < ·)] (a b : α) : (cmp a
by_cases h : a < b <;> by_cases h₂ : b < a <;> simp [h, h₂, Ordering.swap]
exact lt_asymm h h₂

-- Porting note: Not sure why the simpNF linter doesn't like this. @semorrison
@[simp, nolint simpNF]
@[simp]
theorem cmpLE_toDual [LE α] [@DecidableRel α (· ≤ ·)] (x y : α) :
cmpLE (toDual x) (toDual y) = cmpLE y x :=
rfl
Expand All @@ -148,8 +147,7 @@ theorem cmpLE_ofDual [LE α] [@DecidableRel α (· ≤ ·)] (x y : αᵒᵈ) :
cmpLE (ofDual x) (ofDual y) = cmpLE y x :=
rfl

-- Porting note: Not sure why the simpNF linter doesn't like this. @semorrison
@[simp, nolint simpNF]
@[simp]
theorem cmp_toDual [LT α] [@DecidableRel α (· < ·)] (x y : α) :
cmp (toDual x) (toDual y) = cmp y x :=
rfl
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Order/Filter/Germ/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ theorem coe_compTendsto (f : α → β) {lc : Filter γ} {g : γ → α} (hg : T
rfl

-- Porting note https://github.com/leanprover-community/mathlib4/issues/10959
-- simp cannot prove this
-- simp can't match the LHS.
@[simp, nolint simpNF]
theorem compTendsto'_coe (f : Germ l β) {lc : Filter γ} {g : γ → α} (hg : Tendsto g lc l) :
f.compTendsto' _ hg.germ_tendsto = f.compTendsto g hg :=
Expand Down
19 changes: 5 additions & 14 deletions Mathlib/Order/Filter/Pointwise.lean
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ theorem pureOneHom_apply (a : α) : pureOneHom a = pure a :=
variable [One β]

@[to_additive]
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11119): removed `simp` attribute because `simpNF` says it can prove it.
protected theorem map_one [FunLike F α β] [OneHomClass F α β] (φ : F) : map φ 1 = 1 := by
rw [Filter.map_one', map_one, pure_one]
simp

end One

Expand Down Expand Up @@ -303,9 +302,7 @@ theorem mul_pure : f * pure b = f.map (· * b) :=
map₂_pure_right

@[to_additive]
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11119): removed `simp` attribute because `simpNF` says it can prove it.
theorem pure_mul_pure : (pure a : Filter α) * pure b = pure (a * b) :=
map₂_pure
theorem pure_mul_pure : (pure a : Filter α) * pure b = pure (a * b) := by simp

@[to_additive (attr := simp)]
theorem le_mul_iff : h ≤ f * g ↔ ∀ ⦃s⦄, s ∈ f → ∀ ⦃t⦄, t ∈ g → s * t ∈ h :=
Expand Down Expand Up @@ -408,9 +405,7 @@ theorem div_pure : f / pure b = f.map (· / b) :=
map₂_pure_right

@[to_additive]
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11119): removed `simp` attribute because `simpNF` says it can prove it.
theorem pure_div_pure : (pure a : Filter α) / pure b = pure (a / b) :=
map₂_pure
theorem pure_div_pure : (pure a : Filter α) / pure b = pure (a / b) := by simp

@[to_additive]
protected theorem div_le_div : f₁ ≤ f₂ → g₁ ≤ g₂ → f₁ / g₁ ≤ f₂ / g₂ :=
Expand Down Expand Up @@ -826,9 +821,7 @@ theorem smul_pure : f • pure b = f.map (· • b) :=
map₂_pure_right

@[to_additive]
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11119): removed `simp` attribute because `simpNF` says it can prove it.
theorem pure_smul_pure : (pure a : Filter α) • (pure b : Filter β) = pure (a • b) :=
map₂_pure
theorem pure_smul_pure : (pure a : Filter α) • (pure b : Filter β) = pure (a • b) := by simp

@[to_additive]
theorem smul_le_smul : f₁ ≤ f₂ → g₁ ≤ g₂ → f₁ • g₁ ≤ f₂ • g₂ :=
Expand Down Expand Up @@ -914,9 +907,7 @@ theorem pure_vsub : (pure a : Filter β) -ᵥ g = g.map (a -ᵥ ·) :=
theorem vsub_pure : f -ᵥ pure b = f.map (· -ᵥ b) :=
map₂_pure_right

-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11119): removed `simp` attribute because `simpNF` says it can prove it.
theorem pure_vsub_pure : (pure a : Filter β) -ᵥ pure b = (pure (a -ᵥ b) : Filter α) :=
map₂_pure
theorem pure_vsub_pure : (pure a : Filter β) -ᵥ pure b = (pure (a -ᵥ b) : Filter α) := by simp

theorem vsub_le_vsub : f₁ ≤ f₂ → g₁ ≤ g₂ → f₁ -ᵥ g₁ ≤ f₂ -ᵥ g₂ :=
map₂_mono
Expand Down
11 changes: 5 additions & 6 deletions Mathlib/Order/Heyting/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1084,28 +1084,27 @@ theorem top_eq : (⊤ : PUnit) = unit :=
theorem bot_eq : (⊥ : PUnit) = unit :=
rfl

@[simp, nolint simpNF]
@[simp]
theorem sup_eq : a ⊔ b = unit :=
rfl

@[simp, nolint simpNF]
@[simp]
theorem inf_eq : a ⊓ b = unit :=
rfl

@[simp]
theorem compl_eq : aᶜ = unit :=
rfl

@[simp, nolint simpNF]
@[simp]
theorem sdiff_eq : a \ b = unit :=
rfl

@[simp, nolint simpNF]
@[simp]
theorem hnot_eq : ¬a = unit :=
rfl

-- eligible for `dsimp`
@[simp, nolint simpNF]
@[simp]
theorem himp_eq : a ⇨ b = unit :=
rfl

Expand Down
1 change: 0 additions & 1 deletion Mathlib/Order/Interval/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ theorem mem_mk {hx : x.1 ≤ x.2} : a ∈ mk x hx ↔ x.1 ≤ a ∧ a ≤ x.2 :=
theorem mem_def : a ∈ s ↔ s.fst ≤ a ∧ a ≤ s.snd :=
Iff.rfl

-- @[simp] -- Porting note: not in simpNF
theorem coe_nonempty (s : NonemptyInterval α) : (s : Set α).Nonempty :=
nonempty_Icc.2 s.fst_le_snd

Expand Down
6 changes: 2 additions & 4 deletions Mathlib/Order/LiminfLimsup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -829,15 +829,13 @@ theorem HasBasis.limsup_eq_sInf_univ_of_empty {f : ι → α} {v : Filter ι}
limsup f v = sInf univ :=
HasBasis.liminf_eq_sSup_univ_of_empty (α := αᵒᵈ) hv i hi h'i

-- Porting note: simp_nf linter incorrectly says: lhs does not simplify when using simp on itself.
@[simp, nolint simpNF]
@[simp]
theorem liminf_nat_add (f : ℕ → α) (k : ℕ) :
liminf (fun i => f (i + k)) atTop = liminf f atTop := by
change liminf (f ∘ (· + k)) atTop = liminf f atTop
rw [liminf, liminf, ← map_map, map_add_atTop_eq_nat]

-- Porting note: simp_nf linter incorrectly says: lhs does not simplify when using simp on itself.
@[simp, nolint simpNF]
@[simp]
theorem limsup_nat_add (f : ℕ → α) (k : ℕ) : limsup (fun i => f (i + k)) atTop = limsup f atTop :=
@liminf_nat_add αᵒᵈ _ f k

Expand Down
14 changes: 1 addition & 13 deletions Mathlib/Order/SupIndep.lean
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,7 @@ theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a :=
obtain ⟨j, hj, hji⟩ := hi'
rwa [Subtype.ext hji] at hj

/-
Porting note: simpNF linter returns
"Left-hand side does not simplify, when using the simp lemma on itself."
However, simp does indeed solve the following.
example {α ι} [Lattice α] [OrderBot α] (s : Finset ι) (f : ι → α) :
(s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by simp
See https://github.com/leanprover-community/batteries/issues/71 for the simpNF issue.
-/
@[simp, nolint simpNF]
@[simp]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by
refine ⟨fun h t ht i his hit => ?_, SupIndep.attach⟩
classical
Expand Down
1 change: 0 additions & 1 deletion Mathlib/RingTheory/DedekindDomain/SInteger.lean
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ theorem unit_valuation_eq_one (x : S.unit K) {v : HeightOneSpectrum R} (hv : v
v.valuation ((x : Kˣ) : K) = 1 :=
x.property v hv

-- Porting note: `apply_inv_coe` fails the simpNF linter
/-- The group of `S`-units is the group of units of the ring of `S`-integers. -/
@[simps apply_val_coe symm_apply_coe]
def unitEquivUnitsInteger : S.unit K ≃* (S.integer K)ˣ where
Expand Down
4 changes: 1 addition & 3 deletions Mathlib/RingTheory/Ideal/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,7 @@ variable {R : Type u} [Semiring R]
theorem add_eq_sup {I J : Ideal R} : I + J = I ⊔ J :=
rfl

-- dsimp loops when applying this lemma to its LHS,
-- probably https://github.com/leanprover/lean4/pull/2867
@[simp, nolint simpNF]
@[simp]
theorem zero_eq_bot : (0 : Ideal R) = ⊥ :=
rfl

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/RingTheory/Valuation/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ theorem coe_mk (f : R →*₀ Γ₀) (h) : ⇑(Valuation.mk f h) = f := rfl

theorem toFun_eq_coe (v : Valuation R Γ₀) : v.toFun = v := rfl

@[simp] -- Porting note: requested by simpNF as toFun_eq_coe LHS simplifies
@[simp]
theorem toMonoidWithZeroHom_coe_eq_coe (v : Valuation R Γ₀) :
(v.toMonoidWithZeroHom : R → Γ₀) = v := rfl

Expand Down
8 changes: 2 additions & 6 deletions Mathlib/RingTheory/Valuation/ValuationSubring.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ instance : SetLike (ValuationSubring K) K where
replace h := SetLike.coe_injective' h
congr

-- Porting note https://github.com/leanprover-community/mathlib4/issues/10959
-- simp cannot prove this
@[simp, nolint simpNF]
theorem mem_carrier (x : K) : x ∈ A.carrier ↔ x ∈ A := Iff.refl _

@[simp]
Expand Down Expand Up @@ -668,9 +665,9 @@ def unitsModPrincipalUnitsEquivResidueFieldUnits :
local instance : MulOneClass ({ x // x ∈ unitGroup A } ⧸
Subgroup.comap (Subgroup.subtype (unitGroup A)) (principalUnitGroup A)) := inferInstance

-- @[simp] -- Porting note: not in simpNF
theorem unitsModPrincipalUnitsEquivResidueFieldUnits_comp_quotientGroup_mk :
A.unitsModPrincipalUnitsEquivResidueFieldUnits.toMonoidHom.comp (QuotientGroup.mk' _) =
(A.unitsModPrincipalUnitsEquivResidueFieldUnits : _ ⧸ Subgroup.comap _ _ →* _).comp
(QuotientGroup.mk' (A.principalUnitGroup.subgroupOf A.unitGroup)) =
A.unitGroupToResidueFieldUnits := rfl

theorem unitsModPrincipalUnitsEquivResidueFieldUnits_comp_quotientGroup_mk_apply
Expand Down Expand Up @@ -793,7 +790,6 @@ namespace Valuation

variable {Γ : Type*} [LinearOrderedCommGroupWithZero Γ] (v : Valuation K Γ) (x : Kˣ)

-- @[simp] -- Porting note: not in simpNF
theorem mem_unitGroup_iff : x ∈ v.valuationSubring.unitGroup ↔ v x = 1 :=
IsEquiv.eq_one_iff_eq_one (Valuation.isEquiv_valuation_valuationSubring _).symm

Expand Down

0 comments on commit b5155f3

Please sign in to comment.