Polynomial-time declared-input check #
The declared-input guard Cslib.Logic.PL.CNF.validDeclaredInput k N φ checks that every clause
of φ has width at most k and every variable of φ is below the declared bound N. This
module shows that the guard is polynomial-time computable on encPair encP encCNF when the
declared bound is computed from the parameter in unary. Both the native sparse leaf counter and the
uniform counting-sparsification resources use it.
Main results #
Cslib.Logic.PL.CNF.computableInPolyTime_validDeclaredInput: the declared-input check isComputableInPolyTimewhen the declared variable bound is.
theorem Cslib.Logic.PL.CNF.computableInPolyTime_validDeclaredInput {P : Type} {encP : P ↪ List Bool} {NOf : P → ℕ} (k : ℕ) (hNOf : Turing.MultiTapeTM.ComputableInPolyTime NOf encP Turing.MultiTapeTM.encUnary) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : P × CNF ℕ) => validDeclaredInput k (NOf x.1) x.2)
(Turing.MultiTapeTM.encPair encP Complexity.encCNF) Turing.MultiTapeTM.encBool
The declared-input check validDeclaredInput k (NOf p) φ is computable in polynomial time
when the declared variable bound NOf is.