We define a multiset extension of a relation r, which is generally expected
to be a strict order. The idea behind the extension is that a multiset is
"one-step" smaller than another if it is obtained by replacing an element
in the larger multiset by any amount of smaller (by r) elements.
MultisetExt1 defines the "one-step" relation. The full extension is formed
by taking the transitive closure over MultisetExt1.
- rel: ∀ {α : Type u_1} {r : Rel α α} (M M' : Multiset α) (s : α), (∀ m ∈ M', r m s) → Thesis.MultisetExt1 r (M + M') (s ::ₘ M)
Instances For
Equations
Instances For
MSESeq r l M N represents a sequence of smaller-than steps between M and N,
with all intermediate steps in l. This is isomorphic to MultisetExt; see
MSESeq.iff_multiset_ext.
- single: ∀ {α : Type u_1} {r : Rel α α} {M N : Multiset α}, Thesis.MultisetExt1 r M N → Thesis.MSESeq r [M, N] M N
- step: ∀ {α : Type u_1} {r : Rel α α} {l : List (Multiset α)} {M N O : Multiset α}, Thesis.MultisetExt1 r M N → Thesis.MSESeq r l N O → Thesis.MSESeq r (M :: l) M O
Instances For
There is a sequence of MSE1 steps iff MultisetExt r M N holds.
Every index in l represents a step l[n] <# l[n+1].
Equations
- ⋯ = ⋯
Instances For
An element has never increased if for all steps M <# N, the count of x is no higher in M than in N
Equations
- Thesis.never_increased_elem hseq x = ∀ (n : ℕ) (hlen : n < l.length - 1), Multiset.count x l[n] ≤ Multiset.count x l[n + 1]
Instances For
An element has decreased in a step if the count in M is one less than the count in N.
Equations
- Thesis.decreased_elem1 M N m = (Multiset.count m M + 1 = Multiset.count m N)
Instances For
An element has decreased if there is some step M <# N in which it has decreased.
Equations
- Thesis.decreased_elem hseq x = ∃ (n : ℕ) (h : n < l.length - 1), Thesis.decreased_elem1 l[n] l[n + 1] x
Instances For
If an element has never increased, in particular the count at the end is no larger than at the start.
If an element has decreased between (M + M') and (M + {s}), it must be s.
Two elements that have decreased in a single step must be equal, i.e. a one-step decreased element is unique.
An element is the largest decreased element (LDE) if it has decreased, and no decreased element is larger than it.
Equations
- Thesis.is_largest_decreased_elem hseq m = (Thesis.decreased_elem hseq m ∧ ∀ (m' : α), Thesis.decreased_elem hseq m' → ¬r m m')
Instances For
Extending a MSESeq with a step that has a larger decreased elem makes that element the sequence's LDE.
Extending a MSESeq with a step that has a smaller decreased elem doesn't change the sequence's LDE.
An element decreases in every step.
If an element increases in a step, a larger element must decrease.
A sequence always has a largest decreased element.
The largest decreased element has never increased; if it had, there must be a larger element which has decreased, yielding a contradiction.
The largest decreased element has never increased, and therefore has lower multiplicity at the end of the sequence than at the beginning.
MSESeq is irreflexive; this follows trivially from
MSESeq.has_largest_decreased_elem and
MSESeq.largest_decreased_elem_has_lower_multiplicity
Equations
- ⋯ = ⋯
If N <¹# M, and M consists of a ::ₘ M0, then either
- some other element is deleted, so a appears in N
- a is deleted and replaced by a set of reducts K
Equations
- ⋯ = ⋯