defmatchingTupleEquiv {P : Type*} (S : FinsetP) (r : ℕ) :
(Fin r ↪ S) ≃ {e : Fin r ↪ P // ∀ i, e i ∈S} where
body · 5
lines
toFun e := ⟨⟨fun i => (e i).1, fun i j h => e.injective (Subtype.ext h)⟩,
fun i => (e i).2⟩
invFun e := ⟨fun i => ⟨e.1 i, e.2 i⟩, fun i j h => e.1.injective (congrArg Subtype.val h)⟩
left_inv e :=by ext i; rfl
right_inv e :=by apply Subtype.ext; ext i; rfl
theoremcard_matchingTuple {P : Type*} [FintypeP] [DecidableEqP]
(S : FinsetP) (r : ℕ) :
Fintype.card {e : Fin r ↪ P // ∀ i, e i ∈S} = S.card.descFactorial r :=by
proof · 2
lines
rw [←Fintype.card_congr (matchingTupleEquiv S r), Fintype.card_embedding_eq]
simp only [Fintype.card_coe, Fintype.card_fin]
theoremsum_matching_factorials {NP : Type*} [FintypeN] [FintypeP] [DecidableEqP]
(S : N→FinsetP) (r : ℕ) :
(∑ n, (S n).card.descFactorial r) =
∑e : Fin r ↪ P, Fintype.card {n : N // ∀ i, e i ∈S n} :=by
proof · 4
lines
classical
have h :=Fintype.card_congr (incidenceSwap (fun n (e : Fin r ↪ P) =>∀ i, e i ∈S n))
simp only [Fintype.card_sigma, card_matchingTuple] at h
exact h
A uniform bound on the number of lifts of each tuple gives the lower-order
factorial-moment upper bound used by common-center extraction.
theoremsum_matching_factorials_le {NP : Type*} [FintypeN] [FintypeP] [DecidableEqP]
(S : N→FinsetP) (r C : ℕ)
(hcount : ∀e : Fin r ↪ P, Fintype.card {n : N // ∀ i, e i ∈S n} ≤C) :
(∑ n, (S n).card.descFactorial r) ≤ (Fintype.card P).descFactorial r * C:=by
proof · 5
lines
classical
rw [sum_matching_factorials]
calc
_ ≤∑_e : Fin r ↪ P, C:=Finset.sum_le_sum fun e _ => hcount e
_ = _ :=by simp
A family of distinct tuples each admitting a lift supplies the high
factorial-moment lower bound; no unique-lift assumption is required.
theoremcard_tuples_le_sum_matching_factorials {NP : Type*}
[FintypeN] [FintypeP] [DecidableEqP]
(S : N→FinsetP) (r : ℕ) (E : Finset (Fin r ↪ P))
(hlift : ∀ e ∈E, ∃ n, ∀ i, e i ∈S n) :
E.card ≤∑ n, (S n).card.descFactorial r :=by
proof · 11
lines
classical
rw [sum_matching_factorials]
calcE.card = ∑ _e ∈E, 1:=by simp
_ ≤∑ e ∈E, Fintype.card {n : N // ∀ i, e i ∈S n} :=by
apply Finset.sum_le_sum
intro e he
obtain ⟨n, hn⟩ := hlift e he
have : Nonempty {n : N // ∀ i, e i ∈S n} := ⟨⟨n, hn⟩⟩
exact Fintype.card_pos_iff.mpr this
_ ≤ _ :=Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ E) (by simp)