Zulip Chat Archive

Stream: Is there code for X?

Topic: Applying ring_equiv.to_ring_hom


Moritz (Dec 21 2021 at 20:51):

Hi,
for the refactoring of sesquilinear forms the following trivial lemma comes up repeatedly and I wanted to ask whether it already exists somewhere.

lemma ring_equiv.to_ring_hom_apply {J : K ≃+* K} {x : K} : J.to_ring_hom x = J x :=
  by rw [J.to_ring_hom_eq_coe, J.coe_to_ring_hom]

Heather Macbeth (Dec 21 2021 at 21:00):

Good find! I think perhaps the issue is that docs#ring_equiv.to_ring_hom_eq_coe should be a simp lemma. Such things usually are, it might be an accidental omission here. Then the proof can be by simp.

Eric Wieser (Dec 21 2021 at 21:14):

I think we didn't agree on which direction simp should apply that lemma

Eric Wieser (Dec 21 2021 at 21:14):

Which is why it's not @[simp]

Heather Macbeth (Dec 21 2021 at 21:14):

Have we discussed this before? I thought that we prefer the coercion as the simp-normal form.

Eric Wieser (Dec 21 2021 at 21:24):

Maybe we came to a conclusion and didn't fully implement it

Eric Wieser (Dec 21 2021 at 21:24):

There's a discussion thread on zulip

Anne Baanen (Dec 22 2021 at 00:06):

I can't find the discussion. In any case, I had the insight recently that we could declare a blanket instance of the form [ring_hom_like F R S] : has_coe F (R →+* S). I worry that this will prove too hard to infer in practice, though.

Anne Baanen (Dec 22 2021 at 00:07):

So the coercion would be a good choice for simp-normal form if we ever want to go down that path :)


Last updated: Dec 20 2023 at 11:08 UTC