Documentation

CslibFrontier.Computability.Complexity.Classes.CountingSimulation.Guarded

A contraction algorithm from a guarded fast algorithm #

The contraction interface (Cslib.Complexity.CountingSimulation.ContractionAlgorithm) quantifies its admissibility constants C and D after the machine, so a machine cannot test them. For explicit networks, a contraction algorithm is assembled from a fast machine that is correct and within the interface's bounds on the inputs passing a polynomial-time guard that does not mention C and D, and from direct summation (ExplicitTensorNetwork.directContractionBinaryCertificate) elsewhere (ContractionAlgorithm.ofGuarded). This needs only that admissible networks have at most C s edges and that, for each C, the admissible networks failing the guard have bounded size s: there direct summation costs 2 ^ (C s₀) times a polynomial, a constant factor.

In the contraction theorem of [OAI26k] (Theorem D.1, with the proof of Appendix D.4), the guard is the degree bound ⌈m ^ (9/10)⌉ in the number m of edges, and a network of degree at most C ⌊log₂ s⌋ fails it only for s below a threshold depending on C. The recursion of Appendix D.4 then needs to be fast only on networks passing the guard.

Main definitions #

References #

@[reducible, inline]

Encoding of a row-indexed explicit tensor network (r, G): the binary row count r (encNat), framed, followed by the unframed explicit network G (encExplicitNetwork).

noncomputable def Cslib.Complexity.CountingSimulation.ContractionAlgorithm.ofGuarded {Adm : ℕ → ℕ → ℕ × Circuits.Frontier.ExplicitTensorNetwork ℕ → Prop} {guard : ℕ × Circuits.Frontier.ExplicitTensorNetwork ℕ → Bool} (hguard : Turing.MultiTapeTM.ComputableInPolyTime guard encExplicitRowNetwork Turing.MultiTapeTM.encBool) {f : ℕ × ℕ × Circuits.Frontier.ExplicitTensorNetwork ℕ → ℕ} (fast : GenericRAM.NativeCertificate f (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat encExplicitRowNetwork) Turing.MultiTapeTM.encNat) (hcorrect : ∀ (P : ℕ) (G : ℕ × Circuits.Frontier.ExplicitTensorNetwork ℕ), guard G = true → f (P, G) = G.2.contraction % 2 ^ P) (hbound : ∀ (C D : ℕ), ∃ (K : ℕ), ∀ (s P : ℕ) (G : ℕ × Circuits.Frontier.ExplicitTensorNetwork ℕ), 2 ≤ s → 1 ≤ P → P ≤ D * s → Adm C s G → guard G = true → fast.time (P, G) ≤ K * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat encExplicitRowNetwork) (P, G)).length + 1) ^ K * 2 ^ (K * s / (Nat.log 2 s).sqrt) ∧ fast.space (P, G) ≤ K * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat encExplicitRowNetwork) (P, G)).length + 1) ^ K) (hedges : ∀ (C s : ℕ) (G : ℕ × Circuits.Frontier.ExplicitTensorNetwork ℕ), Adm C s G → G.2.numEdges ≤ C * s) (hsmall : ∀ (C : ℕ), ∃ (s₀ : ℕ), ∀ (s : ℕ) (G : ℕ × Circuits.Frontier.ExplicitTensorNetwork ℕ), Adm C s G → guard G = false → s ≤ s₀) :

A contraction algorithm from a guarded fast algorithm. Let fast compute the contraction modulo 2 ^ P on the networks passing a polynomial-time guard, within the interface's bounds on the admissible ones. If admissible networks have at most C s edges, and for each C the admissible networks failing the guard have bounded size s, then branching on the guard to fast or to direct summation is a contraction algorithm.