Unambiguous polynomial time #
UP is defined using polynomial-time verifiers with at most one accepting certificate of the
specified polynomial length on every input. Classes.UP.Machine proves the equivalent native
finite-machine characterization, preserving accepting-path ambiguity. The coUP extension uses
the standard complement-class convention; its containments and reduction closure below are
elementary consequences of the corresponding UP results and complement closure of P and parity-P.
Main definitions #
Cslib.Complexity.coUP: complements of UP languages.Cslib.Complexity.UP: languages whose characteristic function belongs to#P.
Main results #
Cslib.Complexity.mem_UP: the at-most-one-witness characterization.Cslib.Complexity.P_subset_UP,Cslib.Complexity.UP_subset_NP,Cslib.Complexity.UP_subset_ParityP,Cslib.Complexity.coUP_subset_coNP.Cslib.Complexity.PolyTimeReducible.mem_UP: closure under polynomial-time reductions.
References #
Unambiguous polynomial time: some #P function is bounded by one everywhere and is one
exactly on the language Papadimitriou.
Instances For
theorem Cslib.Complexity.mem_UP {α : Type} {enc : α ↪ List Bool} {A : Set α} :
A ∈ UP enc ↔ ∃ (p : Polynomial ℕ) (V : α × List Bool → Bool),
Turing.MultiTapeTM.ComputableInPolyTime V (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits)
Turing.MultiTapeTM.encBool ∧ (∀ (a : α), acceptCount V a (Polynomial.eval (enc a).length p) ≤ 1) ∧ ∀ (a : α), a ∈ A ↔ acceptCount V a (Polynomial.eval (enc a).length p) = 1
UP through verifiers: at most one certificate of the specified length accepts on each input,
and exactly one accepts on members.