Inverse-power sums over multisets of naturals #
Multiset.invPowSum α m sums n⁻ᵅ over m. t.Dominates s says some submultiset of t
matches s element-for-element with each matched entry of t at most its partner in s;
that alone forces s.invPowSum α ≤ t.invPowSum α simultaneously for every exponent
0 ≤ α. t.StrictDominates s adds ¬ s.Dominates t, which makes the inequality strict
for every 0 < α.
Domination is equivalent to a Hall-type counting condition — s has no more entries below
any threshold than t has — so it is first-order stochastic dominance of the counting
distributions, decided with card s * (card s + card t) comparisons. Certificates
therefore close by decide +kernel for multisets of a few hundred entries.
At a natural exponent k with every entry dividing a common denominator D, the sum
clears to the ℕ-valued divPowSum D k, so pinned-exponent comparisons also close by
decide.
Main results #
Inverse-power sums #
The sum of n⁻ᵅ over m. Entries equal to 0 contribute ⊤.
Equations
- Multiset.invPowSum α m = (Multiset.map (fun (n : ℕ) => (↑n)⁻¹ ^ α) m).sum
Instances For
Domination #
t.StrictDominates s: t dominates s but not conversely. By
dominates_iff_forall this is strict first-order stochastic dominance of the counting
distributions; it holds as soon as t has a spare entry over the matching, or some
matched entry strictly below its partner.
Equations
- t.StrictDominates s = (t.Dominates s ∧ ¬s.Dominates t)
Instances For
The Hall criterion #
Greedy matching: pair the least entry of s with any entry of t below it, which the
counting condition supplies and which leaves the condition intact for what remains.
Equations
- x✝¹.decidableDominates x✝ = decidable_of_iff (∀ k ∈ x✝, (Multiset.filter (fun (x : ℕ) => x ≤ k) x✝).card ≤ (Multiset.filter (fun (x : ℕ) => x ≤ k) x✝¹).card) ⋯
Equations
- x✝¹.decidableStrictDominates x✝ = Multiset.decidableStrictDominates._aux_1 x✝¹ x✝
Strict domination is strict on inverse-power sums #
Pairwise products #
The multiset of pairwise products of s and t.
Equations
- s.prodMul t = Multiset.map (fun (p : ℕ × ℕ) => p.1 * p.2) (s ×ˢ t)
Instances For
Common-denominator power sums #
The ℕ-valued common-denominator form of invPowSum at a natural exponent:
Σ (D/n)ᵏ over m. When every entry divides D, invPowSum k m is
divPowSum D k m / Dᵏ exactly, so pinned-exponent comparisons clear to ℕ
inequalities closed by decide.
Equations
- Multiset.divPowSum D k m = (Multiset.map (fun (n : ℕ) => (D / n) ^ k) m).sum
Instances For
Evaluation form on reals, for symbolic or pinned exponents.
Real form of the common-denominator identity.