Zulip Chat Archive

Stream: lean4

Topic: redundant instances when extending overlapping classes


Yuyang Zhao (Nov 16 2023 at 20:22):

import Lean.Meta.Instances

class A
class B
class C extends A, B
class D extends A, C
structure E extends A, C

#eval Lean.Meta.getInstancePriority? `D.toB -- some 1000
#eval Lean.Meta.getInstancePriority? `E.toB -- some 1000

It seems like Lean generates instances for all instance parameters from ancestor classes in *.mk.

Eric Wieser (Nov 18 2023 at 00:59):

I didn't see this message, but as you saw, filed lean4#2905 with a similar example


Last updated: Dec 20 2023 at 11:08 UTC