Documentation

CslibFrontier.Computability.LogSpaceDerandomization.RowCompression.Sentinel

Exact sentinel replacement under row compression #

Replace the first coordinate at a finite set of marked endpoints by one common positive sentinel, leaving every second coordinate unchanged. When the modified first rank and size threshold are at most R, and both old and sentinel first coordinates at marked endpoints are strictly above 3R, the original and modified calculations have identical ranks, thresholds, and new defaults. Compression is identity in both channels at marked endpoints, and sentinel replacement commutes with the actual update on every retained endpoint.

The proof uses Finset.kthLargest_eq_of_eq_or_gt, including its boundary case where a rank equals the ceiling. It preserves actual padded ranks, rather than only clipped ranks. No bound on the largest original entry is needed. The modified first-rank bound also implies that fewer than K retained endpoints can be marked.

This is the exact rank and update step in the sentinel argument of [OpenAI2026LogSpace, Lemma 8.3], when the proof removes its modification of first coordinates above L₁. It does not identify or store sentinels in the algorithm. Maintaining the large-coordinate bounds through later increments, iterating the comparison, upper saturation of row outputs, and the full post-overflow stability estimate remain separate. No root exponent or machine-resource bound is asserted here.

Main definitions #

Main results #

References #

noncomputable def Cslib.RowCompression.sentinelFirst {ι : Type u_1} (marked : Finset ι) (L : ℝ) (w : ι → Fin 2 → ℝ) (y : ι) (ν : Fin 2) :

Replace marked first coordinates by one sentinel, keeping every second coordinate.

theorem Cslib.RowCompression.sentinelFirst_zero_of_mem {ι : Type u_1} {marked : Finset ι} {L : ℝ} {w : ι → Fin 2 → ℝ} {y : ι} (hy : y ∈ marked) :
sentinelFirst marked L w y 0 = L
theorem Cslib.RowCompression.sentinelFirst_one {ι : Type u_1} {marked : Finset ι} {L : ℝ} {w : ι → Fin 2 → ℝ} {y : ι} :
sentinelFirst marked L w y 1 = w y 1
theorem Cslib.RowCompression.sentinelFirst_of_not_mem {ι : Type u_1} {marked : Finset ι} {L : ℝ} {w : ι → Fin 2 → ℝ} {y : ι} (hy : y ∉ marked) :
sentinelFirst marked L w y = w y
theorem Cslib.RowCompression.firstRank_eq_sentinelFirst {ι : Type u_1} {s marked : Finset ι} {K : ℕ} {z R L : ℝ} {w : ι → Fin 2 → ℝ} (hL : R < L) (hw : ∀ y ∈ s, y ∈ marked → R < w y 0) (hq : firstRank s K z (sentinelFirst marked L w) ≤ R) :
firstRank s K z w = firstRank s K z (sentinelFirst marked L w)

A padded first rank below the ceiling is unchanged by replacing larger first coordinates.

theorem Cslib.RowCompression.threshold_eq_sentinelFirst {ι : Type u_1} {s marked : Finset ι} {n : ℕ} {ρ z R L : ℝ} {w : ι → Fin 2 → ℝ} (hL : R < L) (hw : ∀ y ∈ s, y ∈ marked → R < w y 0) (hu : threshold s n ρ z (sentinelFirst marked L w) ≤ R) :
threshold s n ρ z w = threshold s n ρ z (sentinelFirst marked L w)

The actual size threshold is unchanged, including its floor and old-default terms.

theorem Cslib.RowCompression.newDefault_eq_sentinelFirst {ι : Type u_1} {s marked : Finset ι} {n K : ℕ} {ρ z R L : ℝ} {w : ι → Fin 2 → ℝ} (hL : R < L) (hw : ∀ y ∈ s, y ∈ marked → R < w y 0) (hq : firstRank s K z (sentinelFirst marked L w) ≤ R) (hu : threshold s n ρ z (sentinelFirst marked L w) ≤ R) :
newDefault s n K ρ z w = newDefault s n K ρ z (sentinelFirst marked L w)

Both actual rank quantities, and consequently the new default, agree exactly.

theorem Cslib.RowCompression.card_marked_lt_of_sentinelFirst {ι : Type u_1} {s marked : Finset ι} {K : ℕ} {z R L : ℝ} {w : ι → Fin 2 → ℝ} (hK : 0 < K) (hL : R < L) (hmarked : marked ⊆ s) (hq : firstRank s K z (sentinelFirst marked L w) ≤ R) :
marked.card < K

The bounded modified first rank itself forces strict cardinality of the marked set.

theorem Cslib.RowCompression.update_eq_self_of_mem_sentinelFirst {ι : Type u_1} {s marked : Finset ι} {n K : ℕ} {ρ z R L : ℝ} {w : ι → Fin 2 → ℝ} {y : ι} (hL : 3 * R < L) (hw : ∀ y ∈ s, y ∈ marked → 3 * R < w y 0) (hu : threshold s n ρ z (sentinelFirst marked L w) ≤ R) (hy : y ∈ s) (hm : y ∈ marked) :
update s n K ρ z w y = w y ∧ update s n K ρ z (sentinelFirst marked L w) y = sentinelFirst marked L w y

Original and sentinel entries are both in the identity region at every marked retained ID. The second coordinate is untouched, even if it is signed or large.

theorem Cslib.RowCompression.sentinelFirst_update {ι : Type u_1} {s marked : Finset ι} {n K : ℕ} {ρ z R L : ℝ} {w : ι → Fin 2 → ℝ} {y : ι} (hL : 3 * R < L) (hw : ∀ y ∈ s, y ∈ marked → 3 * R < w y 0) (hq : firstRank s K z (sentinelFirst marked L w) ≤ R) (hu : threshold s n ρ z (sentinelFirst marked L w) ≤ R) (hy : y ∈ s) :
sentinelFirst marked L (update s n K ρ z w) y = update s n K ρ z (sentinelFirst marked L w) y

Sentinel replacement commutes with the concrete compression update on every retained ID. This also gives equality of both channels off the marked set; it assumes no row-output law.