Listing short lists in polynomial time #
For a fixed length bound r, listing the lists of length at most r over a list computed in
polynomial time is polynomial-time
(Turing.MultiTapeTM.ComputableInPolyTime.listsUpTo): the listing is r nested
List.flatMaps.
Main results #
Turing.MultiTapeTM.ComputableInPolyTime.listsUpTo:List.listsUpTo (l a) ris polynomial-time inafor a fixedr.
theorem Turing.MultiTapeTM.ComputableInPolyTime.listsUpTo {γ α : Type} {encIn : γ ↪ List Bool} {encA : α ↪ List Bool} {l : γ → List α} (hl : ComputableInPolyTime l encIn (encList encA)) (r : ℕ) :
Listing short lists is polynomial-time for a fixed length bound r, over a list computed
in polynomial time.