Zulip Chat Archive

Stream: mathlib4

Topic: Functor id / Seq id


Xavier Roblot (Jan 07 2023 at 16:58):

In mathlib4#1353, the following code (line 264)

theorem mul_map_seq (x y : FreeMagma α) :
    ((· * ·) <$> x <*> y : id (FreeMagma α)) = (x * y : FreeMagma α) := rfl
#align free_magma.mul_map_seq FreeMagma.mul_map_seq

fails with errors failed to synthesize instance Functor id and failed to synthesize instance Seq id.
I am really not an expert in this part of mathlib, but I have the feeling this should follow from the instance Traversable FreeMagma that is proved a few lines before. In any case, it fails here and I don't know what to do to fix it.

Sky Wilshaw (Jan 07 2023 at 16:59):

Id is the correct spelling for the Functor instance.

Sky Wilshaw (Jan 07 2023 at 16:59):

If you encounter id.mk, it should be translated to something like (pure : _ \to Id _).

Xavier Roblot (Jan 07 2023 at 17:02):

Thanks!


Last updated: Dec 20 2023 at 11:08 UTC