Documentation

CslibFrontier.Computability.Complexity.Classes.CountingSimulation.EntryAnalysis

Theorem D.1 for entry procedures: the resource analysis #

The instance of the contraction interface for entry procedures (Cslib.Circuits.Frontier.EntryContractionAlgorithm) given by the native machine EntryContraction.fastCore (milestone E1.3 of #1538): for every native certificate ce of an entry procedure, CountingSimulation.entryContractionAlgorithm ce contracts the networks admissible for ce (Cslib.Circuits.Frontier.EntryAdmissible) in time poly(n) 2 ^ O(s / √⌊log₂ s⌋) and polynomial space. This includes Theorem D.1 of [OAI26k] (p. 53) at truncation order 1, with the entries given by procedures, and extends its root precision to P ≤ D s (⌊log₂ s⌋ + 1) for each fixed D. The schedule absorbs the extra logarithm in (D.11), while the clock charges P / (⌊log₂ m⌋ + 1) at m edges.

The analysis follows the one for explicit networks (CountingSimulation.FastAnalysis, CountingSimulation.fastSizes, CountingSimulation.fastLeaves), with the root call of EntryContraction.rootCall, the precision in unary and the guard EntryContraction.guard, which every admissible input at the modulus passes. The one new ingredient is the cost of the root entries at a leaf (§D.4.7, p. 64):

Main results #

References #

The root #

Dividing the precision by the logarithmic allowance restores a linear root bound.

The integer constant read from normalized precision bounds the original precision.

The clock is subexponential on admissible inputs: with s ≤ m ≤ C s edges and precision P ≤ D s (⌊log₂ s⌋ + 1), it is at most 2 ^ (K₀ (C + D) s / √⌊log₂ s⌋).

The sizes #

The leaves #

The facts at the reached calls that the leaf bounds use. For all constants C and D there is s₀ such that on every guarded input at the modulus with s ≤ m ≤ C s edges and precision P ≤ D s (⌊log₂ s⌋ + 1), every reached call has scale m, at most 2 m edges and, from s₀ on, precision at most m ^ 4, and at most leafSize m edges if the machine treats it as a leaf.

The leaf bounds on admissible inputs: for a native certificate ce of the entry procedure and all constants C and D there is K such that on every input at the modulus admissible at size s ≥ 2 with constant C and precision 1 ≤ P ≤ D s (⌊log₂ s⌋ + 1), direct summation at every reached call that the machine treats as a leaf takes time at most K (n + 1) ^ K 2 ^ (K s / √⌊log₂ s⌋) and space at most K (n + 1) ^ K. The root entries take time at most C (s + L + 1) ^ C 2 ^ (C ⌈s ^ (9/10)⌉) at every reached leaf (FastContraction.Reach.exists_root_of_inl), within the budget from some size on (exists_mul_ceilNineTenths_le).

The resource analysis #

theorem Cslib.Complexity.CountingSimulation.exists_entryAnalysis {T : Type} {encT : T ↪ List Bool} {entry : T → List Bool → List ℕ} (ce : GenericRAM.NativeCertificate (fun (q : T × List Bool) => entry q.1 q.2) (Turing.MultiTapeTM.encPair encT Turing.MultiTapeTM.encBits) (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat)) (C D : ℕ) :
∃ (K : ℕ) (s₀ : ℕ), ∀ (s P r : ℕ) (G : Circuits.Frontier.DescribedNetwork T), 2 ≤ s → 1 ≤ P → P ≤ D * s * (Nat.log 2 s + 1) → Circuits.Frontier.EntryAdmissible ce C s (r, G) → ∃ (N : ℕ) (H : ℕ) (F : ℕ) (TL : ℕ) (SL : ℕ), (Circuits.Frontier.FastContraction.scheme entry Circuits.Frontier.FastContraction.nativeMk).Eval (Circuits.Frontier.FastContraction.reachInv entry Circuits.Frontier.FastContraction.nativeMk (Circuits.Frontier.EntryContraction.rootCall (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G))) (Circuits.Frontier.EntryContraction.rootCall (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G)) (0, Circuits.Frontier.FastContraction.value entry Circuits.Frontier.FastContraction.nativeMk (Circuits.Frontier.EntryContraction.rootCall (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G))) N H ∧ (s₀ ≤ s → 2 * N - 1 ≤ Circuits.Frontier.EntryContraction.clock (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G)) ∧ (∀ (y : Circuits.Frontier.FastContraction.Call T), (Circuits.Frontier.FastContraction.reachInv entry Circuits.Frontier.FastContraction.nativeMk (Circuits.Frontier.EntryContraction.rootCall (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G))).node y → ((Circuits.Frontier.FastContraction.encCall encT) y).length ≤ F ∧ ((Circuits.Frontier.FastContraction.scheme entry Circuits.Frontier.FastContraction.nativeMk).isLeaf y = true → (Circuits.Frontier.FastContraction.leafCertificate ce Circuits.Frontier.FastContraction.nativeMk).time y ≤ TL ∧ (Circuits.Frontier.FastContraction.leafCertificate ce Circuits.Frontier.FastContraction.nativeMk).space y ≤ SL)) ∧ (∀ (y : Circuits.Frontier.FastContraction.Call T) (a : Circuits.Frontier.FastContraction.Frame), (Circuits.Frontier.FastContraction.reachInv entry Circuits.Frontier.FastContraction.nativeMk (Circuits.Frontier.EntryContraction.rootCall (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G))).frame y a → ((Turing.MultiTapeTM.encPair (Circuits.Frontier.FastContraction.encCall encT) Circuits.Frontier.FastContraction.encFrame) (y, a)).length ≤ F) ∧ (∀ (v : ℕ × List ℕ), (Circuits.Frontier.FastContraction.reachInv entry Circuits.Frontier.FastContraction.nativeMk (Circuits.Frontier.EntryContraction.rootCall (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G))).value v → (Circuits.Frontier.FastContraction.encValue v).length ≤ F) ∧ H + F + SL ≤ K * (((Circuits.Frontier.EntryContraction.encInput encT) (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G)).length + 1) ^ K ∧ TL ≤ K * (((Circuits.Frontier.EntryContraction.encInput encT) (P, Circuits.Frontier.FastContraction.modulus G.numEdges, r, G)).length + 1) ^ K * 2 ^ (K * s / (Nat.log 2 s).sqrt)

The resource analysis of the recursion on admissible inputs. For a native certificate ce of the entry procedure and all constants C and D there are K and s₀ such that on every input at the modulus admissible at size s ≥ 2 with constant C and precision 1 ≤ P ≤ D s (⌊log₂ s⌋ + 1), the root call has a derivation whose nodes, frames and values are at most F long, whose leaves take time at most TL and space at most SL, with H open calls, such that H + F + SL ≤ K (n + 1) ^ K and TL ≤ K (n + 1) ^ K 2 ^ (K s / √⌊log₂ s⌋) for the input length n; and from s₀ on its N nodes fit in the clock, 2 N - 1 ≤ clock.

The resources of the machine #

The machine within the interface's bounds. For a native certificate ce of the entry procedure and all constants C and D there is K such that on every input at the modulus admissible at size s ≥ 2 with constant C and precision 1 ≤ P ≤ D s (⌊log₂ s⌋ + 1), the machine EntryContraction.fastCore ce takes time at most K (n + 1) ^ K 2 ^ (K s / √⌊log₂ s⌋) and space at most K (n + 1) ^ K. Admissible inputs pass the guard; from some size on the clocked run returns the root's value, and below it direct summation costs a constant factor.

The contraction algorithm #

Theorem D.1 for entry procedures with logarithmic root precision. Extending [OAI26k], p. 53, at truncation order 1: for every native certificate ce of an entry procedure, the guarded native recursion with direct summation as the fallback (EntryContraction.fastCore ce) is a contraction algorithm for the networks admissible for ce, in time poly(n) 2 ^ O(s / √⌊log₂ s⌋) and polynomial space.