Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section II — by independence, all rows are sampled with probability (1−π)n(1-\pi)^n(1−π)n

Proved
CandesTao.LowerBound.all_rows_sampled_prob

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

bernoulli-samplingmatrix-completionp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Consider the Bernoulli sampling model on the entries of an n×nn\times nn×n matrix: each entry (i,j)(i,j)(i,j) belongs to the random observation set Ω\OmegaΩ independently with probability p∈[0,1]p \in [0,1]p∈[0,1]. Let S1,…,SnS_1,\dots,S_nS1​,…,Sn​ be pairwise disjoint sets of entries, each of cardinality ℓ\ellℓ (for example, the nnn rows, with ℓ=n\ell = nℓ=n, or one row of one diagonal block for each of the nnn rows, with block width ℓ\ellℓ). Then the probability that every SaS_aSa​ contains at least one observed entry is

P(Ω∩Sa≠∅ for all a=1,…,n)=(1−(1−p)ℓ)n.\mathbb{P}\bigl(\Omega \cap S_a \neq \emptyset \text{ for all } a = 1,\dots,n\bigr) = \bigl(1 - (1-p)^{\ell}\bigr)^{n}.P(Ω∩Sa​=∅ for all a=1,…,n)=(1−(1−p)ℓ)n.

Each SaS_aSa​ is unsampled with probability π=(1−p)ℓ\pi = (1-p)^{\ell}π=(1−p)ℓ, and the nnn events are independent because the sets are disjoint. In the lower-bound argument of Candès and Tao this computes the probability (1−π0)n(1-\pi_0)^n(1−π0​)n (rows, π0=(1−p)n\pi_0 = (1-p)^nπ0​=(1−p)n) and (1−π1)n(1-\pi_1)^n(1−π1​)n (rows of diagonal blocks, π1=(1−p)ℓ\pi_1 = (1-p)^\ellπ1​=(1−p)ℓ) that every relevant row is sampled.

Formalization Note The probability is the platform's bernoulliEventProb p, the sum over all subsets Ω\OmegaΩ of the weight p∣Ω∣(1−p)n2−∣Ω∣p^{|\Omega|}(1-p)^{n^2-|\Omega|}p∣Ω∣(1−p)n2−∣Ω∣.

Preamble
import Definitions.Def_matrix_completion_bernoulli
open MatrixCompletion
Formal statement
namespace CandesTao.LowerBound

theorem all_rows_sampled_prob (n ℓ : ℕ) (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1)
    (S : Fin n → Finset (Fin n × Fin n))
    (hdisj : Pairwise (fun a b => Disjoint (S a) (S b)))
    (hcard : ∀ a, (S a).card = ℓ) :
    bernoulliEventProb p (fun Ω : Finset (Fin n × Fin n) => ∀ a, ∃ e ∈ S a, e ∈ Ω) =
      (1 - (1 - p) ^ ℓ) ^ n := by sorry

end CandesTao.LowerBound
Source
Candès & Tao, The Power of Convex Relaxation: Near-Optimal Matrix Completion, IEEE Trans. Inf. Theory 56(5), 2010, p. 2059, Section II ('By independence, the probability that all rows are sampled at least once is (1 − π₀)^n') and p. 2060 (π₁ = (1 − p)^ℓ for a fixed row of a fixed block)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Inputs:

  • natural numbers nnn and ℓ\ellℓ;
  • a real number ppp with 0≤p≤10 \le p \le 10≤p≤1;
  • a family of finite sets SaS_aSa​, one for each a∈{0,…,n−1}a \in \{0,\dots,n-1\}a∈{0,…,n−1}, where each SaS_aSa​ is a set of index pairs (i,j)(i,j)(i,j) with i,j∈{0,…,n−1}i, j \in \{0,\dots,n-1\}i,j∈{0,…,n−1}.

Hypotheses:

  • the sets SaS_aSa​ are pairwise disjoint: Sa∩Sb=∅S_a \cap S_b = \varnothingSa​∩Sb​=∅ for a≠ba \ne ba=b;
  • every SaS_aSa​ has exactly ℓ\ellℓ elements.

Conclusion:

bernoulliEventProb(p, {Ω:∀a, ∃e∈Sa, e∈Ω})  =  (1−(1−p)ℓ)n.\mathrm{bernoulliEventProb}\big(p,\ \{\Omega : \forall a,\ \exists e \in S_a,\ e \in \Omega\}\big) \;=\; \big(1 - (1-p)^{\ell}\big)^{n}.bernoulliEventProb(p, {Ω:∀a, ∃e∈Sa​, e∈Ω})=(1−(1−p)ℓ)n.

The event on the left is a property of a random set Ω\OmegaΩ of index pairs: Ω\OmegaΩ meets every SaS_aSa​.

The function bernoulliEventProb is defined in an imported file that is not shown here, so its exact definition cannot be restated. Judging only by its name and how it is used, it is the probability that the event holds when Ω\OmegaΩ is a random subset of the n×nn \times nn×n index pairs. Presumably each pair is included independently with probability ppp, but this is an inference from the name, not something visible in the code.

Degenerate cases:

  • n=0n = 0n=0. The event "for every aaa" is vacuous and so holds for every Ω\OmegaΩ. The right side is x0=1x^0 = 1x0=1.
  • ℓ=0\ell = 0ℓ=0 and n≥1n \ge 1n≥1. Every SaS_aSa​ is empty, so the event is impossible, and the right side is (1−1)n=0(1 - 1)^n = 0(1−1)n=0. This includes p=1p = 1p=1, where (1−p)0=00=1(1-p)^0 = 0^0 = 1(1−p)0=00=1.
  • p=0p = 0p=0, n≥1n \ge 1n≥1. The right side is 000.
  • p=1p = 1p=1, ℓ≥1\ell \ge 1ℓ≥1. The right side is 111.
  • n≥1n \ge 1n≥1 and ℓ>n\ell > nℓ>n. Pairwise disjointness with ∣Sa∣=ℓ|S_a| = \ell∣Sa​∣=ℓ would require nℓ≤n2n\ell \le n^2nℓ≤n2 pairs, so the hypotheses cannot be met and the statement is vacuous.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me