Documentation

CslibFrontier.Computability.LogSpaceDerandomization.NormalizedAtomRows.Sharp

Sharp cap-free comparison for actual normalized atoms #

The stationary, no-overflow and first-overflow comparisons adapt the proof patterns of Samuel Schlesinger's polynomial rows to the actual hierarchy decoder. True first entries are arbitrary nonnegative reals. The actual stationary preloss supplies the bounded common loss and default needed by the landed saturated-root API; no compression state is capped. Final and tail constants are fixed before the later dyadic compression floor; only the stationary coefficient may depend on that floor. The positive post-overflow horizon starts at the already-added raw input. The assembly excludes false first overflows explicitly.

This is the deterministic fourth-root comparison part of §8.2, Lemmas 8.2–8.3 (printed pp. 46–48), of [OAI26e], revision 7ef5c0cc, using fourth rather than eighth roots. Raw prefix errors and capacity schedules remain caller inputs. It does not prove Proposition 8.5, integrated moments, recursive budget induction or native RL.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.stationary_bound (HP : FourthRootHierarchyParams 16 1 16 32 8) (ζ : ℝ) (hζ : 0 < ζ) {scale : ℝ} (hs : 0 < scale) (hmargin : scale ≤ HP.η) {δ : ℝ} (hδ : 0 < δ) (hδs : δ ≤ scale) :
∃ (Cpre : ℝ), 0 ≤ Cpre ∧ ∀ {ι : Type u_1} (s : Finset ι) (n : ℕ → ℕ) (Δ : ℕ → ι → Fin 2 → ℝ) (raw truth : ι → Fin 2 → ℝ) (m j : ℕ), j ≤ m → (∀ i < j, Cslib.RowCompression.stepThreshold s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } i ≤ Cslib.RowCompression.dyadicFloor δ m i) → ∀ (ε : ℕ → ℝ), (∀ i < j, 0 ≤ ε i) → (∀ i < j, ∀ y ∈ s, δ / 2 ≤ truth y 0 → Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw (i + 1) y) ≤ ε i) → ∀ y ∈ s, |Cslib.RowCompression.stateRootError (output HP ζ) s HP.K (Cslib.RowCompression.stationaryState s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } truth j) { defaultValue := 0, row := truth } y| ≤ Cpre * ∑ i ∈ Finset.range j, Cslib.RowCompression.dyadicFloor δ m i * ε i

Weighted stationary preloss reuses the existing theorem. Only this coefficient may blow up as the later compression scale tends to zero; scalar root sensitivity stays fixed.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.continuation_preserved (HP : FourthRootHierarchyParams 16 1 16 32 8) (ζ : ℝ) {ι : Type u_1} (s : Finset ι) (n : ℕ → ℕ) (Δ : ℕ → ι → Fin 2 → ℝ) (raw truth : ι → Fin 2 → ℝ) {scale δ : ℝ} (hs : 0 < scale) (hmargin : scale ≤ HP.η) (hδ : 0 < δ) (hδs : δ ≤ scale) (m j r : ℕ) (hr : j + r ≤ m) (hno : ∀ i < j, Cslib.RowCompression.stepThreshold s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } i ≤ Cslib.RowCompression.dyadicFloor δ m i) (hfirst : ∀ y ∈ s, 0 ≤ truth y 0) (hsecond : ∀ y ∈ s, |truth y 1| ≤ scale / 2) (hn : ∀ (i : ℕ), j ≤ i → i < m → HP.K ≤ n i) (y : ι) (hy : y ∈ s) :
have b := Cslib.RowCompression.stationaryState s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } truth j; have c := Cslib.RowCompression.stationaryContinuation s n HP.K (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } truth j r; output HP ζ (c.row y 0) (c.row y 1) (Cslib.RowCompression.firstRank s HP.K c.defaultValue c.row) = output HP ζ (b.row y 0) (b.row y 1) (Cslib.RowCompression.firstRank s HP.K b.defaultValue b.row)

Zero-increment continuation preserves the actual normalized decoder.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.relative_bound (HP : FourthRootHierarchyParams 16 1 16 32 8) (ζ : ℝ) (hζ : 0 < ζ) {scale : ℝ} (hs : 0 < scale) (hscale : scale ≤ HP.atomCap / 10000) :
∃ (C : ℝ), 0 ≤ C ∧ ∀ {ι : Type u} (s : Finset ι) (n : ℕ → ℕ) (floors : ℕ → ℝ) (Δ : ℕ → ι → Fin 2 → ℝ) (truth raw loss : ι → Fin 2 → ℝ) (z : ℝ) (m : ℕ), z ≤ scale → 0 < m → (∀ i < m, HP.K ≤ n i) → (∀ i < m, floors i ≤ scale) → (∀ y ∈ s, 0 ≤ truth y 0) → (∀ y ∈ s, |truth y 1| ≤ scale / 2) → (∀ y ∈ s, ∀ (ν : Fin 2), |loss y ν| ≤ scale / 2) → ∀ (ε : ℕ → ℝ), (∀ i ≤ m, 0 ≤ ε i) → (∀ i ≤ m, ∀ y ∈ s, Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw i y) ≤ ε i) → ∀ y ∈ s, |Cslib.RowCompression.stateRootError (output HP ζ) s HP.K (Cslib.RowCompression.iterate s n (fun (x : ℕ) => HP.K) floors Δ { defaultValue := z, row := raw + loss } m) (Cslib.RowCompression.iterate s n (fun (x : ℕ) => HP.K) floors (fun (x : ℕ) => 0) { defaultValue := z, row := truth + loss } m) y| ≤ C * Cslib.RowCompression.prefixErrorBudget ε m

Cap-free actual relative comparison at fixed shape. The bounded initial default is necessary for the sentinel coupling; it is supplied by actual stationary preloss.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.sharp_noOverflow (HP : FourthRootHierarchyParams 16 1 16 32 8) (ζ : ℝ) (hζ : 0 < ζ) {scale : ℝ} (hs : 0 < scale) (hmargin : scale ≤ HP.η) :
∃ (Cfinal : ℝ), 0 ≤ Cfinal ∧ ∀ (δ : ℝ), 0 < δ → δ ≤ scale → ∃ (Cpre : ℝ), 0 ≤ Cpre ∧ ∀ {ι : Type u} (s : Finset ι) (n : ℕ → ℕ) (Δ : ℕ → ι → Fin 2 → ℝ) (raw truth : ι → Fin 2 → ℝ) (m : ℕ), (∀ i < m, Cslib.RowCompression.stepThreshold s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } i ≤ Cslib.RowCompression.dyadicFloor δ m i) → (∀ y ∈ s, 0 ≤ truth y 0) → ∀ (ε : ℕ → ℝ), (∀ i < m, 0 ≤ ε i) → (∀ i < m, ∀ y ∈ s, δ / 2 ≤ truth y 0 → Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw (i + 1) y) ≤ ε i) → ∀ (εfinal : ℝ), 0 ≤ εfinal → (∀ y ∈ s, Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw m y) ≤ εfinal) → ∀ y ∈ s, |Cslib.RowCompression.stateRootError (output HP ζ) s HP.K (Cslib.RowCompression.iterate s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } m) { defaultValue := 0, row := truth } y| ≤ Cpre * ∑ i ∈ Finset.range m, Cslib.RowCompression.dyadicFloor δ m i * ε i + Cfinal * εfinal

Sharp no-overflow comparison. Cfinal is chosen before the later compression scale δ. No initial-prefix error enters a 28-weighted budget.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.firstOverflow_bound (HP : FourthRootHierarchyParams 16 1 16 32 8) (ζ : ℝ) (hζ : 0 < ζ) {scale : ℝ} (hs : 0 < scale) (_hmargin : scale ≤ HP.η) (hcapscale : scale ≤ HP.atomCap / 10000) :
∃ (Ctail : ℝ), 0 ≤ Ctail ∧ ∀ {ι : Type u} (s : Finset ι) (n : ℕ → ℕ) (Δ : ℕ → ι → Fin 2 → ℝ) (raw truth : ι → Fin 2 → ℝ) (δ : ℝ), 0 < δ → δ ≤ scale → ∀ (m j : ℕ), j < m → Cslib.RowCompression.IsFirstOverflow s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } j → (∀ y ∈ s, 0 ≤ truth y 0) → (∀ y ∈ s, |truth y 1| ≤ scale / 2) → (∀ (i : ℕ), j ≤ i → i < m → HP.K ≤ n i) → ∀ (ε : ℕ → ℝ), (∀ (i : ℕ), j ≤ i → i < m → 0 ≤ ε i) → (∀ (i : ℕ), j ≤ i → i < m → ∀ y ∈ s, Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw (i + 1) y) ≤ ε i) → ∀ y ∈ s, |Cslib.RowCompression.stateRootError (output HP ζ) s HP.K (Cslib.RowCompression.iterate s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } m) (Cslib.RowCompression.stationaryContinuation s n HP.K (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } truth j (m - j)) y| ≤ Ctail * ∑ i ∈ Finset.Ico j m, 28 ^ (m - i) * ε i

Actual first-overflow tail compared with the stationary continuation. Errors start at the already-added overflow input, not the earlier global prefix.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.sharp_firstOverflow (HP : FourthRootHierarchyParams 16 1 16 32 8) (ζ : ℝ) (hζ : 0 < ζ) {scale : ℝ} (hs : 0 < scale) (hmargin : scale ≤ HP.η) (hcapscale : scale ≤ HP.atomCap / 10000) :
∃ (Ctail : ℝ), 0 ≤ Ctail ∧ ∀ (δ : ℝ), 0 < δ → δ ≤ scale → ∃ (Cpre : ℝ), 0 ≤ Cpre ∧ ∀ {ι : Type u} (s : Finset ι) (n : ℕ → ℕ) (Δ : ℕ → ι → Fin 2 → ℝ) (raw truth : ι → Fin 2 → ℝ) (m j : ℕ), j < m → Cslib.RowCompression.IsFirstOverflow s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } j → (∀ y ∈ s, 0 ≤ truth y 0) → (∀ y ∈ s, |truth y 1| ≤ scale / 2) → (∀ (i : ℕ), j ≤ i → i < m → HP.K ≤ n i) → ∀ (ε : ℕ → ℝ), (∀ i < m, 0 ≤ ε i) → (∀ i < j, ∀ y ∈ s, δ / 2 ≤ truth y 0 → Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw (i + 1) y) ≤ ε i) → (∀ (i : ℕ), j ≤ i → i < m → ∀ y ∈ s, Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw (i + 1) y) ≤ ε i) → ∀ y ∈ s, |Cslib.RowCompression.stateRootError (output HP ζ) s HP.K (Cslib.RowCompression.iterate s n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor δ m) Δ { defaultValue := 0, row := raw } m) { defaultValue := 0, row := truth } y| ≤ Cpre * ∑ i ∈ Finset.range j, Cslib.RowCompression.dyadicFloor δ m i * ε i + Ctail * ∑ i ∈ Finset.Ico j m, 28 ^ (m - i) * ε i

Actual first-overflow truth decomposition. Ctail is chosen once at fixed signalScale; only Cpre depends on the subsequently chosen compressionScale.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.sharp_compression (HP : FourthRootHierarchyParams 16 1 16 32 8) (ζ : ℝ) (hζ : 0 < ζ) {scale : ℝ} (hs : 0 < scale) (hmargin : scale ≤ HP.η) (hcapscale : scale ≤ HP.atomCap / 10000) :
∃ (C : ℝ), 0 ≤ C ∧ ∀ (η : ℝ), 0 < η → η ≤ scale → ∃ (A : ℝ), 0 ≤ A ∧ ∀ {ι : Type u_1} (S : Finset ι) (n : ℕ → ℕ) (Δ : ℕ → ι → Fin 2 → ℝ) (raw truth : ι → Fin 2 → ℝ) (m : ℕ) (heavy : ℕ → Prop), (∀ y ∈ S, 0 ≤ truth y 0) → (∀ y ∈ S, |truth y 1| ≤ scale / 2) → (∀ i < m, HP.K ≤ n i) → ∀ (ε : ℕ → ℝ), (∀ i < m, 0 ≤ ε i) → (∀ i < m, ∀ y ∈ S, Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw (i + 1) y) ≤ ε i) → ∀ (εfinal : ℝ), 0 ≤ εfinal → (∀ y ∈ S, Cslib.RowCompression.clippedError (truth y 0) (truth y 1) (Cslib.RowCompression.uncompressedRow Δ raw m y) ≤ εfinal) → (¬∃ j < m, Cslib.RowCompression.IsFirstOverflow S n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor η m) Δ { defaultValue := 0, row := raw } j ∧ ¬heavy j) → ∀ y ∈ S, |Cslib.RowCompression.stateRootError (output HP ζ) S HP.K (Cslib.RowCompression.iterate S n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor η m) Δ { defaultValue := 0, row := raw } m) { defaultValue := 0, row := truth } y| ≤ (A * ∑ i ∈ Finset.range m, Cslib.RowCompression.dyadicFloor η m i * ε i + C * if ∀ i < m, Cslib.RowCompression.stepThreshold S n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor η m) Δ { defaultValue := 0, row := raw } i ≤ Cslib.RowCompression.dyadicFloor η m i then εfinal else 0) + C * ∑ j ∈ Finset.range m, if Cslib.RowCompression.IsFirstOverflow S n (fun (x : ℕ) => HP.K) (Cslib.RowCompression.dyadicFloor η m) Δ { defaultValue := 0, row := raw } j ∧ heavy j then ∑ i ∈ Finset.Ico j m, 28 ^ (m - i) * ε i else 0

Sharp actual-output decomposition on the complement of false first overflow.

theorem Matrix.FourthRootHierarchyParams.NormalizedRow.fixed_shape (HP : FourthRootHierarchyParams 16 1 16 32 8) :
∃ (scale : ℝ) (ζ : ℝ), 0 < scale ∧ scale ≤ HP.η ∧ scale ≤ HP.atomCap / 10000 ∧ 0 < ζ ∧ ζ ≤ scale / 2 ∧ ζ ≤ HP.θ / 2

A fixed shape and positive denominator encoding can be chosen before any later floor. This is compatible with the actual preparation mean in [0,1] vanishing on light first input.