Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.PolyTime.ListsUpTo

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 #

theorem Turing.MultiTapeTM.ComputableInPolyTime.listsUpTo {γ α : Type} {encIn : γ ↪ List Bool} {encA : α ↪ List Bool} {l : γ → List α} (hl : ComputableInPolyTime l encIn (encList encA)) (r : ℕ) :
ComputableInPolyTime (fun (a : γ) => (l a).listsUpTo r) encIn (encList (encList encA))

Listing short lists is polynomial-time for a fixed length bound r, over a list computed in polynomial time.