The areas / V03. Sets, finite structures and big operators
Mathlib.Data.Multiset.DershowitzManna
4 declarations. Mathlib docs · Source
Dershowitz-Manna ordering
In this file we define the Dershowitz-Manna ordering on multisets. Specifically, for two multisets
M and N in a partial order (S, <), M is smaller than N in the Dershowitz-Manna ordering if
M can be obtained from N by replacing one or more elements in N by some finite number of
elements from S, each of which is smaller (in the underlying ordering over S) than one of the
replaced elements from N. We prove that, given a well-founded partial order on the underlying set,
the Dershowitz-Manna ordering defined over multisets is also well-founded.
Main results
Multiset.IsDershowitzMannaLT: the standard definition of theDershowitz-Manna ordering.Multiset.wellFounded_isDershowitzMannaLT: the main theorem about theDershowitz-Manna orderingbeing well-founded.
References
-
CoLoR, a Coq library on rewriting theory and termination. Our code here is inspired by their formalization and the theorem is called
mOrd_wfin the file MultisetList.v.
def Multiset.IsDershowitzMannaLT E3 #
{α : Type u_1} → [Preorder α] → Multiset α → Multiset α → Prop
The standard Dershowitz–Manna ordering.
theorem Multiset.IsDershowitzMannaLT.trans E1 #
∀ {α : Type u_1} [inst : Preorder α] {M N P : Multiset α},
M.IsDershowitzMannaLT N → N.IsDershowitzMannaLT P → M.IsDershowitzMannaLT P
IsDershowitzMannaLT is transitive.
theorem Multiset.wellFounded_isDershowitzMannaLT E3 #
∀ {α : Type u_1} [inst : Preorder α] [WellFoundedLT α], WellFounded Multiset.IsDershowitzMannaLT
Over a well-founded order, the Dershowitz-Manna order on multisets is well-founded.
instance Multiset.instWellFoundedIsDershowitzMannaLT E0 #
{α : Type u_1} → [inst : Preorder α] → [WellFoundedLT α] → WellFoundedRelation (Multiset α)