Zulip Chat Archive

Stream: mathlib4

Topic: OrderIso toFun


Chris Hughes (Mar 23 2023 at 17:54):

If I coerce an OrderIso to a function I get a nasty looking term displayed

import Mathlib.Order.Hom.Bounded

example {α β : Type _} [PartialOrder α] [PartialOrder β]
    (f : α o β) (a : α) : f a = sorry := by
  -- ↑(RelIso.toRelEmbedding f).toEmbedding a = sorryAx ((fun x => β) a)

I guess there needs to be some tidy up somewhere, but I haven't figured it out exactly yet. It seems to be causing some rewrites to fail in !4#3036

Arien Malec (Mar 23 2023 at 18:03):

I think I put the trick to this in the wiki

Arien Malec (Mar 23 2023 at 18:05):

I did!

Eric Wieser (Mar 23 2023 at 18:09):

docs#rel_embedding.coe_fn_to_embedding should be applying (edit: if you dsimp)

Eric Wieser (Mar 23 2023 at 18:10):

docs4#RelIso.instCoeFunRelIsoForAll is to blame

Eric Wieser (Mar 23 2023 at 18:11):

That should be removed or implemented with FunLike.coe

Chris Hughes (Mar 23 2023 at 20:27):

Thanks for figuring that out


Last updated: Dec 20 2023 at 11:08 UTC