Documentation

CslibFrontier.Computability.LogSpaceDerandomization.ColumnDetector

Column detectors from retention channels #

A column detector decides, with true expectations over random retained sets, whether a column of a nonnegative matrix G has many substantial entries. It is the detector of the OpenAI preprint (2026-09-23), Section 4.2, idea 3 in issue #474 [OAI26e], which chooses the column multipliers of the correction-and-copy hierarchy.

Channels. Two retention channels X : ι → V → Prop and Y : κ → V → Prop select random sets of vertices from independent uniform seeds s : ι and t : κ; independence is built in, since the seed space is the product ι × κ. Cslib.Probability.RetentionChannels records the properties that the detector uses, at rate f [OpenAI2026LogSpace, (4.8), (4.9)]:

The detector. For a draw T of the terminal channel Y, the row gate of row x is ρ (rank_K {G x w / f : w ∈ T}) (Matrix.rowGate); it is one unless K retained entries of the row exceed η f. For a draw S of the start channel X, the trial at column y is rank_J {ϕ (G x y / f) * gate x : x ∈ S} (Matrix.detectorTrial), where rank_j is the j-th largest value padded with zeros (Finset.kthLargest). The detector number U y is the expectation of the trial over both channels, conditioned on Y(y) (Matrix.columnDetector).

The detector lemma [OpenAI2026LogSpace, Lemma 4.3]. Let ϕ be zero through δ₀ and one from δ₁, and ρ one through η > 0, both with values in [0, 1].

  1. If the rows of G ≥ 0 sum to at most k, the gate rank satisfies K ≥ 160 (1 + C_pair k / η), and R satisfies c_π R ≥ max (4 J, 40 C_var), then a column with more than R / f entries at least δ₁ f has U y ≥ 19 / 20 (Matrix.le_columnDetector).
  2. If U y > 1 / 4, the column has more than J / (4 C_π f) entries above δ₀ f (Matrix.lt_card_of_lt_columnDetector).

Each statement uses only the hypotheses it needs; for instance the second needs neither the row-sum bound nor the row gates' threshold.

The first statement uses no independence between the row gates of different rows; it combines Markov's inequality for the gate failures with the lower tail of the start channel.

Main definitions #

Main results #

References #

structure Cslib.Probability.RetentionChannels {V : Type u_1} {ι : Type u_2} {κ : Type u_3} [Fintype ι] [Fintype κ] (X : ι → V → Prop) (Y : κ → V → Prop) [(s : ι) → (v : V) → Decidable (X s v)] [(t : κ) → (v : V) → Decidable (Y t v)] (f π cπ Cπ Cpair Cvar : ℝ) :

Retention channels X and Y at rate f, with independent uniform seeds s : ι and t : κ: every vertex is retained by either channel with the same probability π, c_π f ≤ π ≤ C_π f; two distinct vertices w ≠ y are both retained by Y with probability at most C_pair f times that of y; and a nonempty set A retains fewer than |A| π / 2 members of X with probability at most C_var / (|A| π). These are the properties [OpenAI2026LogSpace, (4.8), (4.9)] that the detectors use.

noncomputable def Matrix.rowGate {V : Type u_1} (ρ : ℝ → ℝ) (K : ℕ) (f : ℝ) (G : Matrix V V ℝ) (T : Finset V) (x : V) :

The row gate of row x for a draw T of the terminal channel: ρ (rank_K {G x w / f : w ∈ T}) [OpenAI2026LogSpace, (4.11)].

noncomputable def Matrix.detectorTrial {V : Type u_1} (ϕ ρ : ℝ → ℝ) (J K : ℕ) (f : ℝ) (G : Matrix V V ℝ) (S T : Finset V) (y : V) :

A detector trial at column y, for draws S of the start channel and T of the terminal channel: rank_J {ϕ (G x y / f) * rowGate x : x ∈ S} [OpenAI2026LogSpace, (4.12)].

noncomputable def Matrix.columnDetector {V : Type u_1} {ι : Type u_2} {κ : Type u_3} [Fintype V] [Fintype ι] [Fintype κ] (X : ι → V → Prop) (Y : κ → V → Prop) [(s : ι) → (v : V) → Decidable (X s v)] [(t : κ) → (v : V) → Decidable (Y t v)] (ϕ ρ : ℝ → ℝ) (J K : ℕ) (f : ℝ) (G : Matrix V V ℝ) (y : V) :

The detector number of column y: the expectation of the detector trial over the seeds of both channels, conditioned on Y(y) [OpenAI2026LogSpace, (4.12)].

theorem Matrix.detectorTrial_nonneg {V : Type u_1} {ϕ ρ : ℝ → ℝ} {J K : ℕ} {f : ℝ} {G : Matrix V V ℝ} {y : V} {S T : Finset V} :
0 ≤ detectorTrial ϕ ρ J K f G S T y
theorem Matrix.detectorTrial_le_one {V : Type u_1} {ϕ ρ : ℝ → ℝ} {J K : ℕ} {f : ℝ} {G : Matrix V V ℝ} {y : V} (hϕ0 : ∀ (t : ℝ), 0 ≤ ϕ t) (hϕ1 : ∀ (t : ℝ), ϕ t ≤ 1) (hρ1 : ∀ (t : ℝ), ρ t ≤ 1) {S T : Finset V} :
detectorTrial ϕ ρ J K f G S T y ≤ 1
theorem Matrix.columnDetector_nonneg {V : Type u_1} {ι : Type u_2} {κ : Type u_3} [Fintype V] [Fintype ι] [Fintype κ] {X : ι → V → Prop} {Y : κ → V → Prop} [(s : ι) → (v : V) → Decidable (X s v)] [(t : κ) → (v : V) → Decidable (Y t v)] {ϕ ρ : ℝ → ℝ} {J K : ℕ} {f : ℝ} {G : Matrix V V ℝ} {y : V} :
0 ≤ columnDetector X Y ϕ ρ J K f G y
theorem Matrix.columnDetector_le_one {V : Type u_1} {ι : Type u_2} {κ : Type u_3} [Fintype V] [Fintype ι] [Fintype κ] {X : ι → V → Prop} {Y : κ → V → Prop} [(s : ι) → (v : V) → Decidable (X s v)] [(t : κ) → (v : V) → Decidable (Y t v)] {ϕ ρ : ℝ → ℝ} {J K : ℕ} {f : ℝ} {G : Matrix V V ℝ} {y : V} (hϕ0 : ∀ (t : ℝ), 0 ≤ ϕ t) (hϕ1 : ∀ (t : ℝ), ϕ t ≤ 1) (hρ1 : ∀ (t : ℝ), ρ t ≤ 1) :
columnDetector X Y ϕ ρ J K f G y ≤ 1
theorem Matrix.card_filter_rowGate_lt_one_mul_le {V : Type u_1} {κ : Type u_3} [Fintype V] {Y : κ → V → Prop} [(t : κ) → (v : V) → Decidable (Y t v)] {ρ : ℝ → ℝ} {K : ℕ} {f : ℝ} {G : Matrix V V ℝ} {y : V} (T : Finset κ) (x : V) (hf : 0 < f) {η : ℝ} (hη : 0 < η) (hρη : ∀ t ≤ η, ρ t = 1) (hG0 : ∀ (w : V), 0 ≤ G x w) {k : ℝ} (hGk : ∑ w : V, G x w ≤ k) (hK : 0 < K) {c : ℝ} (hc : 0 ≤ c) (hpair : ∀ (w : V), w ≠ y → ↑{t ∈ T | Y t w}.card ≤ c * f * ↑T.card) :
↑{t ∈ T | rowGate ρ K f G {w : V | Y t w} x < 1}.card * ↑K ≤ ↑T.card * (1 + c * k / η)

Row gates rarely fail [OpenAI2026LogSpace, proofs of Lemmas 4.3 (1) and 5.1]. Let row x of G ≥ 0 sum to at most k, and let ρ be one through η > 0. Let T be a finite set of terminal draws on which every vertex w ≠ y is retained at most a c f fraction of the time. Then the row gate of x is below one on at most a (1 + c k / η) / K fraction of T.

The gate can fail only if K retained entries exceed η f. At most k / (η f) entries do, and the retention counts of these entries over T sum to at most #T (1 + c k / η), counting y itself once; this is Markov's inequality. No independence between rows is used.

theorem Matrix.lt_card_of_lt_columnDetector {V : Type u_1} {ι : Type u_2} {κ : Type u_3} [Fintype V] [Fintype ι] [Fintype κ] {X : ι → V → Prop} {Y : κ → V → Prop} [(s : ι) → (v : V) → Decidable (X s v)] [(t : κ) → (v : V) → Decidable (Y t v)] {ϕ ρ : ℝ → ℝ} {J K : ℕ} {f : ℝ} {G : Matrix V V ℝ} {y : V} {π cπ Cπ Cpair Cvar : ℝ} (hch : Cslib.Probability.RetentionChannels X Y f π cπ Cπ Cpair Cvar) (hf : 0 < f) (hϕ0 : ∀ (t : ℝ), 0 ≤ ϕ t) (hϕ1 : ∀ (t : ℝ), ϕ t ≤ 1) {δ₀ : ℝ} (hϕδ : ∀ t ≤ δ₀, ϕ t = 0) (hρ1 : ∀ (t : ℝ), ρ t ≤ 1) (hJ : 0 < J) (hU : 1 / 4 < columnDetector X Y ϕ ρ J K f G y) :
↑J / (4 * Cπ * f) < ↑{x : V | δ₀ * f < G x y}.card

Detected columns have many substantial entries [OpenAI2026LogSpace, Lemma 4.3 (2)]: if ϕ vanishes through δ₀ and the detector number of column y exceeds 1 / 4, more than J / (4 C_π f) entries of the column exceed δ₀ f.

theorem Matrix.le_columnDetector {V : Type u_1} {ι : Type u_2} {κ : Type u_3} [Fintype V] [Fintype ι] [Fintype κ] {X : ι → V → Prop} {Y : κ → V → Prop} [(s : ι) → (v : V) → Decidable (X s v)] [(t : κ) → (v : V) → Decidable (Y t v)] {ϕ ρ : ℝ → ℝ} {J K : ℕ} {f : ℝ} {G : Matrix V V ℝ} {y : V} {π cπ Cπ Cpair Cvar : ℝ} (hch : Cslib.Probability.RetentionChannels X Y f π cπ Cπ Cpair Cvar) (hf : 0 < f) (hcπ : 0 < cπ) (hCpair : 0 ≤ Cpair) {δ₁ : ℝ} (hϕδ : ∀ (t : ℝ), δ₁ ≤ t → ϕ t = 1) (hρ1 : ∀ (t : ℝ), ρ t ≤ 1) {η : ℝ} (hη : 0 < η) (hρη : ∀ t ≤ η, ρ t = 1) (hG0 : ∀ (x w : V), 0 ≤ G x w) {k : ℝ} (hGk : ∀ (x : V), ∑ w : V, G x w ≤ k) (hK : 160 * (1 + Cpair * k / η) ≤ ↑K) (hJ : 0 < J) {R : ℝ} (hRJ : 4 * ↑J ≤ cπ * R) (hRvar : 40 * Cvar ≤ cπ * R) (hy : R / f < ↑{x : V | δ₁ * f ≤ G x y}.card) :
19 / 20 ≤ columnDetector X Y ϕ ρ J K f G y

Columns with many large entries are detected [OpenAI2026LogSpace, Lemma 4.3 (1)]. Let the rows of G ≥ 0 sum to at most k, let ϕ be one from δ₁, let ρ ≤ 1 be one through η > 0, let the gate rank satisfy K ≥ 160 (1 + C_pair k / η), and let c_π R ≥ 4 J and c_π R ≥ 40 C_var. If more than R / f entries of column y are at least δ₁ f, its detector number is at least 19 / 20.