Zulip Chat Archive

Stream: new members

Topic: Failed to synthesize instance


Owen Anderson (Nov 01 2023 at 03:29):

Can anyone shed light on why I'm getting "failed to synthesize instance, Inter ↑subsets" on this snippet:

@[ext]
structure SetPartition (set : Set α) :=
  subsets : Set (Set α)
  union_to_all: Set.sUnion subsets = set
  all_disjoint :  (suba subb : subsets), suba  subb  suba  subb = 

Ruben Van de Velde (Nov 01 2023 at 06:28):

#mwe, please

Filippo A. E. Nuccio (Nov 01 2023 at 12:29):

You should convince lean that suba must be regarder as a set:

structure SetPartition (set : Set α) :=
  subsets : Set (Set α)
  union_to_all: sUnion subsets = set
  all_disjoint :  (suba subb : subsets), suba  subb  (suba : Set α)  subb = 

Patrick Massot (Nov 01 2023 at 13:29):

It would be much better to have them being sets from the beginning:

@[ext]
structure SetPartition (set : Set α) :=
  subsets : Set (Set α)
  union_to_all: Set.sUnion subsets = set
  all_disjoint :  suba  subsets,  subb  subsets, suba  subb  suba  subb = 

Last updated: Dec 20 2023 at 11:08 UTC