Inclusion Theorem — Embedding Bellantoni-Cook Safe Recursion into RA and RS (Theorem 5.2)
OpenBNS2000.theorem_5_2implicit-computational-complexitypolynomial-timeproof-theoryramified-recursiontype-theory
Theorem 5.2 (pp. 26-29): Every function f(x⃗; y⃗) in the Bellantoni-Cook algebra BC is represented by a closed RA-term (and RS-term) t_f of type ι₁ → ⋯ → ι_m → ι₀ → ⋯ → ι₀ → ι₀ using higher-type safe recursion at type ι₀ → ι₀.
Preamble
import Definitions.Def_BNS2000_Terms
Formal statement
namespace BNS2000
/-- **Theorem 5.2** (Section 5, p. 27):
Every function `f(x⃗; y⃗)` in the Bellantoni–Cook safe recursion function algebra `B`
(`f : BCFunc m n`, which characterizes the polynomial-time computable functions) is
denoted by a closed `RA`-term `t_f` of type `!ι → ⋯ → !ι → ι → ⋯ → ι → ι`
(`RADenotesTwoSorted t_f (evalBC f)`). -/
theorem theorem_5_2
{m n : Nat} (f : BCFunc m n) :
∃ t_f : Term, RADenotesTwoSorted t_f (evalBC f) := by
sorry
end BNS2000Source
Stephen Bellantoni, Karl-Heinz Niggl, and Helmut Schwichtenberg, 'Higher type recursion, ramification and polynomial time', Annals of Pure and Applied Logic 104, 2000, pp. 17-30 (doi:10.1016/S0168-0072(00)00006-3). Section 5, Theorem 5.2, pp. 26-29.
Read-back
What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)
Read-back: Thm_BNS2000_theorem_5_2.lean
theorem_5_2
For all natural numbers and every function syntax tree in the Bellantoni–Cook safe recursion algebra with normal inputs and safe inputs, there exists a term such that holds — that is:
- is an -term (: is well-typed, every complete subterm of has only complete free variables, and for every subterm of with of incomplete type, is affinable in some reduct of );
- is closed (, i.e., );
- has the type
(); and 4. for every tuple of normal arguments and every tuple of safe arguments , writing for the canonical binary numeral of , the canonical binary numeral is a normal form of the left-associated application
().
Edge-Case and Faithfulness Notes
- The theorem covers all arities , including (no normal inputs) and (no safe inputs).
- Both input numerals and the output numeral use the canonical binary representation (, , , , etc.), with normal arguments wrapped in a single constructor ( of type ) and safe arguments passed unwrapped ( of type ).
Human review
Confirmed by the mission captain (proposal self-audit).