Documentation

CslibFrontier.Computability.LogSpaceDerandomization.HierarchyChildError

Absolute errors of actual shared-environment request samples #

Compare estimated requests with the genuine canonical requests on the same environment. The product splits through estimated-left times canonical-right. Its two coefficients are therefore the estimated correction range and the genuine dense range, respectively. Importance and midpoint density factors remain literal, including for empty events. Finite assembly sums positive errors and charges the special negative correction once. These original finite absolute comparisons do not establish recursive relative budgets, copy-stage routing, reserves, workspace bounds or RL=L.

noncomputable def Matrix.HierarchyParams.HierarchyTask.positiveChildError {k : ℕ} {Role : Type u_1} {Symbol : Type u_2} {V : Type u_3} {Ω : Type u_4} [Fintype V] [Fintype Ω] (channels : Role → ℝ → List Symbol → Ω → V → Prop) [(role : Role) → (rate : ℝ) → (suffix : List Symbol) → (σ : Ω) → (v : V) → Decidable (channels role rate suffix σ v)] (l bin : ℕ) (t : RawTask k) (source midpoint endpoint : CorrectionRowTask.Channel Role (List Symbol)) (b CA CB : ℝ) (estimated canonical : Request k Role Symbol → Matrix V V ℝ) (x y : V) :

Absolute positive-bin payment from the actual direct, right and left request errors. CA bounds estimated left; CB bounds canonical right. Only the union of the two actual left supports is charged. This avoids requesting right-child errors off their reset source domain when both left factors vanish. No child independence is required.

noncomputable def Matrix.HierarchyParams.HierarchyTask.negativeChildError {k : ℕ} {Role : Type u_1} {Symbol : Type u_2} {V : Type u_3} {Ω : Type u_4} [Fintype Ω] (channels : Role → ℝ → List Symbol → Ω → V → Prop) [(role : Role) → (rate : ℝ) → (suffix : List Symbol) → (σ : Ω) → (v : V) → Decidable (channels role rate suffix σ v)] (l bin : ℕ) (t : RawTask k) (source midpoint endpoint : CorrectionRowTask.Channel Role (List Symbol)) (b : ℝ) (estimated canonical : Request k Role Symbol → Matrix V V ℝ) (x y : V) :

The special negative error is zero for tasks without a negative request.

theorem Matrix.HierarchyParams.HierarchyTask.rawPositiveSample_sub_le {k : ℕ} {Role : Type u_1} {Symbol : Type u_2} {V : Type u_3} {Ω : Type u_4} [Fintype V] [Fintype Ω] (channels : Role → ℝ → List Symbol → Ω → V → Prop) [(role : Role) → (rate : ℝ) → (suffix : List Symbol) → (σ : Ω) → (v : V) → Decidable (channels role rate suffix σ v)] (l bin : ℕ) (t : RawTask k) (source midpoint endpoint : CorrectionRowTask.Channel Role (List Symbol)) (b CA CB : ℝ) (estimated canonical : Request k Role Symbol → Matrix V V ℝ) (x y : V) (hleft : ∀ (z : V), |estimated (rawRequests l bin t source midpoint endpoint b).left x z| ≤ CA) (hright : ∀ (z : V), |canonical (rawRequests l bin t source midpoint endpoint b).right z y| ≤ CB) :
|rawPositiveSample channels l bin t source midpoint endpoint b estimated x y - rawPositiveSample channels l bin t source midpoint endpoint b canonical x y| ≤ positiveChildError channels l bin t source midpoint endpoint b CA CB estimated canonical x y

Exact coupled product perturbation followed by the two range payments.

theorem Matrix.HierarchyParams.HierarchyTask.rawNegativeSample_sub_abs {k : ℕ} {Role : Type u_1} {Symbol : Type u_2} {V : Type u_3} {Ω : Type u_4} [Fintype Ω] (channels : Role → ℝ → List Symbol → Ω → V → Prop) [(role : Role) → (rate : ℝ) → (suffix : List Symbol) → (σ : Ω) → (v : V) → Decidable (channels role rate suffix σ v)] (l bin : ℕ) (t : RawTask k) (source midpoint endpoint : CorrectionRowTask.Channel Role (List Symbol)) (b : ℝ) (estimated canonical : Request k Role Symbol → Matrix V V ℝ) (x y : V) :
|rawNegativeSample channels l bin t source midpoint endpoint b estimated x y - rawNegativeSample channels l bin t source midpoint endpoint b canonical x y| = negativeChildError channels l bin t source midpoint endpoint b estimated canonical x y

Literal special-negative perturbation, including the zero/base case.

theorem Matrix.HierarchyParams.HierarchyTask.rawSample_sub_le {k : ℕ} {Role : Type u_1} {Symbol : Type u_2} {V : Type u_3} {Ω : Type u_4} [Fintype V] [Fintype Ω] (channels : Role → ℝ → List Symbol → Ω → V → Prop) [(role : Role) → (rate : ℝ) → (suffix : List Symbol) → (σ : Ω) → (v : V) → Decidable (channels role rate suffix σ v)] (l bin : ℕ) (t : RawTask k) (source midpoint endpoint : CorrectionRowTask.Channel Role (List Symbol)) (b CA CB : ℝ) (estimated canonical : Request k Role Symbol → Matrix V V ℝ) (x y : V) (hleft : ∀ (z : V), |estimated (rawRequests l bin t source midpoint endpoint b).left x z| ≤ CA) (hright : ∀ (z : V), |canonical (rawRequests l bin t source midpoint endpoint b).right z y| ≤ CB) :
|rawSample channels l bin t source midpoint endpoint b estimated x y - rawSample channels l bin t source midpoint endpoint b canonical x y| ≤ positiveChildError channels l bin t source midpoint endpoint b CA CB estimated canonical x y + negativeChildError channels l bin t source midpoint endpoint b estimated canonical x y

The actual signed call retains all four errors; a bin sum should instead use positive calls and one negative payment.

theorem Matrix.HierarchyParams.HierarchyTask.residual_bins_sub_le {k : ℕ} {Role : Type u_1} {Symbol : Type u_2} {V : Type u_3} {Ω : Type u_4} [Fintype V] [Fintype Ω] (channels : Role → ℝ → List Symbol → Ω → V → Prop) [(role : Role) → (rate : ℝ) → (suffix : List Symbol) → (σ : Ω) → (v : V) → Decidable (channels role rate suffix σ v)] (S : Finset Ω) (bins : Finset ℕ) (l : ℕ) (source midpoint endpoint : CorrectionRowTask.Channel Role (List Symbol)) (b CB : ℕ → ℝ) (CA : ℝ) (estimated canonical : ℕ → Ω → Request k Role Symbol → Matrix V V ℝ) (x y : V) (hleft : ∀ i ∈ bins, ∀ σ ∈ S, ∀ (z : V), |estimated i σ (rawRequests l i RawTask.residual source midpoint endpoint (b i)).left x z| ≤ CA) (hright : ∀ i ∈ bins, ∀ σ ∈ S, ∀ (z : V), |canonical i σ (rawRequests l i RawTask.residual source midpoint endpoint (b i)).right z y| ≤ CB i) :
|(S.expect fun (σ : Ω) => ∑ i ∈ bins, rawPositiveSample channels l i RawTask.residual source midpoint endpoint (b i) (estimated i σ) x y - rawNegativeSample channels l 0 RawTask.residual source midpoint endpoint (b 0) (estimated 0 σ) x y) - S.expect fun (σ : Ω) => ∑ i ∈ bins, rawPositiveSample channels l i RawTask.residual source midpoint endpoint (b i) (canonical i σ) x y - rawNegativeSample channels l 0 RawTask.residual source midpoint endpoint (b 0) (canonical 0 σ) x y| ≤ S.expect fun (σ : Ω) => ∑ i ∈ bins, positiveChildError channels l i RawTask.residual source midpoint endpoint (b i) CA (CB i) (estimated i σ) (canonical i σ) x y + negativeChildError channels l 0 RawTask.residual source midpoint endpoint (b 0) (estimated 0 σ) (canonical 0 σ) x y

Finite positive assembly and one negative error, integrated on any joint event. Empty events are included; no factorization of the environment is used.

theorem Matrix.HierarchyParams.H4RankEnvironment.incomingChildren_final_range {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) (Kc : ℕ) (cutoff : ℝ → ℝ) (raw prep : HierarchyTask.Request HP.k (Fin J) (ZMod P) → Environment P J → Matrix V V ℝ) (maximum : HierarchyTask.Request HP.k (Fin J) (ZMod P) → Environment P J → V → ℝ) (r : HierarchyTask.Request HP.k (Fin J) (ZMod P)) (l : ℕ) (htask : r.task = HierarchyTask.correctionAtomTask l false (Fin.last HP.k)) (σ : Environment P J) (x y : V) :
|incomingChildren HP D ident Kc cutoff raw prep maximum r σ x y| ≤ 2 * HP.Q HP.atomCap

Actual incoming final correction range. Structural size is HP.k at every precision.

theorem Matrix.HierarchyParams.H4RankEnvironment.normalizedRequest_zero_off_usage {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] {q : ℕ} (D : ZMod P) (ident : V → ZMod P) (r : HierarchyTask.Request q (Fin J) (ZMod P)) (cutoff gate : ℝ → ℝ) (K : ℕ) (raw prep : Environment P J → Matrix V V ℝ) (σ : Environment P J) (x y : V) (hy : ¬r.usage.retains (channels D) σ (ident y)) :
normalizedRequest D ident r cutoff gate K raw prep σ x y = 0

A normalized request is zero off its own usage channel. Source membership is not claimed: arbitrary completed inputs may give nonzero values outside the source domain.

theorem Matrix.HierarchyParams.H4RankEnvironment.incomingChildren_zero_off_usage {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] {q : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) (Kc : ℕ) (cutoff : ℝ → ℝ) (raw prep : HierarchyTask.Request q (Fin J) (ZMod P) → Environment P J → Matrix V V ℝ) (maximum : HierarchyTask.Request q (Fin J) (ZMod P) → Environment P J → V → ℝ) (r : HierarchyTask.Request q (Fin J) (ZMod P)) (σ : Environment P J) (x y : V) (hy : ¬r.usage.retains (channels D) σ (ident y)) :
incomingChildren HP D ident Kc cutoff raw prep maximum r σ x y = 0

Every actual incoming child is zero off usage, including the literal correction base.

theorem Matrix.HierarchyParams.H4RankEnvironment.canonicalRequestChild_zero_off_usage {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] {q : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) (C : Matrix V V ℝ) (cutoff h ρ : ℝ → ℝ) (K : ℕ) (r : HierarchyTask.Request q (Fin J) (ZMod P)) (σ : Environment P J) (x y : V) (hy : ¬r.usage.retains (channels D) σ (ident y)) :
canonicalRequestChild HP D ident C cutoff h ρ K r σ x y = 0

The genuine canonical family has the same usage guard. No statement about arbitrary values outside a child's source domain is needed.

theorem Matrix.HierarchyParams.H4RankEnvironment.incomingChildren_mem_Icc {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] {q : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) (Kc : ℕ) (cutoff : ℝ → ℝ) {CB : ℝ} (hCB : 0 ≤ CB) (hcutoff : ∀ (v : ℝ), cutoff v ∈ Set.Icc 0 CB) (raw prep : HierarchyTask.Request q (Fin J) (ZMod P) → Environment P J → Matrix V V ℝ) (maximum : HierarchyTask.Request q (Fin J) (ZMod P) → Environment P J → V → ℝ) (r : HierarchyTask.Request q (Fin J) (ZMod P)) (σ : Environment P J) (x y : V) :
incomingChildren HP D ident Kc cutoff raw prep maximum r σ x y ∈ Set.Icc 0 (max (2 * HP.Q HP.atomCap) (2 * CB))

Range of the actual incoming family, including both normalized dispatches. The uniform cap is the larger of the correction range and the dense range.

theorem Matrix.HierarchyParams.H4RankEnvironment.canonicalRequestChild_mem_Icc {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] {q : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) (C : Matrix V V ℝ) (cutoff h ρ : ℝ → ℝ) (K : ℕ) {CB : ℝ} (hCB : 0 ≤ CB) (hcutoff : ∀ (v : ℝ), cutoff v ∈ Set.Icc 0 CB) (hρ : ∀ (v : ℝ), ρ v ∈ Set.Icc 0 1) (r : HierarchyTask.Request q (Fin J) (ZMod P)) (σ : Environment P J) (x y : V) :
canonicalRequestChild HP D ident C cutoff h ρ K r σ x y ∈ Set.Icc 0 (max (2 * HP.Q HP.atomCap) (2 * CB))

The genuine family inherits the same two normalized ranges. This assumes a bound on the scalar cutoff, never a bound on the raw target divided by its rate.

theorem Matrix.HierarchyParams.H4RankEnvironment.residual_left_support_midpoint {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) (l bin : ℕ) (source midpoint terminal : Channel P J) (b : ℝ) (Kc : ℕ) (bounded cutoff h ρ : ℝ → ℝ) (K : ℕ) (C : Matrix V V ℝ) (raw prep : HierarchyTask.Request HP.k (Fin J) (ZMod P) → Environment P J → Matrix V V ℝ) (maximum : HierarchyTask.Request HP.k (Fin J) (ZMod P) → Environment P J → V → ℝ) (σ : Environment P J) (x z : V) :
have r := (HierarchyTask.rawRequests l bin HierarchyTask.RawTask.residual source midpoint terminal b).left; incomingChildren HP D ident Kc bounded raw prep maximum r σ x z ≠ 0 ∨ canonicalRequestChild HP D ident C cutoff h ρ K r σ x z ≠ 0 → CorrectionRowTask.Channel.retains midpoint (channels D) σ (ident z)

Actual positive-bin left support is contained in the midpoint mask. Consequently the right-child error is called only on its reset source, with the unchanged midpoint suffix.

theorem Matrix.HierarchyParams.H4RankEnvironment.denseChild_congr_cutoff {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (D : ZMod P) (ident : V → ZMod P) {k : ℕ} (r : HierarchyTask.Request k (Fin J) (ZMod P)) (C : Matrix V V ℝ) (a b h ρ : ℝ → ℝ) (K : ℕ) (hab : ∀ (x y : V), a (C x y / r.terminal.rate) = b (C x y / r.terminal.rate)) (σ : Environment P J) :
denseChild D ident r a h ρ K C σ = denseChild D ident r b h ρ K C σ

Changing the dense scalar recipe only at unused inputs leaves its real evaluation unchanged. Raw full-rank gates and the genuine preparation are identical.

theorem Matrix.HierarchyParams.H4RankEnvironment.denseChild_range {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] (D : ZMod P) (ident : V → ZMod P) {k : ℕ} (r : HierarchyTask.Request k (Fin J) (ZMod P)) (C : Matrix V V ℝ) (cutoff h ρ : ℝ → ℝ) (K : ℕ) {B : ℝ} (hB : 0 ≤ B) (hcutoff : ∀ (v : ℝ), cutoff v ∈ Set.Icc 0 B) (hρ : ∀ (v : ℝ), ρ v ∈ Set.Icc 0 1) (σ : Environment P J) (x y : V) :
|denseChild D ident r cutoff h ρ K C σ x y| ≤ 2 * B

The genuine dense child range is inherited from the same normalized evaluator. This remains valid on empty source/usage events.