Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Internal.PolyTimeFinitePrimitives

Plain polynomial-time finite case analysis #

A fixed finite tag selects a branch retaining the original input, with arbitrary tag and output encodings and no default inhabitant requirement. This module provides Turing.MultiTapeTM.ComputableInPolyTime.finite_cases without importing the higher tidy calculus.

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.