Documentation

CslibFrontier.Computability.LogSpaceDerandomization.NormalizedAtomRows.TwoMask

Full-rank first means and narrow-usage second means #

The actual H4 environment and uncentered hierarchy decoder are preserved. This fourth-moment adaptation of §8.2, Proposition 8.5 (printed pp. 45–49), of [OAI26e], revision 7ef5c0cc, retains explicit lower-child contracts; it does not establish recursive induction or native resource bounds. Christian Reitwiessner supplied the H4 specialization; the compression and norm proof patterns are adapted from Samuel Schlesinger.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.twoMaskMean {P J : ℕ} [Fact (Nat.Prime P)] (s t : Fin J) (Ls La Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (F : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (x y : ZMod P) (ν : Fin 2) :

Actual conditional means: first on full terminal rank, second on narrow usage.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.genuineTarget {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (s t : Fin J) (Ls Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (k : ℕ) (G : Matrix (ZMod P) (ZMod P) ℝ) (ζ : ℝ) (σ : Environment P J) (x y : ZMod P) (ν : Fin 2) :

Genuine target with unmasked first input and zero-extended uncentered preparatory mean.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actual_two_mask_clipped_split {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (s t : Fin J) (Ls La Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (k : ℕ) (G : Matrix (ZMod P) (ZMod P) ℝ) (hG : ∀ (x y : ZMod P), 0 ≤ G x y) (ζ : ℝ) (F : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (hz : ∀ (σ : Environment P J) (x y : ZMod P), ¬retainedMask t Lt D suffix σ y → F σ x y 1 = 0) (σ : Environment P J) (x y : ZMod P) :
have a := twoMaskMean s t Ls La Lt D sourceSuffix suffix F x y; have d := G x y / rate k; have v := ζ * genuineMean HP s t Ls Lt (CopyPadding.identifier D sourceSuffix x) D suffix k G x y; Cslib.RowCompression.clippedError (genuineTarget HP s t Ls Lt D sourceSuffix suffix k G ζ σ x y 0) (genuineTarget HP s t Ls Lt D sourceSuffix suffix k G ζ σ x y 1) (F σ x y) ≤ (min 1 (|a 0 - d| / (1 + d)) + if retainedMask t Lt D suffix σ y then min 1 |a 1 - v| else 0) + |F σ x y 0 - a 0| / (1 + d) + if retainedMask t Lt D suffix σ y then |F σ x y 1 - a 1| else 0

Checked actual H4 pointwise client. The first mean uses rank La, never usage Lt. Outside usage, the second raw prefix and target are both zero.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actual_walk_prefix_support {P J : ℕ} [Fact (Nat.Prime P)] {E : Type u_1} [Fintype E] (s t : Fin J) (Ls Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (graphs : ℕ → (x y : ZMod P) → Cslib.RotationMap (Cslib.RetainedPairSlice (retainedMask s Ls D sourceSuffix) (retainedMask t Lt D suffix) x y) E) (times : ℕ → ZMod P → ZMod P → ℕ) (child first : ℕ → Environment P J → ZMod P → ZMod P → ℝ) (raw : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (hzero : ∀ (σ : Environment P J) (x y : ZMod P), raw σ x y 1 = 0) (σ : Environment P J) (x y : ZMod P) (hy : ¬retainedMask t Lt D suffix σ y) :
have p := fun (i : ℕ) (σ : Environment P J) (x y : ZMod P) => Cslib.conditionalWalk (retainedMask s Ls D sourceSuffix) (retainedMask t Lt D suffix) (graphs i) (times i) (child i) σ x y; have Δ := fun (i : ℕ) (y : ZMod P) (ν : Fin 2) => if ν = 0 then first i σ x y else p (i + 1) σ x y - if i = 0 then 0 else p i σ x y; (∀ (i : ℕ), Cslib.RowCompression.uncompressedRow Δ (raw σ x) (i + 1) y 1 = 0) ∧ ∀ (S : Finset (ZMod P)) (n K : ℕ → ℕ) (ρ : ℕ → ℝ) (m : ℕ), (Cslib.RowCompression.iterate S n K ρ Δ { defaultValue := 0, row := raw σ x } m).row y 1 = 0

Real conditional-walk prefixes on the usage slice, with telescoping increments and zero initial second signal, satisfy the support premise of the actual clipped split.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actual_two_mask_row_max {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (s t : Fin J) (Ls La Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (k : ℕ) (G : Matrix (ZMod P) (ZMod P) ℝ) (hG : ∀ (x y : ZMod P), 0 ≤ G x y) (ζ : ℝ) (F : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (hz : ∀ (σ : Environment P J) (x y : ZMod P), ¬retainedMask t Lt D suffix σ y → F σ x y 1 = 0) (σ : Environment P J) (x : ZMod P) :
have a := twoMaskMean s t Ls La Lt D sourceSuffix suffix F x; have d := fun (y : ZMod P) => G x y / rate k; have v := fun (y : ZMod P) => ζ * genuineMean HP s t Ls Lt (CopyPadding.identifier D sourceSuffix x) D suffix k G x y; (Finset.kthLargest 1 {y : ZMod P | retainedMask t La D suffix σ y} fun (y : ZMod P) => Cslib.RowCompression.clippedError (d y) (genuineTarget HP s t Ls Lt D sourceSuffix suffix k G ζ σ x y 1) (F σ x y)) ≤ (((Finset.kthLargest 1 {y : ZMod P | retainedMask t La D suffix σ y} fun (y : ZMod P) => |min 1 (|a y 0 - d y| / (1 + d y))|) + Finset.kthLargest 1 {y : ZMod P | retainedMask t Lt D suffix σ y} fun (y : ZMod P) => |min 1 |a y 1 - v y||) + Finset.kthLargest 1 {y : ZMod P | retainedMask t La D suffix σ y} fun (y : ZMod P) => ||F σ x y 0 - a y 0| / (1 + d y)|) + Finset.kthLargest 1 {y : ZMod P | retainedMask t Lt D suffix σ y} fun (y : ZMod P) => |(|F σ x y 1 - a y 1|)|

Explicit full-rank client for the four-max split, using the genuine target.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actualPrefix {P J : ℕ} (Δ : Environment P J → ZMod P → ℕ → ZMod P → Fin 2 → ℝ) (raw : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (i : ℕ) (σ : Environment P J) (x y : ZMod P) (ν : Fin 2) :

Actual prefix array, shared by both conditioning slices.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actualClippedMean {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (s t : Fin J) (Ls La Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (k : ℕ) (G : Matrix (ZMod P) (ZMod P) ℝ) (ζ : ℝ) (Δ : Environment P J → ZMod P → ℕ → ZMod P → Fin 2 → ℝ) (raw : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (ν : Fin 2) (i : ℕ) (x y : ZMod P) :

Clipped deterministic discrepancy on the appropriate actual slice; the second true signal is unmasked here because this coordinate is used only on usage.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.actualNoiseMax {P J : ℕ} [Fact (Nat.Prime P)] (s t : Fin J) (Ls La Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (k : ℕ) (G : Matrix (ZMod P) (ZMod P) ℝ) (Δ : Environment P J → ZMod P → ℕ → ZMod P → Fin 2 → ℝ) (raw : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (ν : Fin 2) (i : ℕ) (σ : Environment P J) (x : ZMod P) :

Same-environment uncentered noise maximum. The first is relative and full-rank; the second is absolute and usage-only. No rarity factor is applied to either.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.integrated_two_mask_noise {P J : ℕ} [Fact (Nat.Prime P)] (s t : Fin J) (Ls Lt : ℕ) (D : ZMod P) (sourceSuffix suffix : List (ZMod P)) (k m : ℕ) (η : ℝ) (n K : ℕ → ℕ) (G : Matrix (ZMod P) (ZMod P) ℝ) (Δ : Environment P J → ZMod P → ℕ → ZMod P → Fin 2 → ℝ) (raw : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) {N u : ℝ} (hNu : 0 ≤ N * u) (ε : Fin 2 → ℝ) (hε : ∀ (ν : Fin 2), 0 ≤ ε ν) (hbudget : ∀ (ν : Fin 2), ∀ i < m, Cslib.vertexNormPow 4 N u (retainedMask s Ls D sourceSuffix) (actualNoiseMax s t Ls (side P k) Lt D sourceSuffix suffix k G Δ raw ν i) ≤ (ε ν * (1 / 64) ^ Cslib.RowCompression.dyadicSlack m i) ^ 4) :
have tail := fun (ν : Fin 2) (σ : Environment P J) (x : ZMod P) => Cslib.RowCompression.firstOverflowNoiseTail {y : ZMod P | retainedMask t (side P k) D suffix σ y} n K (Cslib.RowCompression.dyadicFloor η m) (Δ σ x) { defaultValue := 0, row := raw σ x } m (fun (i : ℕ) => 28 ^ (m - i)) fun (i : ℕ) => actualNoiseMax s t Ls (side P k) Lt D sourceSuffix suffix k G Δ raw ν i σ x; (Cslib.vertexNormPow 4 N u (retainedMask s Ls D sourceSuffix) fun (σ : Environment P J) (x : ZMod P) => tail 0 σ x + tail 1 σ x) ≤ ((ε 0 + ε 1) * (7 / 9)) ^ 4

Actual two-scope noise tails, using absolute prefix budgets in one environment. The relative first normalization is already included in actualNoiseMax.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.integrated_two_mask_clipped_means_capacity {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (s t : Fin J) (hst : t ≠ s) (Ls Lt : ℕ) (D : ZMod P) (hD : D ≠ 0) (sourceSuffix suffix : List (ZMod P)) (H : Horizon P) {k : ℕ} (hk : k ≤ H.maxExponent) (hLt : Lt ≤ P) (G : Matrix (ZMod P) (ZMod P) ℝ) (hG : ∀ (x y : ZMod P), 0 ≤ G x y) (ζ : ℝ) {η M N u : ℝ} (hη : 0 < η) (hNu : 0 ≤ N * u) (hmass : ∀ (x : ZMod P), ∑ y : ZMod P, G x y ≤ M) (m : ℕ) (n K : ℕ → ℕ) (hn : ∀ j < m, 2 ^ (64 * Cslib.RowCompression.dyadicSlack m j) ≤ n j) (Δ : Environment P J → ZMod P → ℕ → ZMod P → Fin 2 → ℝ) (raw : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (ε : Fin 2 → ℝ) (hε : ∀ (ν : Fin 2), 0 ≤ ε ν) (B : Fin 2 → Matrix (ZMod P) (ZMod P) ℝ) (hB : ∀ (ν : Fin 2) (x y : ZMod P), 0 ≤ B ν x y) (hμ : ∀ (ν : Fin 2), ∀ i < m, ∀ (x y : ZMod P), |actualClippedMean HP s t Ls (side P k) Lt D sourceSuffix suffix k G ζ Δ raw ν i x y| ≤ B ν x y * 2 ^ Cslib.RowCompression.dyadicSlack m i) (hbudget : ∀ (ν : Fin 2), (Cslib.rowNormPow 4 N u (retainedMask s Ls D sourceSuffix) (retainedMask t (if ν = 0 then side P k else Lt) D suffix) fun (x : Environment P J) (x_1 y : ZMod P) => B ν x_1 y) ≤ ε ν ^ 4) :
have tail := fun (ν : Fin 2) (σ : Environment P J) (x : ZMod P) => ∑ j ∈ Finset.range m, if meanFirstEvent t D suffix k m j η G n K Δ raw σ x then meanRowTail t (if ν = 0 then side P k else Lt) D suffix m j (actualClippedMean HP s t Ls (side P k) Lt D sourceSuffix suffix k G ζ Δ raw ν) σ x else 0; (Cslib.vertexNormPow 4 N u (retainedMask s Ls D sourceSuffix) fun (σ : Environment P J) (x : ZMod P) => tail 0 σ x + tail 1 σ x) ≤ ((2 + 256 * M / η) * (ε 0 + ε 1) / 63) ^ 4

Integrated heavy-event mean tail on BOTH scopes. Rarity is separately derived on the rank-conditioned and usage-conditioned H4 slices, using the same actual compression masks.

theorem Matrix.HierarchyParams.H4RankEnvironment.NormalizedMoments.integrated_two_mask_envelope_capacity {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (s t : Fin J) (hst : t ≠ s) (Ls Lt : ℕ) (D : ZMod P) (hD : D ≠ 0) (sourceSuffix suffix : List (ZMod P)) (H : Horizon P) {k : ℕ} (hk : k ≤ H.maxExponent) (hLt : Lt ≤ P) (G : Matrix (ZMod P) (ZMod P) ℝ) (hG : ∀ (x y : ZMod P), 0 ≤ G x y) (ζ : ℝ) {η M N u : ℝ} (hη : 0 < η) (hNu : 0 ≤ N * u) (hmass : ∀ (x : ZMod P), ∑ y : ZMod P, G x y ≤ M) (m : ℕ) (n K : ℕ → ℕ) (hn : ∀ j < m, 2 ^ (64 * Cslib.RowCompression.dyadicSlack m j) ≤ n j) (Δ : Environment P J → ZMod P → ℕ → ZMod P → Fin 2 → ℝ) (raw : Environment P J → ZMod P → ZMod P → Fin 2 → ℝ) (εμ εz : Fin 2 → ℝ) (hεμ : ∀ (ν : Fin 2), 0 ≤ εμ ν) (hεz : ∀ (ν : Fin 2), 0 ≤ εz ν) (B : Fin 2 → Matrix (ZMod P) (ZMod P) ℝ) (hB : ∀ (ν : Fin 2) (x y : ZMod P), 0 ≤ B ν x y) (hμ : ∀ (ν : Fin 2), ∀ i < m, ∀ (x y : ZMod P), |actualClippedMean HP s t Ls (side P k) Lt D sourceSuffix suffix k G ζ Δ raw ν i x y| ≤ B ν x y * 2 ^ Cslib.RowCompression.dyadicSlack m i) (hbudget : ∀ (ν : Fin 2), (Cslib.rowNormPow 4 N u (retainedMask s Ls D sourceSuffix) (retainedMask t (if ν = 0 then side P k else Lt) D suffix) fun (x : Environment P J) (x_1 y : ZMod P) => B ν x_1 y) ≤ εμ ν ^ 4) (hzbudget : ∀ (ν : Fin 2), ∀ i < m, Cslib.vertexNormPow 4 N u (retainedMask s Ls D sourceSuffix) (actualNoiseMax s t Ls (side P k) Lt D sourceSuffix suffix k G Δ raw ν i) ≤ (εz ν * (1 / 64) ^ Cslib.RowCompression.dyadicSlack m i) ^ 4) :
have mt := fun (ν : Fin 2) (σ : Environment P J) (x : ZMod P) => ∑ j ∈ Finset.range m, if meanFirstEvent t D suffix k m j η G n K Δ raw σ x then meanRowTail t (if ν = 0 then side P k else Lt) D suffix m j (actualClippedMean HP s t Ls (side P k) Lt D sourceSuffix suffix k G ζ Δ raw ν) σ x else 0; have zt := fun (ν : Fin 2) (σ : Environment P J) (x : ZMod P) => Cslib.RowCompression.firstOverflowNoiseTail {y : ZMod P | retainedMask t (side P k) D suffix σ y} n K (Cslib.RowCompression.dyadicFloor η m) (Δ σ x) { defaultValue := 0, row := raw σ x } m (fun (i : ℕ) => 28 ^ (m - i)) fun (i : ℕ) => actualNoiseMax s t Ls (side P k) Lt D sourceSuffix suffix k G Δ raw ν i σ x; (Cslib.vertexNormPow 4 N u (retainedMask s Ls D sourceSuffix) fun (σ : Environment P J) (x : ZMod P) => mt 0 σ x + mt 1 σ x + (zt 0 σ x + zt 1 σ x)) ≤ ((2 + 256 * M / η) * (εμ 0 + εμ 1) / 63 + (εz 0 + εz 1) * (7 / 9)) ^ 4

Combined scope-correct envelope: clipped deterministic means get rarity, correlated noise does not. Constants are independent of row width, horizon and vertex normalization.