On the relation between size-based termination and semantic labelling
We investigate the relationship between two independently developed termination techniques. On the one hand, sized-types based termination (SBT) uses types annotated with size expressions and Girard’s reducibility candidates, and applies on systems using constructor matching only. On the other hand, semantic labelling transforms a rewrite system by annotating each function symbol with the semantics of its arguments, and applies to any rewrite system. First, we introduce a simplified version of SBT for the simply-typed lambda-calculus. Then, we give new proofs of the correctness of SBT using semantic labelling, both in the first and in the higher-order case. As a consequence, we show that SBT can be extended to systems using matching on defined symbols (e.g. associative functions).
💡 Research Summary
The paper establishes a deep connection between two termination techniques that have historically been developed in parallel: sized‑based termination (SBT) and semantic labelling. SBT annotates types with size expressions and uses Girard’s reducibility candidates to guarantee that recursive calls are made on strictly smaller arguments. Traditionally, SBT has been limited to first‑order rewrite systems that employ only constructor matching, because the size‑decrease condition is expressed directly in the type of each function. Semantic labelling, on the other hand, is a transformation applicable to any rewrite system: each function symbol is enriched with a label that records the semantic values of its arguments (for instance, their sizes), and the transformed system is proved terminating; termination of the labelled system then implies termination of the original one by a preservation theorem.
The authors start by presenting a streamlined version of SBT for the simply‑typed λ‑calculus. Types are extended with size variables (α, β, …) and function types carry explicit size‑decrease constraints, e.g. a function f : ∀α. Nat^α → Nat^{α‑1}. The typing rules enforce that every recursive call is made on a strictly smaller size expression, and the usual reducibility‑candidate argument shows that any well‑typed term is strongly normalising.
Next, the paper introduces a semantic labelling scheme tailored to the same language. A semantic interpretation ⟦·⟧ maps each size‑annotated type to a concrete size value (⟦Nat^α⟧ = α, ⟦τ → σ⟧ = ⟦τ⟧ → ⟦σ⟧, etc.). For each function symbol f, a label ℓ(f, x₁,…,xₙ) = (⟦x₁⟧,…,⟦xₙ⟧) is attached. The rewrite rules are then duplicated with these labels on both sides, and the labelled system inherits a well‑founded order on labels (typically the product order on natural numbers).
The central technical contribution is a proof that the size‑decrease condition of SBT is exactly the label‑decrease condition required by semantic labelling. In other words, any term that satisfies the SBT typing discipline automatically yields a labelled rewrite step that strictly decreases the associated label tuple. Consequently, the generic termination theorem for semantic labelling can be invoked to obtain a termination proof for the original system, bypassing the more intricate reducibility‑candidate construction. This argument is first carried out for first‑order terms and then lifted to the higher‑order setting. In the higher‑order case, size variables may appear inside function types, but the semantic interpretation still produces a well‑founded label, and the same correspondence holds.
A particularly striking result is the extension of SBT to systems that use matching on defined symbols, such as associative or commutative operators. By incorporating the semantics of defined symbols into the labels (for example, the length of a list argument for the concatenation operator ++), the labelled system continues to respect the decreasing‑label property even when a rewrite step matches on a defined symbol rather than a constructor. This shows that SBT, previously thought to be confined to constructor‑only rewriting, can be safely applied to a much broader class of rewrite systems, including those with user‑defined operators and higher‑order functions.
Overall, the paper demonstrates that semantic labelling provides a unifying framework that both explains why SBT works and lifts its applicability. Conversely, SBT supplies a concrete, type‑driven way to construct the semantic interpretation needed for labelling. The synergy of the two techniques yields a powerful method for proving strong normalization of a wide variety of functional programs and rewrite systems, unifying previously disparate strands of termination research.
Comments & Academic Discussion
Loading comments...
Leave a Comment