Zulip Chat Archive
Stream: lean4
Topic: Cannot find synthesization order for instance
Ben (May 18 2025 at 13:57):
As part of something I get this weird message
class Thing (T U: Type) extends Coe T U
instance (T U: Type) [t: Thing T U] : Coe T U := t.toCoe
with
cannot find synthesization order for instance instCoeOfThing with type
(T U : Type) → [t : Thing T U] → Coe T U
all remaining arguments have metavariables:
Thing ?T U
Anyone know what is going on here?
Aaron Liu (May 18 2025 at 14:04):
See the docstring for docs#semiOutParam
Aaron Liu (May 18 2025 at 14:06):
Also see https://lean-lang.org/doc/reference/latest/Type-Classes/Instance-Synthesis/#class-output-parameters
Robin Arnez (May 18 2025 at 16:28):
i.e.
class Thing (T : semiOutParam Type) (U : Type) extends Coe T U
instance {T U : Type} [t : Thing T U] : Coe T U := t.toCoe
Last updated: Dec 20 2025 at 21:32 UTC