[Merged by Bors] - fix: reintroduce to_fun_as_coe as simp lemma#931
[Merged by Bors] - fix: reintroduce to_fun_as_coe as simp lemma#931
Conversation
|
OK so adding In an ideal world, someone (unfortunately not me) will make |
|
I don't think it's a good idea to proceed with this. I suggest a work-around for having simps produce the right lemmas at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.40.5Bsimps.5D.20making.20lemmas.20not.20in.20simp.20normal.20form/near/315268553 |
|
If we don't import Mathlib.Algebra.Group.WithOne.Basic
/-
from mathlib:
@[simp, to_additive]
theorem MulHom.coe_mk [Mul M] [Mul N] (f : M → N) (hmul) : (MulHom.mk f hmul : M → N) = f := rfl
-/
-- this goal shows up in the middle of a chain of rewrites done by `simp`
example [Mul α] [Mul β] (e : α ≃* β) (x : α) :
Function.comp (↑(MulEquiv.toMulHom (MulEquiv.symm e)))
(↑(MulEquiv.toMulHom e)) x = x := by
-- goal contains no `toFun`
rw [MulHom.coe_mk] -- this lemma contains no `toFun` and is a `simp` lemma
-- goal now contains `MulHom.toFun` (the first `↑`)
sorryI don't know how to stop |
|
I don't understand why this is tagged |
|
bors merge |
This is a proposed fix for the broken simp calls in #922. See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60simp.60.20calls.20broken.20in.20mathlib4.23922/near/314783451 for more details. Note that `to_fun_as_coe` was a syntactic tautology when it was ported, but this is no longer the case because we now have `FunLike`.
|
Pull request successfully merged into master. Build succeeded:
|
This is a proposed fix for the broken simp calls in #922. See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60simp.60.20calls.20broken.20in.20mathlib4.23922/near/314783451 for more details. Note that
to_fun_as_coewas a syntactic tautology when it was ported, but this is no longer the case because we now haveFunLike.