Skip to content

Commit 270b0ea

Browse files
committed
chore: remove Equiv.toFun_as_coe_apply (#7902)
This `simp` lemma was added during the port but tagged as probably unnecessary after fixing leanprover/lean4#1937. This PR confirms it is indeed no longer necessary. The only proofs that needed fixing were the one explicitly calling the new simp lemma. The porting note can go too.
1 parent bf077b1 commit 270b0ea

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

Mathlib/Data/MvPolynomial/Equiv.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def sumAlgEquiv : MvPolynomial (Sum S₁ S₂) R ≃ₐ[R] MvPolynomial S₁ (Mv
270270
intro r
271271
have A : algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R)) r = (C (C r) : _) := rfl
272272
have B : algebraMap R (MvPolynomial (Sum S₁ S₂) R) r = C r := rfl
273-
simp only [sumRingEquiv, mvPolynomialEquivMvPolynomial, Equiv.toFun_as_coe_apply,
273+
simp only [sumRingEquiv, mvPolynomialEquivMvPolynomial, Equiv.toFun_as_coe,
274274
Equiv.coe_fn_mk, B, sumToIter_C, A] }
275275
#align mv_polynomial.sum_alg_equiv MvPolynomial.sumAlgEquiv
276276

Mathlib/Logic/Equiv/Defs.lean

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ instance : Trans Equiv Equiv Equiv where
185185
@[simp, mfld_simps] theorem toFun_as_coe (e : α ≃ β) : e.toFun = e := rfl
186186
#align equiv.to_fun_as_coe Equiv.toFun_as_coe
187187

188-
-- porting note: `simp` should prove this using `toFun_as_coe`, but it doesn't.
189-
-- This might be a bug in `simp` -- see https://github.com/leanprover/lean4/issues/1937
190-
-- If this issue is fixed then the simp linter probably will start complaining, and
191-
-- this theorem can be deleted hopefully without breaking any `simp` proofs.
192-
@[simp] theorem toFun_as_coe_apply (e : α ≃ β) (x : α) : e.toFun x = e x := rfl
193-
194188
@[simp, mfld_simps] theorem invFun_as_coe (e : α ≃ β) : e.invFun = e.symm := rfl
195189
#align equiv.inv_fun_as_coe Equiv.invFun_as_coe
196190

Mathlib/Logic/Equiv/TransferInstance.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def linearEquiv (e : α ≃ β) [AddCommMonoid β] [Module R β] : by
534534
{ Equiv.addEquiv e with
535535
map_smul' := fun r x => by
536536
apply e.symm.injective
537-
simp only [toFun_as_coe_apply, RingHom.id_apply, EmbeddingLike.apply_eq_iff_eq]
537+
simp only [toFun_as_coe, RingHom.id_apply, EmbeddingLike.apply_eq_iff_eq]
538538
exact Iff.mpr (apply_eq_iff_eq_symm_apply _) rfl }
539539
#align equiv.linear_equiv Equiv.linearEquiv
540540

Mathlib/Topology/Homeomorph.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ end
592592
def piCongrLeft {ι ι' : Type*} {Y : ι' → Type*} [∀ j, TopologicalSpace (Y j)]
593593
(e : ι ≃ ι') : (∀ i, Y (e i)) ≃ₜ ∀ j, Y j where
594594
continuous_toFun := continuous_pi <| e.forall_congr_left.mp <| fun i ↦ by
595-
simpa only [Equiv.toFun_as_coe_apply, Equiv.piCongrLeft_apply_apply] using continuous_apply i
595+
simpa only [Equiv.toFun_as_coe, Equiv.piCongrLeft_apply_apply] using continuous_apply i
596596
continuous_invFun := Pi.continuous_precomp' e
597597
toEquiv := Equiv.piCongrLeft _ e
598598

Mathlib/Topology/UniformSpace/Equiv.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ theorem coe_punitProd : ⇑(punitProd α) = Prod.snd :=
349349
def piCongrLeft {ι ι' : Type*} {β : ι' → Type*} [∀ j, UniformSpace (β j)]
350350
(e : ι ≃ ι') : (∀ i, β (e i)) ≃ᵤ ∀ j, β j where
351351
uniformContinuous_toFun := uniformContinuous_pi.mpr <| e.forall_congr_left.mp <| fun i ↦ by
352-
simpa only [Equiv.toFun_as_coe_apply, Equiv.piCongrLeft_apply_apply] using
352+
simpa only [Equiv.toFun_as_coe, Equiv.piCongrLeft_apply_apply] using
353353
Pi.uniformContinuous_proj _ i
354354
uniformContinuous_invFun := Pi.uniformContinuous_precomp' _ e
355355
toEquiv := Equiv.piCongrLeft _ e

0 commit comments

Comments
 (0)