Documentation

CslibFrontier.Computability.LogSpaceDerandomization.DetectedStage

One stage of the hierarchy with detector-chosen multipliers #

This file closes the detector interface of Matrix.copyStage_rates [OpenAI2026LogSpace, Section 4.2, Proposition 4.5]. One stage of the correction-and-copy hierarchy runs the pilot (Matrix.pilotMax) with the column detector Matrix.columnDetector X Y ϕ ρ J K f as its column number, for retention channels X, Y satisfying Cslib.Probability.RetentionChannels. Let M = M_k be the final running maximum of the detector numbers. Then

Since γ is one through 1 / 2 and κ is zero through 1 / 4 and one above 1 / 2, every column is either fully corrected or overloaded with all copies active, and only overloaded vertices have active extra copies. The detector lemma (Matrix.lt_card_of_lt_columnDetector) gives each overloaded column more than J / (4 C_π f) entries above δ₀ f in some pilot input, and incidence counting over the pilot inputs, whose rows sum to at most 1, …, k, gives m |O| ≤ |A| once 2 C_π m k (k + 1) ≤ δ₀ J [OpenAI2026LogSpace, (4.24)]. So the stage has the density, intertwining and active-count conclusions of Matrix.copyStage_rates (Matrix.detectedStage_rates), with only the channel properties and deterministic constant conditions as hypotheses.

The pilot also bounds the column counts of the corrected columns [OpenAI2026LogSpace, Lemma 4.3 (3)]: if the pilot multiplier of a column is positive, its pilot inputs have at most R / f entries at least δ₁ f (Matrix.card_le_of_pilot_pos), and so do the inputs of the actual correction when the final multiplier is positive (Matrix.card_le_of_multiplier_pos).

Main definitions #

Main results #

References #

noncomputable def Matrix.detectorWeight {V : Type u_1} {m : ℕ} (κ : ℝ → ℝ) (M : V → ℝ) (j : Fin (m + 1)) (x : V) :

The copy weights from the running maximum M of the detector numbers: the primary copy has weight one, every other copy of x weight κ (M x) [OpenAI2026LogSpace, (4.22)].

noncomputable def Matrix.overloaded {V : Type u_1} [Fintype V] (M : V → ℝ) :

The overloaded vertices: those whose running maximum of detector numbers exceeds 1 / 4 [OpenAI2026LogSpace, Proposition 4.5].

theorem Matrix.card_overloaded_le {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 π cπ Cπ Cpair Cvar : ℝ} {c γ : ℝ → ℝ} {C : Matrix V V ℝ} (hch : Cslib.Probability.RetentionChannels X Y f π cπ Cπ Cpair Cvar) (hf : 0 < f) (hCπ : 0 < Cπ) (hϕ0 : ∀ (t : ℝ), 0 ≤ ϕ t) (hϕ1 : ∀ (t : ℝ), ϕ t ≤ 1) {δ₀ : ℝ} (hδ₀ : 0 < δ₀) (hϕδ : ∀ t ≤ δ₀, ϕ t = 0) (hρ1 : ∀ (t : ℝ), ρ t ≤ 1) (hJ : 0 < J) (hC0 : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) {A : Finset V} (hA : ∀ (x y : V), C x y ≠ 0 → x ∈ A ∧ y ∈ A) (hc0 : ∀ (t : ℝ), 0 ≤ c t) (hct : ∀ (t : ℝ), 0 ≤ t → c t ≤ t) (hγ0 : ∀ (t : ℝ), 0 ≤ γ t) (hγ1 : ∀ (t : ℝ), γ t ≤ 1) {k m : ℕ} (hJm : 2 * Cπ * ↑m * ↑k * (↑k + 1) ≤ δ₀ * ↑J) :
m * (overloaded (pilotMax c γ (columnDetector X Y ϕ ρ J K f) C k)).card ≤ A.card

Few overloaded vertices [OpenAI2026LogSpace, Proposition 4.5]: after k pilot steps with the column detector, if A covers the support of C and 2 C_π m k (k + 1) ≤ δ₀ J, then m |O| ≤ |A|. Each overloaded column has more than J / (4 C_π f) entries above δ₀ f in some pilot input, and the pilot inputs have row sums at most 1, …, k.

theorem Matrix.card_le_of_pilot_pos {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 π cπ Cπ Cpair Cvar : ℝ} {c γ : ℝ → ℝ} {C : Matrix V V ℝ} (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) (hC0 : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) (hc0 : ∀ (t : ℝ), 0 ≤ c t) (hct : ∀ (t : ℝ), 0 ≤ t → c t ≤ t) (hγ0 : ∀ (t : ℝ), 0 ≤ γ t) (hγ1 : ∀ (t : ℝ), γ t ≤ 1) (hγ45 : ∀ (t : ℝ), 4 / 5 ≤ t → γ t = 0) {k : ℕ} (hK : 160 * (1 + Cpair * ↑k / η) ≤ ↑K) (hJ : 0 < J) {R : ℝ} (hRJ : 4 * ↑J ≤ cπ * R) (hRvar : 40 * Cvar ≤ cπ * R) {i : ℕ} (hi : i < k) {y : V} (hpos : 0 < γ (pilotMax c γ (columnDetector X Y ϕ ρ J K f) C (i + 1) y)) :
↑{x : V | δ₁ * f ≤ pilotInput c γ (columnDetector X Y ϕ ρ J K f) C i x y}.card ≤ R / f

Corrected pilot columns have few large entries [OpenAI2026LogSpace, Lemma 4.3 (3)]. Under the hypotheses of Matrix.le_columnDetector with row-sum bound k, if γ vanishes from 4 / 5 on and the pilot multiplier γ (M_(i+1) y) of step i + 1 ≤ k is positive, then the pilot input of that step has at most R / f entries at least δ₁ f in column y.

theorem Matrix.card_le_of_multiplier_pos {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 π cπ Cπ Cpair Cvar : ℝ} {c γ : ℝ → ℝ} {C : Matrix V V ℝ} (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) (hC0 : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) (hc0 : ∀ (t : ℝ), 0 ≤ c t) (hct : ∀ (t : ℝ), 0 ≤ t → c t ≤ t) (hcm : Monotone c) (hγ0 : ∀ (t : ℝ), 0 ≤ γ t) (hγ1 : ∀ (t : ℝ), γ t ≤ 1) (hγm : Antitone γ) (hγ45 : ∀ (t : ℝ), 4 / 5 ≤ t → γ t = 0) {k : ℕ} (hK : 160 * (1 + Cpair * ↑k / η) ≤ ↑K) (hJ : 0 < J) {R : ℝ} (hRJ : 4 * ↑J ≤ cπ * R) (hRvar : 40 * Cvar ≤ cπ * R) {y : V} (hpos : 0 < γ (pilotMax c γ (columnDetector X Y ϕ ρ J K f) C k y)) {i : ℕ} (hi : i < k) :
have M := pilotMax c γ (columnDetector X Y ϕ ρ J K f) C k; ↑{x : V | δ₁ * f ≤ (C + cutoffCorrectionIter (fun (y : V) (t : ℝ) => c t * γ (M y)) C i * C) x y}.card ≤ R / f

Corrected columns have few large entries [OpenAI2026LogSpace, Lemma 4.3 (3)]: if the final multiplier γ (M_k y) is positive, then for every i < k the input of step i + 1 of the actual correction, with cutoffs c t * γ (M_k y), has at most R / f entries at least δ₁ f in column y.

theorem Matrix.detectedStage_rates {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 π cπ Cπ Cpair Cvar : ℝ} {c γ : ℝ → ℝ} {C : Matrix V V ℝ} [DecidableEq V] [LinearOrder V] {θ L θ₂ : ℝ} {κ χ : ℝ → ℝ} {τ₀ τ₁ q : ℝ} (hch : Cslib.Probability.RetentionChannels X Y f π cπ Cπ Cpair Cvar) (hC : C.IsStrictUpperTriangular) (hC0 : ∀ (x y : V), 0 ≤ C x y) (hCf : ∀ (x y : V), C x y ≤ f) (hC1 : C.mulVec 1 ≤ 1) {A : Finset V} (hA : ∀ (x y : V), C x y ≠ 0 → x ∈ A ∧ y ∈ A) (hf : 0 < f) (hc0 : ∀ (t : ℝ), 0 ≤ c t) (hcθ : ∀ (t : ℝ), c t ≤ max (t - θ * f) 0) (hcm : Monotone c) (hcL : ∀ (s t : ℝ), s ≤ t → c t - c s ≤ L * (t - s)) (hcθ₂ : ∀ (t : ℝ), t - θ₂ * f ≤ c t) (hθ : 0 < θ) (hL : 0 ≤ L) (hγ0 : ∀ (t : ℝ), 0 ≤ γ t) (hγ1 : ∀ (t : ℝ), γ t ≤ 1) (hγhalf : ∀ t ≤ 1 / 2, γ t = 1) (hκ0 : ∀ (t : ℝ), 0 ≤ κ t) (hκ1 : ∀ (t : ℝ), κ t ≤ 1) (hκq : ∀ t ≤ 1 / 4, κ t = 0) (hκhalf : ∀ (t : ℝ), 1 / 2 < t → κ t = 1) (hCπ : 0 < Cπ) (hϕ0 : ∀ (t : ℝ), 0 ≤ ϕ t) (hϕ1 : ∀ (t : ℝ), ϕ t ≤ 1) {δ₀ : ℝ} (hδ₀ : 0 < δ₀) (hϕδ : ∀ t ≤ δ₀, ϕ t = 0) (hρ1 : ∀ (t : ℝ), ρ t ≤ 1) (hJ : 0 < J) {k m : ℕ} (hJm : 2 * Cπ * ↑m * ↑k * (↑k + 1) ≤ δ₀ * ↑J) (hτ₀ : θ₂ * f + f * Real.exp (1 / θ) * (L / θ) ^ k / ↑k.factorial ≤ τ₀) (hχ0 : ∀ (t : ℝ), 0 ≤ χ t) (hχ1 : ∀ (t : ℝ), χ t ≤ 1) (hχ₀ : ∀ t ≤ τ₀, χ t = 0) (hχ₁ : ∀ (t : ℝ), τ₁ ≤ t → χ t = 1) (hτ₁ : τ₁ ≤ f / q) (hcopies : (↑k + 1) * f / (↑m + 1) ≤ f / q) :
have M := pilotMax c γ (columnDetector X Y ϕ ρ J K f) C k; have E := cutoffCorrectionIter (fun (y : V) (t : ℝ) => c t * γ (M y)) C k; have D := C - E + E * C; (∀ (a b : V × Fin (m + 1)), copyStage χ m (detectorWeight κ M) D a b ≤ f / q) ∧ copyStage χ m (detectorWeight κ M) D * copyWeight (detectorWeight κ M) = copyWeight (detectorWeight κ M) * D ∧ (∀ (a b : V × Fin (m + 1)), copyStage χ m (detectorWeight κ M) D a b ≠ 0 → a ∈ copyCover A (overloaded M) ∧ b ∈ copyCover A (overloaded M)) ∧ (copyCover A (overloaded M)).card ≤ 2 * A.card

One stage with detector-chosen multipliers and copies [OpenAI2026LogSpace, Proposition 4.5]. Run k pilot steps with the column detector, let M be the final running maximum, correct C by k steps of the cutoffs φ y t = c t * γ (M y), and split the residual D with the copy weights Matrix.detectorWeight κ M and the overloaded set Matrix.overloaded M. If the base cutoff satisfies the hypotheses of the factorial truncation together with t - θ₂ f ≤ c t, γ is one through 1 / 2, κ is zero through 1 / 4 and one above 1 / 2, 2 C_π m k (k + 1) ≤ δ₀ J, and the copy constants are chosen as in Matrix.copyStage_rates, then the copy step has entries at most f / q, intertwines with its projection, and is supported in at most 2 |A| copies.