Documentation

CslibFrontier.Computability.LogSpaceDerandomization.HierarchyCorrectionMean

Genuine correction means on one H4 environment #

The exact terminal split transports the source-conditioned uniform measure to all spectator frames times the terminal frame. The target is the existing correction iterate on these transported channels, with the genuine raw, preparation and final pilot children. The true source and terminal rank use one stage grid rate; usage may use another grid rate, including a strictly narrower slice. Nonzero padding, injective identifiers, an admissible rank horizon and nonnegative substochastic C bounded by the stage rate remain explicit premises. genuine_request_mean_usage derives the primitive usage marginal and cross-rate pair law, then transports the joint preparation mean through the same split. It does not assemble the entire recursive hierarchy or allow a sampling source rate different from the true stage.

The selected hierarchy construction/proofs are Samuel Schlesinger's; the split transport and concrete request specialization are Christian Reitwiessner's original work.

@[reducible, inline]

All spectator frames, including every role other than the terminal.

The actual Ω is equivalent to Γ×Ζ, not Ω×Ω.

theorem Matrix.HierarchyParams.H4RankEnvironment.coordinate_channels {V A B R : Type} [Fintype A] [Nonempty A] [Fintype B] [Fintype R] [DecidableEq R] (j : R) (X : A → V → Prop) (Y : B → V → Prop) [(a : A) → (v : V) → Decidable (X a v)] [(b : B) → (v : V) → Decidable (Y b v)] {f π : ℝ} (hXY : Cslib.Probability.RetentionChannels X Y f π 1 16 32 8) (hYX : Cslib.Probability.RetentionChannels Y X f π 1 16 32 8) :
Cslib.Probability.RetentionChannels (fun (σ : R → A) (v : V) => X (σ j) v) Y f π 1 16 32 8 ∧ Cslib.Probability.RetentionChannels Y (fun (σ : R → A) (v : V) => X (σ j) v) f π 1 16 32 8

Lift one seed marginal through an arbitrary finite coordinate. This preserves the entire event distribution, including detector tails and pair events.

def Matrix.HierarchyParams.H4RankEnvironment.splitSource {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (rest : Spectators P J r.terminal.role) (v : V) :

Inherited source coordinate on Γ, with its actual copy suffix.

def Matrix.HierarchyParams.H4RankEnvironment.splitTerminal {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (A : Cslib.Probability.FrameChannel P 4 1) (v : V) :

Terminal coordinate on Ζ, with its actual copy suffix.

def Matrix.HierarchyParams.H4RankEnvironment.splitUsage {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (A : Cslib.Probability.FrameChannel P 4 1) (v : V) :

Usage coordinate on the same terminal frame, at its own rate.

theorem Matrix.HierarchyParams.H4RankEnvironment.source_expect_split {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (F : Environment P J → ℝ) (x : V) :
({σ : Environment P J | r.source.retains (channels D) σ (ident x)}.expect fun (σ : Environment P J) => F σ) = ({rest : Spectators P J r.terminal.role | splitSource D ident r hr rest x} ×ˢ Finset.univ).expect fun (p : Spectators P J r.terminal.role × Cslib.Probability.FrameChannel P 4 1) => F ((terminalSplit r.terminal.role).symm p)

Exact pushforward of source-conditioned uniform Ω to conditioned Γ times all Ζ. No target or true-mean premise occurs in this finite-measure identity.

theorem Matrix.HierarchyParams.H4RankEnvironment.split_channels {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (hD : D ≠ 0) (hid : Function.Injective ident) (H : Horizon P) {k : ℕ} (hk : k ≤ H.maxExponent) (hs : r.source.rate = rate k) (ht : r.terminal.rate = rate k) :
Cslib.Probability.RetentionChannels (splitSource D ident r hr) (splitTerminal D ident r) (rate k) ((↑(side P k) / ↑P) ^ 4) 1 16 32 8 ∧ Cslib.Probability.RetentionChannels (splitTerminal D ident r) (splitSource D ident r hr) (rate k) ((↑(side P k) / ↑P) ^ 4) 1 16 32 8

Projected-coordinate frame laws for Γ and Ζ at one common grid rate. Both padded identifier maps are checked separately.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.genuineRaw {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (C : Matrix V V ℝ) (i : ℕ) :

Genuine earlier raw child C+E_i C in matrix units, using the actual split channels.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.genuinePrep {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (C : Matrix V V ℝ) (i : ℕ) (σ : Environment P J) :

Genuine preparation child pulled back from Γ×Ζ to the single Ω.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.genuineMaximum {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (C : Matrix V V ℝ) :
V → ℝ

The final genuine pilot maximum, not an arbitrary multiplier callback.

theorem Matrix.HierarchyParams.H4RankEnvironment.correctionRequest_eq_split {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (raw : Matrix V V ℝ) (prep : Spectators P J r.terminal.role × Cslib.Probability.FrameChannel P 4 1 → Matrix V V ℝ) (maximum : V → ℝ) (σ : Environment P J) (x y : V) :
correctionRequest D ident r (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff HP.ρ HP.atomCutoff HP.γ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ (fun (x : Environment P J) => raw) (fun (σ : Environment P J) => prep ((terminalSplit r.terminal.role) σ)) (fun (x : Environment P J) => maximum) σ x y = CorrectionRowRecipe.normalized (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff HP.ρ HP.atomCutoff HP.γ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ r.terminal.rate (splitSource D ident r hr) (splitTerminal D ident r) (splitUsage D ident r) raw prep maximum ((terminalSplit r.terminal.role) σ) x y

Transport arbitrary fixed raw and pilot children and a preparatory function through all spectator coordinates. Its denominator is the joint source/usage mean on this split.

theorem Matrix.HierarchyParams.H4RankEnvironment.genuine_request_eq {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (C : Matrix V V ℝ) (i : ℕ) (σ : Environment P J) (x y : V) :
correctionRequest D ident r (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff HP.ρ HP.atomCutoff HP.γ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ (fun (x : Environment P J) => genuineRaw HP D ident r hr C i) (genuinePrep HP D ident r hr C i) (fun (x : Environment P J) => genuineMaximum HP D ident r hr C) σ x y = CorrectionRowRecipe.normalized (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff HP.ρ HP.atomCutoff HP.γ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ r.terminal.rate (splitSource D ident r hr) (splitTerminal D ident r) (splitUsage D ident r) (genuineRaw HP D ident r hr C i) (CorrectionRowRecipe.preparation (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff (Cslib.polynomialPrepCutoff4 HP.θ) HP.ρ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ r.terminal.rate (splitSource D ident r hr) (splitTerminal D ident r) (genuineRaw HP D ident r hr C i)) (genuineMaximum HP D ident r hr C) ((terminalSplit r.terminal.role) σ) x y

Pointwise actual-request identification, including the exact split, padding and usage. Source and usage rates are independent of the terminal rank rate.

theorem Matrix.HierarchyParams.H4RankEnvironment.genuine_request_mean {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (hD : D ≠ 0) (hid : Function.Injective ident) (H : Horizon P) {k : ℕ} (hk : k ≤ H.maxExponent) (hs : r.source.rate = rate k) (ht : r.terminal.rate = rate k) (hu : r.usage.rate = r.terminal.rate) (C : Matrix V V ℝ) (hC : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) (hCf : ∀ (x y : V), C x y ≤ r.terminal.rate) {i : ℕ} (hi : i < HP.k) {x : V} (hx : {rest : Spectators P J r.terminal.role | splitSource D ident r hr rest x}.Nonempty) (y : V) :
({σ : Environment P J | r.source.retains (channels D) σ (ident x)}.expect fun (σ : Environment P J) => r.terminal.rate / (↑(side P k) / ↑P) ^ 4 * correctionRequest D ident r (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff HP.ρ HP.atomCutoff HP.γ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ (fun (x : Environment P J) => genuineRaw HP D ident r hr C i) (genuinePrep HP D ident r hr C i) (fun (x : Environment P J) => genuineMaximum HP D ident r hr C) σ x y) = HP.correctionIter (splitSource D ident r hr) (splitTerminal D ident r) r.terminal.rate C (i + 1) x y

Same-rate genuine actual correction requests have the true correction-iterate mean on ONE environment. The incoming count and normalizer laws come from the frame channel constructor. No target mean is assumed. For a separate usage rate, use genuine_request_mean_usage.

theorem Matrix.HierarchyParams.H4RankEnvironment.split_source_nonempty {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (hD : D ≠ 0) (hid : Function.Injective ident) (H : Horizon P) {k : ℕ} (hk : k ≤ H.maxExponent) (hs : r.source.rate = rate k) (ht : r.terminal.rate = rate k) (x : V) :
{rest : Spectators P J r.terminal.role | splitSource D ident r hr rest x}.Nonempty

Positivity of the frame marginal supplies an inhabited actual source slice.

theorem Matrix.HierarchyParams.H4RankEnvironment.genuine_request_mean_density {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (hD : D ≠ 0) (hid : Function.Injective ident) (H : Horizon P) {k : ℕ} (hk : k ≤ H.maxExponent) (hs : r.source.rate = rate k) (ht : r.terminal.rate = rate k) (hu : r.usage.rate = r.terminal.rate) (C : Matrix V V ℝ) (hC : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) (hCf : ∀ (x y : V), C x y ≤ r.terminal.rate) {i : ℕ} (hi : i < HP.k) (x y : V) :
({σ : Environment P J | r.source.retains (channels D) σ (ident x)}.expect fun (σ : Environment P J) => r.terminal.rate / ↑{σ : Environment P J | r.usage.retains (channels D) σ (ident y)}.dens * correctionRequest D ident r (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff HP.ρ HP.atomCutoff HP.γ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ (fun (x : Environment P J) => genuineRaw HP D ident r hr C i) (genuinePrep HP D ident r hr C i) (fun (x : Environment P J) => genuineMaximum HP D ident r hr C) σ x y) = HP.correctionIter (splitSource D ident r hr) (splitTerminal D ident r) r.terminal.rate C (i + 1) x y

The scale uses the measured usage density on the actual single Ω, and source inhabitedness is derived. The mean target is the genuine actual correction recurrence.

theorem Matrix.HierarchyParams.H4RankEnvironment.split_usage_density {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) {u : ℕ} (hu : r.usage.rate = rate u) (y : V) :
↑{A : Cslib.Probability.FrameChannel P 4 1 | splitUsage D ident r A y}.dens = (↑(side P u) / ↑P) ^ 4

Actual marginal of the usage coordinate, without identifying its rate with the rank.

theorem Matrix.HierarchyParams.H4RankEnvironment.split_usage_pair {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (hD : D ≠ 0) (hid : Function.Injective ident) (H : Horizon P) {k u : ℕ} (hk : k ≤ H.maxExponent) (ht : r.terminal.rate = rate k) (hu : r.usage.rate = rate u) (y w : V) (hwy : w ≠ y) :
↑{A : Cslib.Probability.FrameChannel P 4 1 | splitUsage D ident r A y ∧ splitTerminal D ident r A w}.card ≤ 32 * r.terminal.rate * ↑{A : Cslib.Probability.FrameChannel P 4 1 | splitUsage D ident r A y}.card

The frame cross-rate pair count survives the exact terminal split. Usage can have any grid rate; only the rank exponent needs finite-horizon admissibility.

theorem Matrix.HierarchyParams.H4RankEnvironment.genuine_request_mean_usage {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) {n : ℕ} (r : HierarchyTask.Request n (Fin J) (ZMod P)) (hr : Admissible r) (hD : D ≠ 0) (hid : Function.Injective ident) (H : Horizon P) {k u : ℕ} (hk : k ≤ H.maxExponent) (hs : r.source.rate = rate k) (ht : r.terminal.rate = rate k) (hu : r.usage.rate = rate u) (C : Matrix V V ℝ) (hC : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) (hCf : ∀ (x y : V), C x y ≤ r.terminal.rate) {i : ℕ} (hi : i < HP.k) (x y : V) :
({σ : Environment P J | r.source.retains (channels D) σ (ident x)}.expect fun (σ : Environment P J) => r.terminal.rate / ↑{σ : Environment P J | r.usage.retains (channels D) σ (ident y)}.dens * correctionRequest D ident r (Cslib.polynomialAuxCutoff4 HP.θ) HP.incomingCutoff HP.ρ HP.atomCutoff HP.γ HP.K ⌈4 * (1 + 32 * HP.R)⌉₊ (fun (x : Environment P J) => genuineRaw HP D ident r hr C i) (genuinePrep HP D ident r hr C i) (fun (x : Environment P J) => genuineMaximum HP D ident r hr C) σ x y) = HP.correctionIter (splitSource D ident r hr) (splitTerminal D ident r) r.terminal.rate C (i + 1) x y

Genuine single-Ω correction mean with a separate usage grid rate. The true stage source/rank remain fixed at k; the usage slice can be strictly narrower. Primitive frame marginals and cross-rate counts replace only the usage laws of the existing sampler. The preparation is averaged jointly over the actual source and usage slices.