Inverse-power sums over multisets of naturals #
Multiset.invPowSum α m is the sum of n⁻ᵅ over a multiset m of naturals. A multiset t
dominates s when some submultiset of t matches s entry for entry, each matched entry of
t being at most its partner in s. Then s.invPowSum α ≤ t.invPowSum α at every exponent
0 ≤ α, and strictly so at every 0 < α when s does not dominate t in turn.
Dominance is equivalent to a counting condition of Hall type, that s has no more entries below
any threshold than t has, so it is first-order stochastic dominance of the counting
distributions, and it is decidable. At a natural exponent k, when every entry divides a common
denominator D, the sum times Dᵏ is the natural number divPowSum D k m.
Main definitions #
Multiset.invPowSum α m: the sum ofn⁻ᵅoverm.Multiset.Dominates,Multiset.StrictDominates: dominance and its strict part.Multiset.prodMul s t: the multiset of pairwise products.Multiset.divPowSum D k m: the sum of(D / n)ᵏoverm.
Main results #
Multiset.Dominates.invPowSum_le,Multiset.StrictDominates.invPowSum_lt: dominance orders the inverse-power sums at every exponent.Multiset.dominates_iff_forall: dominance is the counting condition.Multiset.invPowSum_prodMul: the sum over pairwise products is the product of the sums.Multiset.invPowSum_mul_pow_eq_divPowSum: clearing the common denominator.
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 #
A multiset t dominates s when some submultiset of t matches s entry for entry, each
matched entry of t being at most its partner in s.
Equations
- t.Dominates s = ∃ t' ≤ t, Multiset.Rel (fun (x1 x2 : ℕ) => x1 ≤ x2) t' s
Instances For
A multiset t strictly dominates s when it dominates s and s does not dominate it. It
does so 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 #
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✝ = { decide := decide (x✝¹.Dominates x✝) && decide ¬x✝.Dominates x✝¹, reflects_decide := ⋯ }
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 sum of (D / n)ᵏ over m. When every entry divides D it is invPowSum k m with the
common denominator Dᵏ cleared.
Equations
- Multiset.divPowSum D k m = (Multiset.map (fun (n : ℕ) => (D / n) ^ k) m).sum