The CMMSA table evaluator runs in polynomial time #
The evaluator of Cslib.Computability.MCSP.PartialHardness.Evaluator computes the partial truth
table of FromCMMSA.toInstance from explicit tables. This module proves that it runs in polynomial
time for fixed Δ, k and P. The instance I uses CMMSAInstance.encoding, λ and term and
slot indices are unary, the input x is binary and the tables T are a framed list of bit
strings (encList encBits).
Every statement has the form "if the arguments are polynomial-time functions of an input a, so is
the result". A client may therefore compute the arguments from any context, for instance under
mapWithInput, and the per-entry statements are fun_prop lemmas.
The widths that place the input fields are polynomial-time in unary. The seed width is a maximum
over the variables (seedWidth_eq), so it is read from the largest weight maxWeight. The number
2 ^ L of table entries is polynomial-time in unary, and polynomially bounded for every instance
and every λ (two_pow_inputLength_le). Given a list of tables that has the table of every
variable (IsVarTable), the instance toInstance I Δ k λ P f is then polynomial-time in
PartialMCSP.enc (computableInPolyTime_toInstance).
Main definitions #
Cslib.PartialMCSP.FromCMMSA.maxWeight: the largest weight of an instance.
Main results #
Cslib.PartialMCSP.FromCMMSA.le_maxWeight,maxWeight_le,maxWeight_eq_zero_or_mem: the largest weight bounds the weights, is at most any bound on them and is0or one of them.Cslib.PartialMCSP.FromCMMSA.seedWidth_eq: the seed width is⌈log₂ (maxWeight I · λ)⌉.Cslib.PartialMCSP.FromCMMSA.two_pow_inputLength_le: a polynomial bound on2 ^ Lfor every instance and everyλ.Cslib.PartialMCSP.FromCMMSA.computableInPolyTime_indexWidth,…_seedWidth,…_slotWidth,…_inputLength,…_slotOffset,…_two_pow_inputLength: the widths, in unary.Cslib.PartialMCSP.FromCMMSA.computableInPolyTime_mod_two_pow_indexWidth: the formula index of a numeric input.Cslib.PartialMCSP.FromCMMSA.computableInPolyTime_slotBitN,…_termParityN,…_entryN,…_tableN: the evaluator.Cslib.PartialMCSP.FromCMMSA.computableInPolyTime_sizeThreshold: the size threshold, in unary.Cslib.PartialMCSP.FromCMMSA.computableInPolyTime_toInstance: the partial MCSP instance from explicit tables.
References #
The seed width as a maximum #
The largest weight of I, 0 when there is none.
Every weight is at most the largest weight.
The largest weight is 0 or one of the weights.
The largest weight is at most any bound on the weights.
The seed width is ⌈log₂ (w_max λ)⌉ for the largest weight w_max.
Polynomial time #
Reading term t of formula j is polynomial-time, with j in binary and t in unary.
Reading the variable of a literal is polynomial-time; the variable is written in binary.
The input length of the function of a variable is polynomial-time, in unary.
The largest weight is polynomial-time, in unary.
The width of the formula index is polynomial-time, in unary.
The seed width is polynomial-time, in unary.
The slot width is polynomial-time, in unary.
The input length is polynomial-time, in unary.
The offset of a slot is polynomial-time, in unary.
The number 2 ^ L of table entries is polynomial-time, in unary.
The number of table entries is polynomial, for every instance I and every λ:
2 ^ L ≤ 2 (m + 1) (2 (2 (w_max λ + 1)) ^ k) ^ Δ² for m formulas and largest weight w_max.
The evaluator #
The formula index x mod 2 ^ indexWidth of a numeric input is polynomial-time, in binary.
A slot bit computed from explicit tables is polynomial-time, for fixed Δ and k: the
instance I (in CMMSAInstance.encoding), λ and the slot (t, q) in unary, the tables T and
the input x in binary.
The parity of a term computed from explicit tables is polynomial-time, for fixed Δ and k:
the instance I (in CMMSAInstance.encoding), λ and the term t in unary, the tables T and
the input x in binary.
An entry computed from explicit tables is polynomial-time, for fixed Δ and k: the instance
I (in CMMSAInstance.encoding), λ in unary, the tables T and the input x in binary.
The whole table computed from explicit tables is polynomial-time, for fixed Δ and k: the
instance I (in CMMSAInstance.encoding), λ in unary, the tables T.
The size threshold is polynomial-time, in unary.
The partial MCSP instance is polynomial-time from explicit tables, for fixed Δ, k and
P. If T a has the table of every variable of I a under the functions f a, then
toInstance (I a) Δ k (lam a) P (f a) is computed in polynomial time from the instance I a, λ
in unary and the tables T a.