Utility lemmas #
theorem
one_sub_ge_rpow_of_pk_le_sqrt2_sub_one
(p k : ℝ)
(hp0 : 0 ≤ p)
(hp1 : p ≤ 1)
(gnn : 0 ≤ k)
(h : p * k ≤ √2 - 1)
:
Lemma 21 from Pǎtraşcu and Thorup, "The Power of Simple Tabulation Hashing" (arXiv:1011.5200).
The paper states a strict inequality, but the proof only establishes ≥: equality holds at the
boundary cases p = 0 or k = 0.
theorem
sum_fiber_card
{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
[DecidableEq β]
(f : α → β)
:
The fiber cardinalities of a function partition the domain: ∑ b, |f⁻¹(b)| = |α|.
This is the Fintype version of Finset.card_eq_sum_card_fiberwise over the full universe.