Documentation

CslibFrontier.Computability.LogSpaceDerandomization.InitialPilotDetector

Initial detectors consuming allocated source-dependent scores #

The child environment is reconstructed from the actual terminal split. Its source frame and all spectators remain arguments of the score inside the detector's literal means. They are integration variables, not independent seeds for successive calls. The true reference uses the original score and detector recipes on the same stage channels. This original finite single-bin construction does not close later pilot iterations, bin sums, recursive growth or workspace bounds.

Main definitions #

Main results #

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

Evaluate a score on precisely the environment described by the integration variables. The source rank resets to the terminal rate; roles and copy suffixes are preserved.

theorem Matrix.HierarchyParams.H4RankEnvironment.environmentDetector_row_moment {P J : ℕ} [Fact (Nat.Prime P)] {V : Type} [Fintype V] {k : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (ident : V → ZMod P) (r : HierarchyTask.Request k (Fin J) (ZMod P)) (hr : Admissible r) {N u π : ℝ} (hN : 0 < N) (hu : 0 < u) (hf : 0 < r.terminal.rate) (hπ : 0 < π) (hY : ∀ (y : V), π ≤ ↑{t : Cslib.Probability.FrameChannel P 4 1 | splitTerminal D ident r t y}.dens) (A B : Environment P J → Matrix V V ℝ) :
(Cslib.rowNormPow 4 N u (fun (σ : Environment P J) (x : V) => r.source.retains (channels D) σ (ident x)) (fun (σ : Environment P J) (y : V) => r.terminal.retains (channels D) σ (ident y)) fun (x : Environment P J) (x_1 y : V) => environmentDetector HP D ident r hr A y - environmentDetector HP D ident r hr B y) ≤ ↑(Fintype.card V) * r.terminal.rate / (u * π) * Cslib.rowNormPow 4 N r.terminal.rate (fun (σ : Environment P J) (x : V) => (have __src := r.source; { role := __src.role, rate := r.terminal.rate, suffix := __src.suffix }).retains (channels D) σ (ident x)) (fun (σ : Environment P J) (y : V) => r.terminal.retains (channels D) σ (ident y)) fun (σ : Environment P J) (x y : V) => A σ x y - B σ x y

Full-coordinate finite Fubini transports the literal detector payment. No full-environment atom is extracted, and no child coordinate is discarded.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.initialDetectorRequest {P J : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (R : RoleProfile J) (ks kt : ℕ) (ss st : List (ZMod P)) :

The actual stage-zero detector request, retaining parent source and terminal metadata.

Distinct actual stage roles give an admissible detector request.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.initialDetectorScoreRequest {P J : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (R : RoleProfile J) (ks kt : ℕ) (ss st : List (ZMod P)) :

The actual score request resets the entire source rate before completing RAW. The original role, suffix, terminal and usage tuple are retained.

theorem Matrix.HierarchyParams.H4RankEnvironment.initialDetectorScoreRequest_eq {P J : ℕ} (HP : FourthRootHierarchyParams 16 1 16 32 8) (R : RoleProfile J) (ks kt : ℕ) (ss st : List (ZMod P)) :
initialDetectorScoreRequest HP R ks kt ss st = { task := HierarchyTask.row 0 (BoundedRowTask.score ⟨0, ⋯⟩), source := gridChannel R.source kt ss, terminal := gridChannel R.terminal kt st, usage := gridChannel R.terminal kt st }

Resetting the score source preserves the actual stage roles and inherited suffixes.

theorem Matrix.HierarchyParams.H4RankEnvironment.initialDetector_terminal_density {P : ℕ} [Fact (Nat.Prime P)] (D : ZMod P) (kt : ℕ) (st : List (ZMod P)) :
0 < (↑(side P kt) / ↑P) ^ 4 ∧ ∀ (y : ZMod P), ↑{t : Cslib.Probability.FrameChannel P 4 1 | Cslib.Probability.frameRetains P 4 (side P kt) t (CopyPadding.identifier D st y)}.dens = (↑(side P kt) / ↑P) ^ 4

The true terminal density is derived from the actual padded frame channel. No environment-atom lower bound is introduced.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.initialPilotDetector {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (R : RoleProfile J) (bin ks kt kb : ℕ) (ss st : List (ZMod P)) (cutoff h : ℝ → ℝ) (C : Matrix (ZMod P) (ZMod P) ℝ) (steps : ℕ) :
ZMod P → ℝ

The initial detector consumes the completed score on the very same integrated frame. The score's source rate is reset to the stage rate before the lower call.

The score child is genuinely earlier than its detector in the hierarchy task order.

noncomputable def Matrix.HierarchyParams.H4RankEnvironment.initialTrueDetector {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (R : RoleProfile J) (ks kt : ℕ) (ss st : List (ZMod P)) (C : Matrix (ZMod P) (ZMod P) ℝ) (y : ZMod P) :

True initial detector of the base, using the original unmodified score recipe. The source reset and suffixes are the same as those used by the approximate call.

theorem Matrix.HierarchyParams.H4RankEnvironment.initialTrueDetector_eq_canonical {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (hD : D ≠ 0) (R : RoleProfile J) (ks kt : ℕ) (ss st : List (ZMod P)) (C : Matrix (ZMod P) (ZMod P) ℝ) :
initialTrueDetector HP D R ks kt ss st C = columnDetector (canonicalChannel id (rate kt)) (canonicalChannel id (rate kt)) HP.ϕ HP.ρ HP.J HP.K (rate kt) C

The reference is the canonical true initial column detector, with the original algorithm's cutoffs and rank. No source invariance of the approximate score is used.

theorem Matrix.HierarchyParams.H4RankEnvironment.environmentDetector_true {P J : ℕ} [Fact (Nat.Prime P)] (HP : FourthRootHierarchyParams 16 1 16 32 8) (D : ZMod P) (R : RoleProfile J) (ks kt : ℕ) (ss st : List (ZMod P)) (C : Matrix (ZMod P) (ZMod P) ℝ) :
(environmentDetector HP D id (initialDetectorRequest HP R ks kt ss st) ⋯ fun (σ : Environment P J) => PilotRowRecipe.score HP.toHierarchyParams (Y R.terminal (side P kt) (CopyPadding.identifier D st)) (rate kt) C σ) = initialTrueDetector HP D R ks kt ss st C

A true score ignores the source spectators. The direct environment evaluation therefore recovers the original detector exactly, without an invariance assumption on the approximate score.

theorem Matrix.HierarchyParams.H4RankEnvironment.initialPilotDetector_allocated (HP : FourthRootHierarchyParams 16 1 16 32 8) :
∃ (L : ℝ), 0 ≤ L ∧ ∀ (P J : ℕ) [inst : Fact (Nat.Prime P)] (D : ZMod P), D ≠ 0 → ∀ (R : RoleProfile J) (H : Horizon P) (bin ks kt : ℕ), kt ≤ H.maxExponent → ∀ (ss st : List (ZMod P)) (cutoff h : ℝ → ℝ) (C : Matrix (ZMod P) (ZMod P) ℝ), (∀ (v : ℝ), cutoff v ≠ 0 → h v = 1) → ∀ (η : ℝ), 0 < η → (∀ v ≤ η, HP.ρ v = 1) → 2 * (1 + 32 / η) ≤ ↑HP.K → (∀ (x y : ZMod P), 0 ≤ C x y) → C.mulVec 1 ≤ 1 → (∀ (x y : ZMod P), rate kt * cutoff (C x y / rate kt) = C x y) → ∀ (π : ℝ), 0 < π → (∀ (y : ZMod P), π ≤ ↑{t : Cslib.Probability.FrameChannel P 4 1 | Cslib.Probability.frameRetains P 4 (side P kt) t (CopyPadding.identifier D st y)}.dens) → ∀ (ε : ℝ), 0 < ε → have steps := initialPilotSteps HP L D R bin kt kt kt ss st cutoff h C ε; 0 < steps ∧ (Cslib.rowNormPow 4 (↑P) (rate ks) (X R.source (side P ks) (CopyPadding.identifier D ss)) (Y R.terminal (side P kt) (CopyPadding.identifier D st)) fun (x : Environment P J) (x_1 y : ZMod P) => initialPilotDetector HP D R bin ks kt kt ss st cutoff h C steps y - initialTrueDetector HP D R ks kt ss st C y) ≤ ↑P * rate kt / (rate ks * π) * ε ^ 4

The dense input budget is allocated before either completed child is called. Accuracy of the actual detector follows from RAW contraction and score stability, not from a score/detector error premise. The visible payment is width times the stage/parent source-rate ratio divided by actual terminal density. One covering bin and equal bin/stage terminal rates are the explicit mathematical boundary.

theorem Matrix.HierarchyParams.H4RankEnvironment.initialPilotDetector_accuracy (HP : FourthRootHierarchyParams 16 1 16 32 8) :
∃ (L : ℝ), 0 ≤ L ∧ ∀ (P J : ℕ) [inst : Fact (Nat.Prime P)] (D : ZMod P), D ≠ 0 → ∀ (R : RoleProfile J) (H : Horizon P) (bin ks kt : ℕ), kt ≤ H.maxExponent → ∀ (ss st : List (ZMod P)) (cutoff h : ℝ → ℝ) (C : Matrix (ZMod P) (ZMod P) ℝ), (∀ (v : ℝ), cutoff v ≠ 0 → h v = 1) → ∀ (η : ℝ), 0 < η → (∀ v ≤ η, HP.ρ v = 1) → 2 * (1 + 32 / η) ≤ ↑HP.K → (∀ (x y : ZMod P), 0 ≤ C x y) → C.mulVec 1 ≤ 1 → (∀ (x y : ZMod P), rate kt * cutoff (C x y / rate kt) = C x y) → ∀ (π : ℝ), 0 < π → (∀ (y : ZMod P), π ≤ ↑{t : Cslib.Probability.FrameChannel P 4 1 | Cslib.Probability.frameRetains P 4 (side P kt) t (CopyPadding.identifier D st y)}.dens) → ∀ (ε : ℝ), 0 < ε → have payment := ↑P * rate kt / (rate ks * π); have tolerance := ε / (1 + payment); have steps := initialPilotSteps HP L D R bin kt kt kt ss st cutoff h C tolerance; 0 < steps ∧ (Cslib.rowNormPow 4 (↑P) (rate ks) (X R.source (side P ks) (CopyPadding.identifier D ss)) (Y R.terminal (side P kt) (CopyPadding.identifier D st)) fun (x : Environment P J) (x_1 y : ZMod P) => initialPilotDetector HP D R bin ks kt kt ss st cutoff h C steps y - initialTrueDetector HP D R ks kt ss st C y) ≤ ε ^ 4

Calibrate the RAW tolerance by the explicit detector payment before making the completed calls. The resulting detector has any requested positive fourth-root accuracy.