Interfaces of the deterministic counting simulation #
The deterministic simulation of nondeterministic and probabilistic time by blocking and tensor
contraction (#1833) has two ingredients that are formalized separately. This module states them as
interfaces, so that the assembly (Cslib.Complexity.CountingSimulation.exists_computableInO_count)
can be proved from them, and each can be discharged on its own.
Parameters. A run of t steps is cut into numBlocks t = ⌈t / b⌉ intervals of
blockLength t = b = ⌈log₂ (t + 2)⌉ steps and padded to paddedTime t = numBlocks t * b ≥ t
steps. Each of heads blocked heads moves by at most one block per interval, so a run has one of
at most 3 ^ (heads * numBlocks t) movement schedules.
Networks (Cslib.Complexity.CountingSimulation.NetworkFamily). A network for each input x,
clock t and schedule σ, built in polynomial time from x, t in unary and σ in binary,
whose values sum to the count being simulated at the padded time. Each network is admissible for
the contraction algorithm at size t, with a constant of the family. This is the block-counting
step of #1833 (milestone H3): blocking after Hopcroft, Paul and Valiant, with a Boolean tensor
network for each schedule whose contraction counts the accepting choice strings with that
schedule. It is new mathematics, not a cited result.
Contraction (Cslib.Complexity.CountingSimulation.ContractionAlgorithm). One native machine
that, given a precision P and a network G, outputs value G % 2 ^ P, and that, on networks
admissible at a size s ≥ 2 with 1 ≤ P ≤ D * s, runs within time
K * (n + 1) ^ K * 2 ^ (K * s / √⌊log₂ s⌋) and space K * (n + 1) ^ K, where n is the encoded
length of (P, G) and K depends only on the constants. This is the form in which the
simulation uses the Boolean tensor contraction theorem [OpenAI2026ETH, Theorem D.1] with ℓ = 1
and maximum degree O(log s) (milestone T2 of #1833), with the exponent in the natural-number
scale of Nat.exists_three_pow_mul_le_two_pow_div_sqrt_log_two. Like Theorem D.1 it is
parameterized by a size s bounding the number of edges and the precision, rather than by the
number of edges itself.
Both interfaces are generic in the representation of networks: their type N, its encoding, the
contracted value : N → ℕ and the admissibility predicate Admissible C s G are parameters. The
intended instance takes N to be an explicit Boolean tensor network with its number of row
vertices, value its contraction, and Admissible C s G to say that G is bipartite with at
most C * s edges and maximum degree at most C * log₂ s. This is
Cslib.Complexity.CountingSimulation.ExplicitAdmissible, which also bounds the vertices and asks
for full tables and at least s edges; the block-counting networks discharge the network
interface with it (Cslib.Complexity.CountingSimulation.networkFamilies_explicitAdmissible).
Main definitions #
Cslib.Complexity.CountingSimulation.blockLength,numBlocks,paddedTime,scheduleCount: the blocking parameters.Cslib.Complexity.CountingSimulation.ContractionAlgorithm: the contraction interface.Cslib.Complexity.CountingSimulation.NetworkFamily: the network interface.
Main results #
Cslib.Complexity.CountingSimulation.le_paddedTime: padding never shortens a run.Cslib.Complexity.CountingSimulation.paddedTime_add_one_le: fromt = 2on, the padded time and one more fit in2 * t.
References #
- OpenAI, The Exponential Time Hypothesis is False, Theorem D.1 (contraction).
Blocking parameters #
The length ⌈log₂ (t + 2)⌉ of a time interval for a clock t.
Instances For
The number ⌈t / blockLength t⌉ of time intervals for a clock t.
The padded running time numBlocks t * blockLength t, a whole number of intervals.
An interval has at least one step.
Padding never shortens a run: t ≤ paddedTime t.
An interval is no longer than the clock, from t = 2 on.
The padded time stays linear: from t = 2 on, paddedTime t + 1 ≤ 2 * t, since padding
adds less than one interval.
The interfaces #
The contraction interface (the Boolean tensor contraction theorem, as the simulation uses
it). One native certificate computes value G % 2 ^ P from the precision P in binary and the
network G. For all constants C and D there is K such that on every network admissible at a
size s ≥ 2 with constant C, and every precision 1 ≤ P ≤ D * s, the certificate's time is at
most K * (n + 1) ^ K * 2 ^ (K * s / √⌊log₂ s⌋) and its space at most K * (n + 1) ^ K, where n
is the encoded length of (P, G). Outside admissible inputs the certificate need only be
correct.
- certificate : GenericRAM.NativeCertificate (fun (p : ℕ × N) => value p.2 % 2 ^ p.1) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat encN) Turing.MultiTapeTM.encNat
The native contraction modulo
2 ^ P. - bound (C D : ℕ) : ∃ (K : ℕ), ∀ (s P : ℕ) (G : N), 2 ≤ s → 1 ≤ P → P ≤ D * s → Admissible C s G → self.certificate.time (P, G) ≤ K * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat encN) (P, G)).length + 1) ^ K * 2 ^ (K * s / (Nat.log 2 s).sqrt) ∧ self.certificate.space (P, G) ≤ K * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat encN) (P, G)).length + 1) ^ K
Its time and space on admissible inputs.
The network interface (the block-counting lemma, as the simulation uses it), for a count
count x τ of the inputs x at padded time τ, such as the number of accepting choice strings of
length τ of a fair-coin machine. The family has a number of blocked heads and an admissibility
constant. Its network for the input x, the clock t and the schedule σ is computable in
polynomial time from x, t in unary and σ in binary. Whenever |x| ≤ t and 2 ≤ t, the
values of the networks of the scheduleCount heads t schedules sum to count x (paddedTime t),
and each of these networks is admissible at size t.
- heads : ℕ
The number of blocked heads.
- constant : ℕ
The admissibility constant.
The network of an input, a clock and a schedule.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime self.net (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encNat)) encN
The networks are built in polynomial time, with the clock in unary.
- sum_value (x : List Bool) (t : ℕ) : x.length ≤ t → 2 ≤ t → ∑ σ ∈ Finset.range (scheduleCount self.heads t), value (self.net (x, t, σ)) = count x (paddedTime t)
The counting identity: the values of the networks of all schedules sum to the count at the padded time.
- admissible (x : List Bool) (t σ : ℕ) : x.length ≤ t → 2 ≤ t → σ < scheduleCount self.heads t → Admissible self.constant t (self.net (x, t, σ))
Every network of a schedule is admissible at size
t.