Documentation

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

Polynomial-time finite case analysis #

An efficiently computed finite tag selects a branch retaining the original input. Both the tag encoding and output encoding are arbitrary. The finite type and all branch machines are fixed independently of runtime input; this does not enumerate a family whose size grows with the input.

Main results #

References #

Adapts Computability/Probabilistic/Finite.lean on the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8.

theorem Turing.MultiTapeTM.ComputableInPolyTime.finite_cases {α β Tag : Type} [Finite Tag] {input : α ↪ List Bool} {output : β ↪ List Bool} {tagEncoding : Tag ↪ List Bool} {tag : α → Tag} {branch : Tag → α → β} (htag : ComputableInPolyTime tag input tagEncoding) (hbranch : ∀ (choice : Tag), ComputableInPolyTime (branch choice) input output) :
ComputableInPolyTime (fun (a : α) => branch (tag a) a) input output

A fixed finite tag selects a certified branch, charging the tag and captured input. Neither the tag nor the result type requires a default inhabitant.

theorem Turing.MultiTapeTM.ComputableTidilyInPolyTime.finite_cases {α β Tag : Type} [Finite Tag] {input : α ↪ List Bool} {output : β ↪ List Bool} {tagEncoding : Tag ↪ List Bool} {tag : α → Tag} {branch : Tag → α → β} (htag : ComputableTidilyInPolyTime tag input tagEncoding) (hbranch : ∀ (choice : Tag), ComputableTidilyInPolyTime (branch choice) input output) :
ComputableTidilyInPolyTime (fun (a : α) => branch (tag a) a) input output

A fixed finite tag selects a certified branch, charging the tag and captured input. Neither the tag nor the result type requires a default inhabitant.