feat: Cobham characterization of FP - #23
Open
BoltonBailey wants to merge 9 commits into
Open
Conversation
Resolve conflicts with the module-system migration: migrate the new Encoding files (Delimit, Bitstring, Encoding aggregation) to module style with public imports and @[expose] public section, add the Encoding import to the root module, and drop List.append_assoc simp args made unused by pair unfolding through delimit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BoltonBailey
marked this pull request as ready for review
August 6, 2026 23:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR defines the Cobham class of efficiently computable functions (consisting of the closure of a certain collection under composition and bounded recursion) and proves this equivalent to FP.
People often say they want to do complexity theory or use the class of polynomial time functions, but want to avoid working with Turing machines. The point of this equivalence is to give users an interface where, even though FP is still defined in terms of Turing Machines, proofs about polynomial time computability can avoid Turing machines entirely. Cobham's class is just the set of functions from tuples of bitstrings to bitstrings which include:
and which is closed under
In principle, we should now be able to prove polynomial time computability not by writing a TM, but by proving our function equivalent to a big composition / recursions of functions we already know are polytime.