Documentation

CslibFrontier.Computability.LogSpaceDerandomization.HierarchySourceSampling

Correction sampling with a separate source rate #

The true source channel uses the terminal stage rate. The actual inherited source can be narrower, and the usage channel can have any grid rate. Both genuine raw input and final pilot use the true stage channels; preparation and normalization use the actual conditioning source. Every spectator coordinate is retained in the single environment split.

This is an original specialization of the existing correction sampling laws, by Christian Reitwiessner, retaining Samuel Schlesinger's hierarchy construction. It does not establish arbitrary coarser-source rates, recursive estimator induction or native derandomization.

def Matrix.HierarchyParams.H4RankEnvironment.stageSource {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) :

True source at the stage rate, with the inherited role and copy suffix unchanged.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.stageRaw {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 correction input formed with the true stage source, independently of sampling.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.stageMaximum {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 → ℝ

Genuine final pilot formed with the true stage channels.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.sourcePreparation {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 uses the actual sampling source for its incoming gate.

theorem Matrix.HierarchyParams.H4RankEnvironment.stage_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) (ht : r.terminal.rate = rate k) :
Cslib.Probability.RetentionChannels (stageSource 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) (stageSource D ident r hr) (rate k) ((↑(side P k) / ↑P) ^ 4) 1 16 32 8

True stage channel laws are independent of the actual sampling-source rate.

theorem Matrix.HierarchyParams.H4RankEnvironment.source_pair_count {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) {s : ℕ} (hsH : s ≤ H.maxExponent) (hs : r.source.rate = rate s) (x w : V) (hw : w ≠ x) :
↑{a : Spectators P J r.terminal.role | splitSource D ident r hr a x ∧ splitSource D ident r hr a w}.card ≤ 32 * rate s * ↑{a : Spectators P J r.terminal.role | splitSource D ident r hr a x}.card

Actual source frame counts at its own rate. No true source is replaced here.

theorem Matrix.HierarchyParams.H4RankEnvironment.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) {s : ℕ} (hsH : s ≤ H.maxExponent) (hs : r.source.rate = rate s) (x : V) :
{a : Spectators P J r.terminal.role | splitSource D ident r hr a x}.Nonempty

Positive actual source density, without identifying it with the true stage rate.

theorem Matrix.HierarchyParams.H4RankEnvironment.stage_atomCutoff_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 : ℕ} (hf : 0 < r.terminal.rate) (hC : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) (hCf : ∀ (x y : V), C x y ≤ r.terminal.rate) (hi : i ≤ HP.k) (x y : V) :
HP.atomCutoff (stageRaw HP D ident r hr C i x y / r.terminal.rate) = HP.Q (stageRaw HP D ident r hr C i x y / r.terminal.rate)

The bounded computational cutoff preserves the genuine stage input. This entry bound uses the true recurrence, independently of the actual sampling-source rate.

theorem Matrix.HierarchyParams.H4RankEnvironment.stage_atomCutoff_ne_zero_iff {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 : ℕ} (hf : 0 < r.terminal.rate) (hC : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) (hCf : ∀ (x y : V), C x y ≤ r.terminal.rate) (hi : i ≤ HP.k) (x y : V) :
HP.atomCutoff (stageRaw HP D ident r hr C i x y / r.terminal.rate) ≠ 0 ↔ HP.Q (stageRaw HP D ident r hr C i x y / r.terminal.rate) ≠ 0

In particular, clipping preserves genuine nonvanishing, rather than defining a new target.

theorem Matrix.HierarchyParams.H4RankEnvironment.source_normalizer {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 : ℕ) (x y : V) :
CorrectionRowRecipe.normalizer (splitSource D ident r hr) (splitUsage D ident r) (fun (p : Spectators P J r.terminal.role × Cslib.Probability.FrameChannel P 4 1) => sourcePreparation HP D ident r hr C i ((terminalSplit r.terminal.role).symm p)) x y = Cslib.rowSliceMean (fun (σ : Environment P J) (v : V) => r.source.retains (channels D) σ (ident v)) (fun (σ : Environment P J) (v : V) => r.usage.retains (channels D) σ (ident v)) (sourcePreparation HP D ident r hr C i) x y

The preparatory normalizer is the actual single-environment joint source/usage mean. It has no importance factor and does not average over a second full environment.

theorem Matrix.HierarchyParams.H4RankEnvironment.source_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) => stageRaw HP D ident r hr C i) (sourcePreparation HP D ident r hr C i) (fun (x : Environment P J) => stageMaximum 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) (stageRaw 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) (stageRaw HP D ident r hr C i)) (stageMaximum HP D ident r hr C) ((terminalSplit r.terminal.role) σ) x y

Pointwise actual request identity with true stage children and actual conditioning. The preparatory denominator is its joint actual source/usage mean.

theorem Matrix.HierarchyParams.H4RankEnvironment.source_incoming_cost_le {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 s : ℕ} (hk : k ≤ H.maxExponent) (hs : r.source.rate = rate s) (ht : r.terminal.rate = rate k) {C : Matrix V V ℝ} (hC : ∀ (x y : V), 0 ≤ C x y) (hC1 : C.mulVec 1 ≤ 1) {i : ℕ} (hi : i < HP.k) {y : V} (hg : HP.γ (stageMaximum HP D ident r hr C y) ≠ 0) :
32 * r.source.rate * ↑{w : V | HP.δ₁ < stageRaw HP D ident r hr C i w y / r.terminal.rate}.card ≤ 32 * HP.R * (r.source.rate / r.terminal.rate)

Honest incoming cost at an arbitrary sampling-source rate: relative to the true stage budget it grows by fs/ft. A coarser source therefore needs additional rank margin before this generic argument can establish its mean with the fixed selected incoming rank.

theorem Matrix.HierarchyParams.H4RankEnvironment.source_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 s u : ℕ} (hsH : s ≤ H.maxExponent) (hks : k ≤ s) (hs : r.source.rate = rate s) (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) => stageRaw HP D ident r hr C i) (sourcePreparation HP D ident r hr C i) (fun (x : Environment P J) => stageMaximum HP D ident r hr C) σ x y) = HP.correctionIter (stageSource D ident r hr) (splitTerminal D ident r) r.terminal.rate C (i + 1) x y

The actual single-Ω mean equals the existing true-stage correction recurrence. A narrower sampling source fits the unchanged incoming budget. Its own exponent is within the frame horizon; usage needs only a positive box side and may have any exponent.