Documentation

CslibFrontier.Computability.LogSpaceDerandomization.DetectedHierarchy

The correction-and-copy hierarchy #

This file iterates the stages of CslibFrontier.Computability.LogSpaceDerandomization.HierarchyParams and proves the finite-matrix stage bound of the OpenAI preprint (2026-09-23), Proposition 4.7 [OAI26e], from the construction using the reduced algebraic-stage parameters and the retention-channel interface. The preprint's full threshold ladder and later-estimation root/complement regularity for Q and all step cutoffs remain separate requirements.

Start with a strictly upper triangular, nonnegative, substochastic matrix S on a finite linearly ordered set V 0. Stage l + 1 lives on a finite linearly ordered set V (l + 1) identified with the copies Lex (V l × Fin (m + 1)) by an equivalence e l that reflects the order [OpenAI2026LogSpace, Section 4.5: V_(l+1) = V_l × {0, …, D₀ - 1}, ordered by parent and then copy symbol]. Taking the family as a parameter lets a client choose identifiers, for instance numbers in radix D₀, on which its channels act. The transition matrices Matrix.hierarchy are C_0 = S and C_(l+1) = C⁺_l transported by e l, where C⁺_l is the next matrix of the stage at rate f_l = q⁻¹ ^ l with that stage's retention channels X l, Y l. The detectors are exact expectations over the channel seeds, so the hierarchy, its corrections (Matrix.hierarchyCorrection), its projections (Matrix.hierarchyProj) and the transported rewards are deterministic functions of S, the parameters and the channel laws: no event over the seeds has to be excluded, and the channel interface is the only probabilistic input.

The stage bound (Matrix.sub_hierarchyReward_le). Let q = 2 ^ (c + 1), let the channels of every stage l satisfy Cslib.Probability.RetentionChannels at rate q⁻¹ ^ l with the bundled constants, and let (1 - S) p = e₀ with 0 ≤ p ≤ 1. Then at the all-primary copy Matrix.primaryCopy P e x l of a base vertex x,

0 ≤ p x - W_l (x̄_l) ≤ |V 0| (2 ^ c)⁻¹ ^ l,

where W_l = B_l e₀ is the transported reward (Matrix.rewardTransport). Along the way, every stage is strictly upper triangular, nonnegative and substochastic with entries at most q⁻¹ ^ l (Matrix.hierarchy_invariant), and its active vertices at most double from stage to stage.

Main definitions #

Main results #

References #

def Matrix.radixCopyEquiv (n m l : ℕ) :
Fin (n * (m + 1) ^ (l + 1)) ≃ Lex (Fin (n * (m + 1) ^ l) × Fin (m + 1))

Radix identifiers for copies: Fin (n (m + 1) ^ (l + 1)) as the copies of Fin (n (m + 1) ^ l), where the number y + (m + 1) x is the copy y of the parent x. This is the preprint's appending of a radix-D₀ digit [OpenAI2026LogSpace, Section 4.5].

theorem Matrix.radixCopyEquiv_val (n m l : ℕ) (a : Fin (n * (m + 1) ^ (l + 1))) :
↑a = ↑(ofLex ((radixCopyEquiv n m l) a)).2 + (m + 1) * ↑(ofLex ((radixCopyEquiv n m l) a)).1
theorem Matrix.radixCopyEquiv_lt (n m l : ℕ) {a b : Fin (n * (m + 1) ^ (l + 1))} (h : (radixCopyEquiv n m l) a < (radixCopyEquiv n m l) b) :
a < b

The radix identification reflects the order: copies are ordered by parent, then by symbol.

noncomputable def Matrix.hierarchy {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] (X : (l : ℕ) → ι l → V l → Prop) (Y : (l : ℕ) → κ l → V l → Prop) [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] (S : Matrix (V 0) (V 0) ℝ) (l : ℕ) :
Matrix (V l) (V l) ℝ

The transition matrices of the hierarchy: C_0 = S, and C_(l+1) is the next matrix of stage l at rate q⁻¹ ^ l, with the channels X l, Y l, transported to V (l + 1) by e l [OpenAI2026LogSpace, Section 4.5].

theorem Matrix.hierarchy_zero {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] (X : (l : ℕ) → ι l → V l → Prop) (Y : (l : ℕ) → κ l → V l → Prop) [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] (S : Matrix (V 0) (V 0) ℝ) :
hierarchy P e X Y S 0 = S
theorem Matrix.hierarchy_succ {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] (X : (l : ℕ) → ι l → V l → Prop) (Y : (l : ℕ) → κ l → V l → Prop) [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] (S : Matrix (V 0) (V 0) ℝ) (l : ℕ) :
hierarchy P e X Y S (l + 1) = (P.next (X l) (Y l) (q⁻¹ ^ l) (hierarchy P e X Y S l)).submatrix ⇑(e l) ⇑(e l)
noncomputable def Matrix.hierarchyCorrection {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] (X : (l : ℕ) → ι l → V l → Prop) (Y : (l : ℕ) → κ l → V l → Prop) [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] (S : Matrix (V 0) (V 0) ℝ) (l : ℕ) :
Matrix (V l) (V l) ℝ

The correction E_l of stage l.

theorem Matrix.hierarchyCorrection_eq {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] (X : (l : ℕ) → ι l → V l → Prop) (Y : (l : ℕ) → κ l → V l → Prop) [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] (S : Matrix (V 0) (V 0) ℝ) (l : ℕ) :
hierarchyCorrection P e X Y S l = P.correction (X l) (Y l) (q⁻¹ ^ l) (hierarchy P e X Y S l)
noncomputable def Matrix.hierarchyProj {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] [(l : ℕ) → LinearOrder (V l)] (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] (X : (l : ℕ) → ι l → V l → Prop) (Y : (l : ℕ) → κ l → V l → Prop) [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] (S : Matrix (V 0) (V 0) ℝ) (l : ℕ) :
Matrix (V (l + 1)) (V l) ℝ

The weighted projection P_r from stage l + 1 to stage l.

theorem Matrix.hierarchyProj_mulVec {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] [(l : ℕ) → LinearOrder (V l)] (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] (X : (l : ℕ) → ι l → V l → Prop) (Y : (l : ℕ) → κ l → V l → Prop) [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] (S : Matrix (V 0) (V 0) ℝ) (l : ℕ) (v : V l → ℝ) (a : V (l + 1)) :
(hierarchyProj P e X Y S l).mulVec v a = P.weight (X l) (Y l) (q⁻¹ ^ l) (hierarchy P e X Y S l) (ofLex ((e l) a)).2 (ofLex ((e l) a)).1 * v (ofLex ((e l) a)).1

A hierarchy projection reads the parent coordinate and applies its actual copy weight.

def Matrix.primaryCopy {q cπ Cπ Cpair Cvar : ℝ} (P : HierarchyParams q cπ Cπ Cpair Cvar) {V : ℕ → Type u_1} (e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))) (x : V 0) (l : ℕ) :
V l

The all-primary copy x̄_l of a base vertex x: every copy symbol is 0.

theorem Matrix.hierarchy_invariant {q cπ Cπ Cpair Cvar : ℝ} {P : HierarchyParams q cπ Cπ Cpair Cvar} {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] [(l : ℕ) → LinearOrder (V l)] {e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))} {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] {X : (l : ℕ) → ι l → V l → Prop} {Y : (l : ℕ) → κ l → V l → Prop} [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] {S : Matrix (V 0) (V 0) ℝ} (he : ∀ (l : ℕ) (a b : V (l + 1)), (e l) a < (e l) b → a < b) {π : ℕ → ℝ} (hq : 0 < q) (hCπ : 0 < Cπ) (hS : S.IsStrictUpperTriangular) (hS0 : ∀ (x y : V 0), 0 ≤ S x y) (hS1 : S.mulVec 1 ≤ 1) (l : ℕ) (hch : ∀ l' < l, Cslib.Probability.RetentionChannels (X l') (Y l') (q⁻¹ ^ l') (π l') cπ Cπ Cpair Cvar) :
(hierarchy P e X Y S l).IsStrictUpperTriangular ∧ (∀ (x y : V l), 0 ≤ hierarchy P e X Y S l x y) ∧ (hierarchy P e X Y S l).mulVec 1 ≤ 1 ∧ ∀ (x y : V l), hierarchy P e X Y S l x y ≤ q⁻¹ ^ l

Every stage is a valid input of the next: if S is strictly upper triangular, nonnegative and substochastic and the equivalences reflect the order, then so is every stage l, with entries at most q⁻¹ ^ l, provided the channels of the stages before l satisfy the interface [OpenAI2026LogSpace, Proposition 4.5].

theorem Matrix.sub_hierarchyReward_le {q cπ Cπ Cpair Cvar : ℝ} {P : HierarchyParams q cπ Cπ Cpair Cvar} {V : ℕ → Type u_1} [(l : ℕ) → Fintype (V l)] [(l : ℕ) → LinearOrder (V l)] {e : (l : ℕ) → V (l + 1) ≃ Lex (V l × Fin (P.m + 1))} {ι : ℕ → Type u_2} {κ : ℕ → Type u_3} [(l : ℕ) → Fintype (ι l)] [(l : ℕ) → Fintype (κ l)] {X : (l : ℕ) → ι l → V l → Prop} {Y : (l : ℕ) → κ l → V l → Prop} [(l : ℕ) → (s : ι l) → (v : V l) → Decidable (X l s v)] [(l : ℕ) → (t : κ l) → (v : V l) → Decidable (Y l t v)] {S : Matrix (V 0) (V 0) ℝ} (he : ∀ (l : ℕ) (a b : V (l + 1)), (e l) a < (e l) b → a < b) {π : ℕ → ℝ} {c : ℕ} (hq : q = 2 ^ (c + 1)) (hch : ∀ (l : ℕ), Cslib.Probability.RetentionChannels (X l) (Y l) (q⁻¹ ^ l) (π l) cπ Cπ Cpair Cvar) (hCπ : 0 < Cπ) (hS : S.IsStrictUpperTriangular) (hS0 : ∀ (x y : V 0), 0 ≤ S x y) (hS1 : S.mulVec 1 ≤ 1) {p e₀ : V 0 → ℝ} (hp : (1 - S).mulVec p = e₀) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (x : V 0) (l : ℕ) :
0 ≤ p x - (rewardTransport (hierarchyProj P e X Y S) (hierarchyCorrection P e X Y S) l).mulVec e₀ (primaryCopy P e x l) ∧ p x - (rewardTransport (hierarchyProj P e X Y S) (hierarchyCorrection P e X Y S) l).mulVec e₀ (primaryCopy P e x l) ≤ ↑(Fintype.card (V 0)) * (2 ^ c)⁻¹ ^ l

The stage bound from the construction [OpenAI2026LogSpace, Proposition 4.7]. Let q = 2 ^ (c + 1), let S be strictly upper triangular, nonnegative and substochastic, let the equivalences e l reflect the order, let the channels of every stage l satisfy the interface at rate q⁻¹ ^ l, and let (1 - S) p = e₀ with 0 ≤ p ≤ 1. Then the reward W_l = B_l e₀, transported along the hierarchy, satisfies 0 ≤ p x - W_l (x̄_l) ≤ |V 0| (2 ^ c)⁻¹ ^ l at the all-primary copy of every base vertex x.