Selection and decreasing multiset complexity #
Selection minimizes an ordinal priority, then maximizes an ordinal weight, with a fixed well-order resolving ties. Complexity records the weights of distinct members at least as heavy as the selection, followed by the selected multiplicity. Thus duplicating other members does not increase the first component.
Removing one selected copy, doubling the other multiplicities, and adjoining lighter members of no smaller priority strictly decreases this well-founded complexity. The argument abstracts the finite-expression reduction in Berarducci, Definitions 9.1--9.3 and Lemma 9.5; it assumes no series, ring, or valuation. The first component uses the Mathlib Dershowitz--Manna relation.
Ordinal priorities and weights for selection in a finite multiset.
- priority : α → Ordinal.{u}
The ordinal priority to minimize when selecting a multiset member.
- weight : α → Ordinal.{u}
The ordinal weight to maximize among members of equal least priority.
Instances For
A member of least priority, greatest weight among those, and least in a fixed well-order.
Instances For
Every nonempty finite multiset has a unique selected member.
The selected member of a nonempty multiset.
Equations
- s.selected w hw = Exists.choose ⋯
Instances For
The multiplicity of the selected member.
Equations
- s.selectedExponent w hw = Multiset.count (s.selected w hw) w
Instances For
The weights of distinct members at least as heavy as the selected member.
Equations
- s.relevantValues w hw = Multiset.map (fun (y : α) => s.weight y) {y ∈ w.toFinset | s.weight (s.selected w hw) ≤ s.weight y}.val
Instances For
Equal selections and equal relevant members give the same relevant-weight multiset.
The distinct relevant weights, followed by the selected multiplicity.
Equations
- s.complexity w hw = (s.relevantValues w hw, s.selectedExponent w hw)
Instances For
Lexicographic decrease of relevant weights in the Dershowitz--Manna order, then multiplicity.
Equations
- Multiset.SelectionWeights.ComplexityLT = Prod.Lex Multiset.IsDershowitzMannaLT fun (x1 x2 : ℕ) => x1 < x2
Instances For
The complexity order is well-founded.
The multiset remaining after removing every copy of the selected member.
Equations
- s.unselected w hw = Multiset.filter (fun (x : α) => x ≠ s.selected w hw) w
Instances For
Remove one selected copy, double all other copies, and adjoin the replacement multiset.
Equations
- s.reduced w hw t = t + Multiset.replicate (s.selectedExponent w hw - 1) (s.selected w hw) + (s.unselected w hw + s.unselected w hw)
Instances For
A replacement excluding the selected member reduces its multiplicity by one.
A member distinct from the selection and absent from the replacement is doubled.
If a selected copy remains, lighter replacements of no smaller priority preserve selection.
Deleting the selection and introducing only lighter new members strictly lowers complexity.
Removing every selected copy strictly lowers complexity when the remainder is nonempty.
Replacing one selected copy by lighter members of no smaller priority strictly lowers complexity, even while doubling every other member.
The selected copies and the remaining factors partition the original multiset.
The complexity consists of the relevant distinct-factor weights and selected multiplicity.