OAI/Probability/MatroidSecretary/Secretary/Prefix.lean
10 declarations, 0 contain sorry, 0 declared as axioms
Finite combinatorial probability for the random secretary prefix. The Bernoulli mask used to draw the prefix length is part of the initial seed; its cardinality has the binomial law, and it is independent of the uniformly random arrival permutation. No product-law assertion conditional on that full seed is made.
Source: sections/secretary.tex, eq:secretary-prefix-mask, lines 54–66; SHA256 3554fe0f7296782edf63cc7f1305c377e7a7b9d8f8948b9510ea4ad02a702d63. These supporting laws include n=0, k=0, k=n, and Bernoulli rates 0 and 1.
- lemma
OAI.MatroidProphet.Secretary.bitsWeight_constantline 30 - lemma
OAI.MatroidProphet.Secretary.bernoulli_cardinality_massline 41 - lemma
OAI.MatroidProphet.Secretary.bitsWeight_permline 59 - lemma
OAI.MatroidProphet.Secretary.bitsExpectation_permline 64 - lemma
OAI.MatroidProphet.Secretary.prefix_filter_eq_mapline 73 - lemma
OAI.MatroidProphet.Secretary.prefix_filter_cardline 85 - lemma
OAI.MatroidProphet.Secretary.integral_uniform_eq_averageline 90 - theorem
OAI.MatroidProphet.Secretary.uniform_prefix_averageline 100Source documentation
Conditional only on the prefix length, the actual uniform-permutation prefix has the uniform law on all subsets of that cardinality.
theorem uniform_prefix_average {n : ℕ} {k : ℕ} (hk : k ≤ n) (f : Finset (Fin n) → ℝ) : (∑ σ : Equiv.Perm (Fin n), f (univ.filter fun e : Fin n => (σ.symm e).val < k)) / Fintype.card (Equiv.Perm (Fin n)) = (∑ S ∈ (univ : Finset (Fin n)).powersetCard k, f S) / Nat.choose n k := by … - theorem
OAI.MatroidProphet.Secretary.uniform_prefix_atomline 113Source documentation
Exact fixed-length atom law, including cardinality mismatch.
theorem uniform_prefix_atom {n : ℕ} {k : ℕ} (hk : k ≤ n) (S : Finset (Fin n)) : (∑ σ : Equiv.Perm (Fin n), if (univ.filter fun e : Fin n => (σ.symm e).val < k) = S then (1 : ℝ) else 0) / Fintype.card (Equiv.Perm (Fin n)) = if k = S.card then (Nat.choose n k : ℝ)⁻¹ else 0 := by … - theorem
OAI.MatroidProphet.Secretary.integral_uniform_prefixline 125Source documentation
Measure-theoretic form of the fixed-length prefix averaging law.
theorem integral_uniform_prefix {n : ℕ} {k : ℕ} (hk : k ≤ n) [MeasurableSpace (Equiv.Perm (Fin n))] [MeasurableSingletonClass (Equiv.Perm (Fin n))] (f : Finset (Fin n) → ℝ) : (∫ σ, f (univ.filter fun e : Fin n => (σ.symm e).val < k) ∂(PMF.uniformOfFintype (Equiv.Perm (Fin n))).toMeasure) = (∑ S ∈ (univ : Finset (Fin n)).powersetCard k, f S) / Nat.choose n k := by …