Corollary 4.4: Constructor Bound on Normal Forms of Base Type
OpenAehligSchwichtenberg2002.corollary_4_4implicit-computational-complexitylambda-calculusnormalizationpolynomial-timetype-theory
If r : B reduces to a normal form v, then the number of constructors in v is bounded by |r|_{d(r)}.
Preamble
import Definitions.Def_AehligSchwichtenberg2002_Bounds
Formal statement
namespace AehligSchwichtenberg2002
theorem corollary_4_4 {τ : Ty} {f l w : Term} {n : Nat}
(hf : HasType [] f (.lolli (.list τ) (.list τ)))
(hl : IsCanonicalListInput τ l n)
(hred : RedStar (.app f l) w)
(hnorm : IsNormal w) :
∃ m : Nat, listEntryCount w = some m ∧ m ≤ n := by sorry
end AehligSchwichtenberg2002Source
Klaus Aehlig and Helmut Schwichtenberg, 'A syntactical analysis of non-size-increasing polynomial time computation', ACM Transactions on Computational Logic 3(3), 2002, pp. 383-401 (LICS 2000, pp. 84-91; doi:10.1145/507382.507386). Corollary 4.4, p. 396.
Read-back
What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)
Read-back: Thm_AehligSchwichtenberg2002_corollary_4_4.lean
Theorem corollary_4_4
Let be a type in , let be raw terms, and let be a natural number. Assume the following four hypotheses:
- Closed list-to-list function (
hf): (HasType [] f (.lolli (.list τ) (.list τ)) in the empty typing context . - Canonical list input of length (
hl): holds, meaning there exists a context such that:- every variable has type ,
- (
HasType Γ l (.list τ)), - is in normal form (
IsNormal l, i.e., there is no with ), and - (meaning is syntactically an -fold spine of ternary applications ending in ).
- Reduction to (
hred): The application reduces in zero or more one-step reductions to , i.e., (RedStar (.app f l) w). - Normal form of (
hnorm): is in normal form (IsNormal w, i.e., there is no with ).
Then there exists a natural number such that
Note that the existence of a normal form of is assumed as a hypothesis (hred and hnorm) rather than asserted in the conclusion of this theorem. In the degenerate case (where ), the conclusion forces , so must be a -entry list ().