Commit 2026-04-10 08:12 ffb5b8a6
View on Github →chore: fix instance diamond for order on Subtype (IsPartition) (#37488)
We have the instance Setoid.Partition.le saying
instance Partition.le : LE (Subtype (@IsPartition α)) :=
⟨fun x y => mkClasses x.1 x.2.2 ≤ mkClasses y.1 y.2.2⟩
Except that Subtype (@IsPartition α) already has an order as this is a subtype of Set (Set α) and a subtype of an ordered type is ordered. And of course these two orders don't coincide (even propositionally)
example : Subtype.instLE (α := Set (Set α)) (P := IsPartition) = Partition.le := rfl -- fails
We introduce a type synonym to avoid the diamond.