Zulip Chat Archive

Stream: lean4

Topic: Weird reducibility behaviour


Arthur Adjedj (Jun 04 2023 at 10:23):

I've encoutered something weird in regards to reducibility hints and type-class inferece.

abbrev Atom := Nat

instance instAtomDecEq : DecidableEq Atom := inferInstance

#synth DecidableEq Atom --works

attribute [irreducible] Atom

#synth DecidableEq Atom --doesn't work ?

instance : DecidableEq Atom := instAtomDecEq

#synth DecidableEq Atom --works again ?

I would have expected the second #synth to work here, given that instAtomDecEq is there. Is this the intended behaviour ?


Last updated: Dec 20 2023 at 11:08 UTC