How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Primitive Recursive and Partial Computable Functions: Examples and Counterexamples
1 · Prerequisites
- Construction of the Natural Numbers
- Countability and Uncountability
- Finite Counting, Factorials and Binomial Coefficients
- Formal Languages, Encodings, and Decision Problems
- Linear Recurrences and Rational Generating Functions
- Primitive Recursive and Partial Computable Functions
- Relations, Functions, and Quotients
- Robust Machine Models and Universal Computation
- The ZFC Axioms and the Basic Set Constructions
- Turing Machines, Configurations, and Computation
2 · Summary
These examples unpack the page's two most concrete constructions. One decodes a single finite-sequence code far enough to read off its length and a chosen coordinate, and the other shows the equivalence with lambda-definability on the familiar factorial function. The counterexample page item keeps the main growth separation visible: Ackermann is total and computable, but still not primitive recursive.
3 · Logical flowchart
4 · Definitions, theorems and proofs
None yet.
5 · Examples, counterexamples and false statements
Reading the length and third coordinate of a coded finite sequence
Example
Consider the sequence . Its binary-entry blocks are so the code word from A natural-number coding of finite sequences is Let be the natural number with that binary numeral. Then the decoded header has length , and the third coordinate block decodes to . Hence
Facts & Assumptions
Given: The coded sequence described above.
The sequence-length and coordinate-reading functions for this coding are primitive recursive, by The sequence-length and coordinate-reading functions are primitive recursive.
Verification
The block immediately after the initial sentinel has three leading 's before its first , so the decoded sequence length is .
After the first two payload blocks and , the last block is , which is the self-delimiting block for the binary numeral . Therefore the third decoded coordinate is .
Steps 1.1 and 1.2 show exactly what the theorem [L1] predicts on this concrete input: the primitive-recursive decoders return and .
Factorial is both lambda-definable and partial recursive
Example
Let and This is the standard primitive-recursive presentation of factorial. The lambda-definability theorem therefore supplies a closed lambda term such that beta-reduces to for each .
Facts & Assumptions
Given: The factorial function displayed above.
A partial function is lambda-definable if and only if it is partial recursive, by A partial function is lambda-definable if and only if it is partial recursive.
Verification
The displayed recursion for factorial uses the initial value and the recursive update , so factorial is a primitive-recursive total function.
Every primitive-recursive function is partial recursive. Applying [L1] to step 1.1 therefore gives a closed lambda term representing factorial on Church numerals.
Step 1.1 gives the partial-recursive side and step 2.1 gives the lambda-definable side, so factorial is a concrete example of the equivalence asserted in [L1].
The Ackermann function refutes the claim that all total computable functions are primitive recursive
Statement refuted
The false statement claims that every total computable function is primitive recursive. The Ackermann function is a counterexample.
Facts & Assumptions
Given: The Ackermann function .
The Ackermann function is total computable but not primitive recursive, by The Ackermann function is total computable but not primitive recursive.
Counterexample
By [L1], the function is total computable.
The same proposition [L1] states that is not primitive recursive.
Steps 1.1 and 1.2 exhibit one total computable function that fails to be primitive recursive, so refutes the universal claim stated above.