Commit 2024-08-17 12:07 fb7b6b78
View on Github →chore (Data.Multiset.Basic): avoid bundled ordered algebra for basic results on multisets (#14477)
Data.Multiset.Basic
is a fairly low-level file. Currently, it imports Algebra.Order.Monoid.Defs
to establish that multisets on a type are an StrictOrderedAddCancelCommMonoid
and uses that classes API in a dozen places. Unfortunately, this also adds, to this file and all that import it, the projections from the ordered monoids defined in Algebra.Order.Monoid.Defs
as instances for Lean to try when synthesizing a CommMonoid
impacting performance. This PR moves the ordered monoid instances to a new file Data.Multiset.OrderedMonoid
and makes minor changes to Basic
to avoid this import.