Documentation

CslibFrontier.Computability.LogSpaceDerandomization.FactorialTruncation

Factorial truncation of cutoff corrections #

Let C be a strictly upper triangular transition matrix with nonnegative entries at most f and rows summing to at most one. A cutoff correction chooses the correction E of Matrix.one_sub_correction_mulVec entrywise from the corrected input, E x y = φ y ((C + E C) x y), where each cutoff φ y is monotone, L-Lipschitz and leaves at least θ f behind: 0 ≤ φ y t ≤ max (t - θ f) 0. In the OpenAI preprint (2026-09-23), idea 3 in issue #474, φ y t = f Q (t / f) g y for a smooth ramp Q and a column multiplier g [OpenAI2026LogSpace, Section 4.1].

The equation is a recursion along the order of the columns, so it has exactly one solution Matrix.cutoffCorrectionFix φ C, reached by iterating Matrix.cutoffCorrection φ C from zero card V times (Matrix.cutoffCorrection_fix, Matrix.eq_cutoffCorrectionFix). The point of the estimate is that far fewer iterations suffice, independently of the size of V: after k iterations every entry is within f e^(1 / θ) (L / θ)^k / k! of the fixed point (Matrix.cutoffCorrectionFix_sub_iter_le).

The proof counts chains. In a fixed row, every positive entry of the fixed point leaves a residual at least θ f, and the residuals of a row sum to at most one, so the number m of positive entries in the row satisfies m θ f ≤ 1. Unrolling the recursion k times along that row expresses the error as a sum over increasing chains of k of these entries, each weighted by at most (L f)^k; there are at most m.choose k ≤ m^k / k! ≤ (θ f)^(-k) / k! of them.

For the finite correction E = E k, the corrected matrix C - E + E C is nonnegative (Matrix.cutoffCorrection_residual_nonneg), and in a column whose cutoff leaves at most θ₂ f behind its entries are at most θ₂ f plus the truncation error (Matrix.cutoffCorrection_residual_le). Since x ^ k / k! tends to zero, a number of iterations depending only on θ, L and the target accuracy suffices (Matrix.exists_factorial_bound_le).

Main definitions #

Main results #

References #

def Matrix.cutoffCorrection {V : Type u_1} {R : Type u_2} [Fintype V] [NonUnitalNonAssocSemiring R] (φ : V → R → R) (C F : Matrix V V R) :
Matrix V V R

One step of the cutoff correction recursion: the matrix with entry φ y ((C + F C) x y) at (x, y).

def Matrix.cutoffCorrectionIter {V : Type u_1} {R : Type u_2} [Fintype V] [NonUnitalNonAssocSemiring R] (φ : V → R → R) (C : Matrix V V R) (k : ℕ) :
Matrix V V R

The k-th iterate of Matrix.cutoffCorrection φ C from the zero matrix.

def Matrix.cutoffCorrectionFix {V : Type u_1} {R : Type u_2} [Fintype V] [NonUnitalNonAssocSemiring R] (φ : V → R → R) (C : Matrix V V R) :
Matrix V V R

The cutoff correction of C: the iterate after card V steps, which is the unique fixed point of Matrix.cutoffCorrection φ C when C is strictly upper triangular.

theorem Matrix.cutoffCorrectionIter_succ {V : Type u_1} {R : Type u_2} [Fintype V] [NonUnitalNonAssocSemiring R] {φ : V → R → R} {C : Matrix V V R} (k : ℕ) :
theorem Matrix.cutoffCorrection_fix {V : Type u_1} {R : Type u_2} [Fintype V] [NonUnitalNonAssocSemiring R] {φ : V → R → R} {C : Matrix V V R} [LinearOrder V] (hC : C.IsStrictUpperTriangular) :

Existence of the cutoff correction: Matrix.cutoffCorrectionFix φ C is a fixed point of the recursion when C is strictly upper triangular [OpenAI2026LogSpace, Lemma 4.1].

theorem Matrix.eq_cutoffCorrectionFix {V : Type u_1} {R : Type u_2} [Fintype V] [NonUnitalNonAssocSemiring R] {φ : V → R → R} {C : Matrix V V R} [LinearOrder V] (hC : C.IsStrictUpperTriangular) {F : Matrix V V R} (hF : cutoffCorrection φ C F = F) :

Uniqueness of the cutoff correction: every fixed point of the recursion is Matrix.cutoffCorrectionFix φ C when C is strictly upper triangular [OpenAI2026LogSpace, Lemma 4.1].

theorem Matrix.cutoffCorrectionIter_nonneg {V : Type u_1} [Fintype V] {φ : V → ℝ → ℝ} {C : Matrix V V ℝ} (hφ0 : ∀ (y : V) (t : ℝ), 0 ≤ φ y t) (k : ℕ) (x y : V) :
theorem Matrix.cutoffCorrectionIter_le_succ {V : Type u_1} [Fintype V] {φ : V → ℝ → ℝ} {C : Matrix V V ℝ} (hC0 : ∀ (x y : V), 0 ≤ C x y) (hφ0 : ∀ (y : V) (t : ℝ), 0 ≤ φ y t) (hφm : ∀ (y : V), Monotone (φ y)) (k : ℕ) (x y : V) :

The iterates increase.

theorem Matrix.cutoffCorrectionIter_le_fix {V : Type u_1} [Fintype V] [LinearOrder V] {φ : V → ℝ → ℝ} {C : Matrix V V ℝ} (hC : C.IsStrictUpperTriangular) (hC0 : ∀ (x y : V), 0 ≤ C x y) (hφ0 : ∀ (y : V) (t : ℝ), 0 ≤ φ y t) (hφm : ∀ (y : V), Monotone (φ y)) (k : ℕ) (x y : V) :

The iterates increase towards the fixed point [OpenAI2026LogSpace, Lemma 4.1].

theorem Matrix.cutoffCorrectionFix_sub_iter_le {V : Type u_1} [Fintype V] [LinearOrder V] {φ : V → ℝ → ℝ} {C : Matrix V V ℝ} {f θ L : ℝ} (hC : C.IsStrictUpperTriangular) (hC0 : ∀ (x y : V), 0 ≤ C x y) (hCf : ∀ (x y : V), C x y ≤ f) (hC1 : C.mulVec 1 ≤ 1) (hφ0 : ∀ (y : V) (t : ℝ), 0 ≤ φ y t) (hφθ : ∀ (y : V) (t : ℝ), φ y t ≤ max (t - θ * f) 0) (hφm : ∀ (y : V), Monotone (φ y)) (hφL : ∀ (y : V) (s t : ℝ), s ≤ t → φ y t - φ y s ≤ L * (t - s)) (hf : 0 < f) (hθ : 0 < θ) (hL : 0 ≤ L) (k : ℕ) (x y : V) :
cutoffCorrectionFix φ C x y - cutoffCorrectionIter φ C k x y ≤ f * Real.exp (1 / θ) * (L / θ) ^ k / ↑k.factorial

Factorial truncation. After k iterations of the cutoff correction recursion, every entry is within f e^(1 / θ) (L / θ)^k / k! of the fixed point, uniformly in the size of V [OpenAI2026LogSpace, Lemma 4.1].

theorem Matrix.cutoffCorrection_residual_nonneg {V : Type u_1} [Fintype V] {φ : V → ℝ → ℝ} {C : Matrix V V ℝ} {f θ : ℝ} (hC0 : ∀ (x y : V), 0 ≤ C x y) (hφ0 : ∀ (y : V) (t : ℝ), 0 ≤ φ y t) (hφθ : ∀ (y : V) (t : ℝ), φ y t ≤ max (t - θ * f) 0) (hφm : ∀ (y : V), Monotone (φ y)) (hθf : 0 ≤ θ * f) (k : ℕ) (x y : V) :
0 ≤ (C - cutoffCorrectionIter φ C k + cutoffCorrectionIter φ C k * C) x y

The corrected matrix of a finite iterate is nonnegative.

theorem Matrix.cutoffCorrection_residual_le {V : Type u_1} [Fintype V] [LinearOrder V] {φ : V → ℝ → ℝ} {C : Matrix V V ℝ} {f θ L : ℝ} (hC : C.IsStrictUpperTriangular) (hC0 : ∀ (x y : V), 0 ≤ C x y) (hCf : ∀ (x y : V), C x y ≤ f) (hC1 : C.mulVec 1 ≤ 1) (hφ0 : ∀ (y : V) (t : ℝ), 0 ≤ φ y t) (hφθ : ∀ (y : V) (t : ℝ), φ y t ≤ max (t - θ * f) 0) (hφm : ∀ (y : V), Monotone (φ y)) (hφL : ∀ (y : V) (s t : ℝ), s ≤ t → φ y t - φ y s ≤ L * (t - s)) (hf : 0 < f) (hθ : 0 < θ) (hL : 0 ≤ L) {θ₂ : ℝ} {y : V} (hgood : ∀ (t : ℝ), t - θ₂ * f ≤ φ y t) (k : ℕ) (x : V) :
(C - cutoffCorrectionIter φ C k + cutoffCorrectionIter φ C k * C) x y ≤ θ₂ * f + f * Real.exp (1 / θ) * (L / θ) ^ k / ↑k.factorial

Fully corrected columns have small residuals. If the cutoff of column y leaves at most θ₂ f behind, the corrected matrix of the k-th iterate has entries at most θ₂ f + f e^(1 / θ) (L / θ)^k / k! in that column [OpenAI2026LogSpace, Lemma 4.4].

theorem Matrix.exists_factorial_bound_le (θ L : ℝ) {δ : ℝ} (hδ : 0 < δ) :
∃ (k : ℕ), Real.exp (1 / θ) * (L / θ) ^ k / ↑k.factorial ≤ δ

A constant number of iterations suffices: for every accuracy δ > 0 there is k, depending only on θ, L and δ, with e^(1 / θ) (L / θ)^k / k! ≤ δ [OpenAI2026LogSpace, Lemma 4.1].