Documentation

CslibFrontier.Computability.LogSpaceDerandomization.NormalizedAtomRows.MeanBias

Actual preparation mean bias from absolute residual errors #

The selected preparation uses a supplied completed raw child. The actual wiring client uses the conditional-walk-smoothed incoming-normalized signed lower-child residual. Its comparison target is genuinePrep, with the same full terminal rank slice on the same full environment. Conditional averaging uses source × usage, preserving correlations and inherited copy suffixes. Stationarity identifies the selected input mean of the ζ-scaled second telescoping prefix. Mixing alone does not change this deterministic bias.

These original bounds require explicit absolute residual errors; they do not derive them from recursive relative estimates, row mass or clipped relative errors. Numerical recursive mean envelopes, reserve induction and native RL=L remain open. The telescoping proof pattern is adapted from Samuel Schlesinger's compression API.

Actual cutoff regularity, retaining the hierarchy's own rho rather than replacing it with a polynomial gate. The two constants multiply entry and rank errors separately.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.preparationError {P J : ℕ} [Fact (Nat.Prime P)] (R : RoleProfile J) (D : ZMod P) (st : List (ZMod P)) (k : ℕ) (Lh Lρ : ℝ) (A : Environment P J → Matrix (ZMod P) (ZMod P) ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (σ : Environment P J) (x y : ZMod P) :

Exact absolute residual-error envelope. The maximum is over the full terminal rank slice, never the narrower usage slice. Signed entries and empty ranks are allowed.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.preparationError_eq_firstPrefix {P J : ℕ} [Fact (Nat.Prime P)] (R : RoleProfile J) (D : ZMod P) (st : List (ZMod P)) (k : ℕ) (Lh Lρ : ℝ) (F : ℕ → Environment P J → ZMod P → ZMod P → ℝ) (second : Environment P J → ZMod P → ℕ → ZMod P → ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (i : ℕ) (σ : Environment P J) (x y : ZMod P) :
preparationError R D st k Lh Lρ (fun (τ : Environment P J) (a b : ZMod P) => F (i + 1) τ a b) G σ x y = (Lh * (rate k * |actualPrefix (firstSignalIncrement F k second) (fun (x : Environment P J) (x_1 x_2 : ZMod P) (x_3 : Fin 2) => 0) i σ x y 0 - G x y / rate k|) + Lρ * Finset.kthLargest 1 {w : ZMod P | retainedMask R.terminal (side P k) D st σ w} fun (w : ZMod P) => rate k * |actualPrefix (firstSignalIncrement F k second) (fun (x : Environment P J) (x_1 x_2 : ZMod P) (x_3 : Fin 2) => 0) i σ x w 0 - G x w / rate k|) / rate k

The completed raw-child error is exactly the absolute first-prefix error times its rate. The maximum still ranges over the full terminal slice, including empty ranks. This identity makes no inference from a clipped relative-error bound.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.preparationError_le {P J : ℕ} [Fact (Nat.Prime P)] (R : RoleProfile J) (D : ZMod P) (st : List (ZMod P)) (k : ℕ) {Lh Lρ : ℝ} (hLh : 0 ≤ Lh) (hLρ : 0 ≤ Lρ) (A : Environment P J → Matrix (ZMod P) (ZMod P) ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (σ : Environment P J) (x y : ZMod P) {e m : ℝ} (hm : 0 ≤ m) (he : |A σ x y - G x y| ≤ e) (hrow : ∀ (w : ZMod P), retainedMask R.terminal (side P k) D st σ w → |A σ x w - G x w| ≤ m) :
preparationError R D st k Lh Lρ A G σ x y ≤ (Lh * e + Lρ * m) / rate k

Explicit absolute entry/rank envelopes bound the actual preparation error. No bound on the true row is required. The rank envelope is nonnegative also for an empty rank.

@[simp]
theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.preparationError_self {P J : ℕ} [Fact (Nat.Prime P)] (R : RoleProfile J) (D : ZMod P) (st : List (ZMod P)) (k : ℕ) (Lh Lρ : ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (σ : Environment P J) (x y : ZMod P) :
preparationError R D st k Lh Lρ (fun (x : Environment P J) => G) G σ x y = 0

Exact zero residual perturbation has zero error, including an empty full-rank slice.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.preparation_sub_genuinePrep_le {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (hK : 0 < HP.K) (R : RoleProfile J) (D : ZMod P) (st : List (ZMod P)) (k : ℕ) {Lh Lρ : ℝ} (hh : ∀ (a b : ℝ), |Cslib.polynomialPrepCutoff4 HP.θ a - Cslib.polynomialPrepCutoff4 HP.θ b| ≤ Lh * |a - b|) (hρ : ∀ (a b : ℝ), |HP.ρ a - HP.ρ b| ≤ Lρ * |a - b|) (A : Environment P J → Matrix (ZMod P) (ZMod P) ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (σ : Environment P J) (x y : ZMod P) :
|DenseRowRecipe.preparation (Cslib.polynomialPrepCutoff4 HP.θ) HP.ρ HP.K (rate k) (retainedMask R.terminal (side P k) D st) (A σ) σ x y - genuinePrep HP R.terminal D st k G σ x y| ≤ preparationError R D st k Lh Lρ A G σ x y

Pointwise genuine-target comparison for arbitrary signed full-environment residuals.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.preparation_mean_bias_le {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (hK : 0 < HP.K) (R : RoleProfile J) (D : ZMod P) (ss st : List (ZMod P)) (ks k kt : ℕ) {Lh Lρ : ℝ} (hh : ∀ (a b : ℝ), |Cslib.polynomialPrepCutoff4 HP.θ a - Cslib.polynomialPrepCutoff4 HP.θ b| ≤ Lh * |a - b|) (hρ : ∀ (a b : ℝ), |HP.ρ a - HP.ρ b| ≤ Lρ * |a - b|) (A : Environment P J → Matrix (ZMod P) (ZMod P) ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (x y : ZMod P) :
|Cslib.rowSliceMean (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) (fun (σ : Environment P J) => DenseRowRecipe.preparation (Cslib.polynomialPrepCutoff4 HP.θ) HP.ρ HP.K (rate k) (retainedMask R.terminal (side P k) D st) (A σ) σ) x y - genuineMean HP R.source R.terminal (side P ks) (side P kt) (CopyPadding.identifier D ss x) D st k G x y| ≤ Cslib.rowSliceMean (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) (preparationError R D st k Lh Lρ A G) x y

Joint-slice integration against the actual genuine target. No source/usage independence or desired preparation mean is assumed; empty slices contribute zero.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actualClippedMean_second_eq {P J : ℕ} [Fact (Nat.Prime P)] {E : Type u_1} [Fintype E] [Nonempty E] (HP : FourthRootHierarchyParams 16 1 16 32 8) (s t : Fin J) (Ls La Lt : ℕ) (D : ZMod P) (ss st : List (ZMod P)) (graphs : ℕ → (x y : ZMod P) → Cslib.RotationMap (Cslib.RetainedPairSlice (retainedMask s Ls D ss) (retainedMask t Lt D st) x y) E) (times : ℕ → ZMod P → ZMod P → ℕ) (input F : ℕ → Environment P J → ZMod P → ZMod P → ℝ) (k : ℕ) (ζ : ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (i : ℕ) (x y : ZMod P) :
have H := fun (j : ℕ) => Cslib.conditionalWalk (retainedMask s Ls D ss) (retainedMask t Lt D st) (graphs j) (times j) (input j); actualClippedMean HP s t Ls La Lt D ss st k G ζ (firstSignalIncrement F k (secondSignalIncrement H ζ)) (fun (x : Environment P J) (x_1 x_2 : ZMod P) (x_3 : Fin 2) => 0) 1 i x y = min 1 (|ζ| * |Cslib.rowSliceMean (retainedMask s Ls D ss) (retainedMask t Lt D st) (input (i + 1)) x y - genuineMean HP s t Ls Lt (CopyPadding.identifier D ss x) D st k G x y|)

Stationarity and telescoping isolate the actual second deterministic discrepancy. The first coordinate and its raw full-rank target are retained unchanged.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actualSelectedSecondSignal_mean_bias_le {P J : ℕ} [Fact (Nat.Prime P)] {E : Type u_1} [Fintype E] [Nonempty E] (HP : FourthRootHierarchyParams 16 1 16 32 8) (hK : 0 < HP.K) (D : ZMod P) (R : RoleProfile J) (ks k kt : ℕ) (_husage : k ≤ kt) (ss st : List (ZMod P)) (A : ℕ → Environment P J → Matrix (ZMod P) (ZMod P) ℝ) (graphs : ℕ → (x y : ZMod P) → Cslib.RotationMap (Cslib.RetainedPairSlice (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) x y) E) (times : ℕ → ZMod P → ZMod P → ℕ) (F : ℕ → Environment P J → ZMod P → ZMod P → ℝ) {Lh Lρ : ℝ} (_hLρ : 0 ≤ Lρ) (hh : ∀ (a b : ℝ), |Cslib.polynomialPrepCutoff4 HP.θ a - Cslib.polynomialPrepCutoff4 HP.θ b| ≤ Lh * |a - b|) (hρ : ∀ (a b : ℝ), |HP.ρ a - HP.ρ b| ≤ Lρ * |a - b|) (ζ : ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (i : ℕ) (x y : ZMod P) :
have T := fun (j : ℕ) (σ : Environment P J) (x y : ZMod P) => selectedPreparation HP D R st k (A j) σ x y; have H := fun (j : ℕ) => Cslib.conditionalWalk (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) (graphs j) (times j) (T j); actualClippedMean HP R.source R.terminal (side P ks) (side P k) (side P kt) D ss st k G ζ (firstSignalIncrement F k (secondSignalIncrement H ζ)) (fun (x : Environment P J) (x_1 x_2 : ZMod P) (x_3 : Fin 2) => 0) 1 i x y ≤ min 1 (|ζ| * Cslib.rowSliceMean (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) (preparationError R D st k Lh Lρ (A (i + 1)) G) x y)

Completed raw-child errors pay the clipped second deterministic mean discrepancy. All child requests and their correlations survive in A; the envelope is an average of absolute residual errors, with the full-rank maximum and the rate divisor explicit.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actualCompletedSecondSignal_mean_bias_le {P J : ℕ} [Fact (Nat.Prime P)] {q : ℕ} {E : Type u_1} [Fintype E] [Nonempty E] (HP : FourthRootHierarchyParams 16 1 16 32 8) (hK : 0 < HP.K) (D : ZMod P) (R : RoleProfile J) (ks k kt : ℕ) (_husage : k ≤ kt) (ss st : List (ZMod P)) (l bin km kb : ℕ) (sm : List (ZMod P)) (Kc : ℕ) (binCutoff : ℝ → ℝ) (raw prep : ℕ → HierarchyTask.Request q (Fin J) (ZMod P) → Environment P J → Matrix (ZMod P) (ZMod P) ℝ) (maximum : ℕ → HierarchyTask.Request q (Fin J) (ZMod P) → Environment P J → ZMod P → ℝ) (rawSteps : ℕ → ℕ) (graphs : ℕ → (x y : ZMod P) → Cslib.RotationMap (Cslib.RetainedPairSlice (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) x y) E) (times : ℕ → ZMod P → ZMod P → ℕ) {Lh Lρ : ℝ} (_hLρ : 0 ≤ Lρ) (hh : ∀ (a b : ℝ), |Cslib.polynomialPrepCutoff4 HP.θ a - Cslib.polynomialPrepCutoff4 HP.θ b| ≤ Lh * |a - b|) (hρ : ∀ (a b : ℝ), |HP.ρ a - HP.ρ b| ≤ Lρ * |a - b|) (ζ : ℝ) (G : Matrix (ZMod P) (ZMod P) ℝ) (i : ℕ) (x y : ZMod P) :
have A := fun (j : ℕ) (σ : Environment P J) (x y : ZMod P) => completedRawChild HP D R l bin ks km k kb ss sm st Kc binCutoff (raw j) (prep j) (maximum j) (rawSteps j) σ x y; have T := fun (j : ℕ) (σ : Environment P J) (x y : ZMod P) => selectedPreparation HP D R st k (A j) σ x y; have H := fun (j : ℕ) => Cslib.conditionalWalk (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) (graphs j) (times j) (T j); actualClippedMean HP R.source R.terminal (side P ks) (side P k) (side P kt) D ss st k G ζ (firstSignalIncrement A k (secondSignalIncrement H ζ)) (fun (x : Environment P J) (x_1 x_2 : ZMod P) (x_3 : Fin 2) => 0) 1 i x y ≤ min 1 (|ζ| * Cslib.rowSliceMean (retainedMask R.source (side P ks) D ss) (retainedMask R.terminal (side P kt) D st) (preparationError R D st k Lh Lρ (A (i + 1)) G) x y)

Actual recursive preparation wiring: cutoff after the full-rank raw H4 child walk, then the source × usage preparation walk. Request size q is fixed across precisions. Bias is charged to that completed raw child minus G, with full-rank maximum and inverse rate explicit in preparationError.