Skip to main content
QUICK REVIEW

[Paper Review] On Equivalence and Canonical Forms in the LF Type Theory

Robert Harper, Frank Pfenning|ArXiv.org|Oct 11, 2001
Logic, programming, and type systemsComputer Science14 references15 citations
TL;DR

This paper presents a type-directed algorithm for definitional equality in the LF type theory that bypasses reduction-based approaches by analyzing term shapes, achieving decidability and enabling a new notion of canonical form—quasi-canonical forms—suitable for adequacy theorems in logical frameworks. The algorithm is proven sound and complete via a Kripke-style logical relations argument, with correctness relying only on type structure, not term dependencies.

ABSTRACT

Decidability of definitional equality and conversion of terms into canonical form play a central role in the meta-theory of a type-theoretic logical framework. Most studies of definitional equality are based on a confluent, strongly-normalizing notion of reduction. Coquand has considered a different approach, directly proving the correctness of a practical equivalance algorithm based on the shape of terms. Neither approach appears to scale well to richer languages with unit types or subtyping, and neither directly addresses the problem of conversion to canonical. In this paper we present a new, type-directed equivalence algorithm for the LF type theory that overcomes the weaknesses of previous approaches. The algorithm is practical, scales to richer languages, and yields a new notion of canonical form sufficient for adequate encodings of logical systems. The algorithm is proved complete by a Kripke-style logical relations argument similar to that suggested by Coquand. Crucially, both the algorithm itself and the logical relations rely only on the shapes of types, ignoring dependencies on terms.

Motivation & Objective

  • To address the limitations of reduction-based approaches to definitional equality in LF, which scale poorly and complicate canonical form conversion.
  • To develop a practical, scalable algorithm for definitional equality that avoids confluent reduction and strong normalization proofs.
  • To introduce a new notion of canonical form—quasi-canonical forms—that supports adequacy theorems for logical encodings in LF.
  • To prove the correctness of the algorithm using a Kripke-style logical relations argument that depends only on type shapes, not term dependencies.
  • To enable the method to scale to richer type theories, including those with unit types, subtyping, and linear types.

Proposed method

  • Design a type-directed algorithm that compares terms based on their syntactic shapes and type structure, rather than reduction steps.
  • Define a Kripke-style logical relation that relates terms to their quasi-canonical forms, using only the shape of types and not term dependencies.
  • Prove that logically related terms are algorithmically equal, establishing completeness of the algorithm.
  • Prove that definitionally equal terms are logically related, establishing soundness of the algorithm.
  • Introduce quasi-canonical forms as a new canonical form notion that omits type labels on λ-abstractions, relying on context for type information.
  • Use syntactic injectivity of product types to ensure correctness, avoiding family-level λ-abstractions in the type theory formulation.

Experimental results

Research questions

  • RQ1Can definitional equality in LF be decided without relying on reduction systems, particularly βη-reduction?
  • RQ2Can a practical, scalable algorithm for definitional equality be constructed that avoids normalization and confluence proofs?
  • RQ3Does a new notion of canonical form—quasi-canonical forms—support adequacy theorems for logical encodings in LF?
  • RQ4Can the correctness of the algorithm be established using a Kripke-style logical relations argument that abstracts from term dependencies?
  • RQ5Can this approach be extended to richer type theories, such as those with unit types, subtyping, or linear types?

Key findings

  • The proposed algorithm for definitional equality is both sound and complete, with correctness proven via a Kripke-style logical relations argument.
  • The algorithm avoids reduction entirely, relying instead on type-directed shape analysis, which improves practicality and scalability.
  • Quasi-canonical forms are introduced as a new canonical form that omits type labels on λ-abstractions, yet still support adequacy theorems.
  • The soundness proof presented greater technical challenges than completeness, particularly due to the need to ensure syntactic injectivity of product types.
  • The method scales to richer type theories, including those with unit types, products, linear types, and subtyping, due to its reliance on type structure rather than reduction.
  • The approach enables practical implementation of type checking and definitional equality in logical frameworks without requiring full normalization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.