The reduction of truncation order ℓ as a native machine #
The reduction of CslibFrontier/Computability/Circuit/Frontier/TensorNetwork/Truncated.lean
(Cslib.Circuits.Frontier.DescribedNetwork.interpContract) contracts specialized networks over
A_P = (ℤ / 2 ^ P)[U] / (f) and interpolates. This file runs it as one native machine around any
native certificate of the contraction over A_P (engineCertificate), with the precision P and
the truncation order ℓ in unary.
Polynomial-time steps. Specializing a network at a point (DescribedNetwork.specNet_polyTime),
the binary-digit points (DescribedNetwork.digitPoints_polyTime), the inputs of the contractions
(coreInput_polyTime) and reading the truncated contraction off the interpolant
(interpRecover_polyTime, engineRecover_polyTime) are polynomial-time.
The loop. The machine visits the digit points with the binary-index fold
Cslib.GenericRAM.IndexFold, keeping the index, the input and the values so far; each round
calls the given certificate once (engineStep, engineStepCertificate, run_engineStep). Then it
interpolates (engineRecover).
Direct summation. A native certificate of the entries gives one of the specialized entries
(specEntryCertificate: the entry, then Horner's rule), hence direct summation over A_P of a
specialized network (directCoreCertificate). Through the reduction at the modulus
FastContraction.modulus n for n = (ℓ - 1) k + 1 points, which has enough residues
(le_two_pow_length_modulus), this computes the truncated contraction on every input
(truncDirectCertificate). Its cost is that of direct summation.
The time and space of the loop are bounded in
CslibFrontier/Computability/Circuit/Frontier/TensorNetwork/TruncatedResources.lean. With the
contraction of Theorem D.1 at ℓ = 1 over A_P in place of direct summation, that bound gives
Theorem D.1 at truncation order ℓ (#1538).
Main definitions #
Cslib.Circuits.Frontier.encSpecDesc,Cslib.Circuits.Frontier.encTrunc,Cslib.Circuits.Frontier.encCore,Cslib.Circuits.Frontier.encEngine,Cslib.Circuits.Frontier.encEngineState: encodings.Cslib.Circuits.Frontier.specEntryCertificate: the native evaluator of specialized entries.Cslib.Circuits.Frontier.engineCertificate: the reduction around a contraction overA_P.Cslib.Circuits.Frontier.directCoreCertificate: direct summation overA_P.Cslib.Circuits.Frontier.truncDirectCertificate: the truncated contraction by direct summation.
Main results #
Cslib.Circuits.Frontier.DescribedNetwork.specNet_polyTime,Cslib.Circuits.Frontier.interpRecover_polyTime: polynomial-time steps.Cslib.Circuits.Frontier.run_engineStep,Cslib.Circuits.Frontier.interpContract_eq_run: the loop computes the reduction.Cslib.Circuits.Frontier.interpContract_direct_eq: direct summation through the reduction is the truncated contraction.
References #
- OpenAI, The Exponential Time Hypothesis is False, Theorem D.1 (p. 53).
The first ℓ coefficients as constant coefficient lists, from ℓ in unary.
Horner's rule on the first ℓ coefficients, from the data of a specialization and a
coefficient list, with P and ℓ in unary.
The native evaluator of specialized entries, from a native certificate of the entries:
evaluate the original entry, then apply Horner's rule in A_P.
Specializing is polynomial-time: from the data (P, ℓ, fl, ζ) and the network to the
specialized network.
The binary-digit points are polynomial-time, from the number of coordinates and the number of points in unary.
Reading off the interpolant is polynomial-time, with P and ℓ in unary.
The reduction as a streaming loop #
The encoding of an input (P, fl, r, G') of a contraction over A_P of specialized
networks: P in unary, the modulus, r in binary, then the specialized network.
The state (k, (y, ys)) of the loop of the reduction: the index k in binary, framed, the
input y of the reduction (encEngine), framed, then the values ys so far, each framed, an
element of A_P as its coefficient list of framed binary numbers. The last component is the
layout of encElems but is spelled encList (encList encNat) so that the omega steps of
TruncatedResources see the expected encoding constructors after simplifying encEngineState.
The reduction is the streaming loop followed by recovery.
The binary digits are polynomial-time from the number in binary.
The number of points is polynomial-time, in unary.
The input of the contraction at a binary index is polynomial-time.
The certificate of one round, from a certificate of the contraction over A_P.
Recovery from the final state of the loop is polynomial-time.
The reduction as one native machine, from a native certificate of the contraction over
A_P of specialized networks: the streaming loop over the digit points, keeping only the binary
index, the input and the values so far, then recovery. On input (fl, (P, ℓ, r, G)) it computes
interpContract core fl P ℓ r G.
Direct summation as the contraction over A_P #
Direct summation over a specialized network, as a contraction over A_P with the input
(P, fl, r, G'), from a native certificate of the entries.
n ≤ 2 ^ deg f for the modulus FastContraction.modulus n: it has enough residues for n
points.
Choosing the modulus FastContraction.modulus n for n = (ℓ - 1) k + 1 points is
polynomial-time.
Direct summation through the reduction computes the truncated contraction, at the modulus
FastContraction.modulus n for n = (ℓ - 1) k + 1 points.
The truncated contraction by direct summation, as one native machine on every input
(P, ℓ, r, G): the reduction with direct summation over A_P at the modulus
FastContraction.modulus n, for n = (ℓ - 1) k + 1 points. It is correct everywhere; its cost is
that of direct summation, exponential in the number of edges.