pith. sign in

arxiv: 1907.11133 · v1 · pith:XEWD6Q2Wnew · submitted 2019-07-25 · 💻 cs.PL

An Introduction to Logical Relations

Pith reviewed 2026-05-24 15:43 UTC · model grok-4.3

classification 💻 cs.PL
keywords logical relationssimply typed lambda calculusnormalizationtype safetystep-indexingrecursive typesreferencespolymorphism
0
0 comments X

The pith

Logical relations prove normalization and type safety for simply typed lambda calculus by relating terms to types, then extend to polymorphism, recursion, and references.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper delivers a self-contained tutorial on logical relations that begins with no assumed background. It defines logical relations for the simply typed lambda calculus and uses them to establish both normalization and type safety. The tutorial then introduces relational substitutions to handle universal and existential types, step-indexing to manage recursive types, and worlds to reason about mutable references. A reader would care because these techniques appear in many formal proofs yet are rarely presented together at an elementary level. The note therefore supplies the incremental definitions and proof sketches needed to reach the more advanced applications.

Core claim

Logical relations are type-indexed relations between terms that capture the intended computational behavior of each type. For the simply typed lambda calculus they are defined by induction on types and directly yield proofs of normalization and type safety. Relational substitutions lift the technique to universal and existential quantification. Step-indexing approximates the relation at finite depths to accommodate recursive types. Worlds track heap relations to handle references while preserving the logical-relation invariants.

What carries the argument

Logical relations, defined by induction on types to relate closed terms whose behavior matches the type.

If this is right

  • If the logical relations for the simply typed lambda calculus are sound, then every well-typed term normalizes and is type-safe.
  • Relational substitutions extend the same technique to prove properties of programs that use universal and existential types.
  • Step-indexed logical relations establish termination and safety for languages that include recursive types.
  • World-indexed logical relations allow proofs of type safety for languages with mutable references.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • The same incremental construction could be applied to prove equivalence or contextual properties rather than only safety.
  • Readers could test the note by porting the step-indexed construction to a different recursive construct such as recursive functions.
  • The world-based approach for references suggests a template for adding other stateful features such as exceptions or concurrency.

Load-bearing premise

The tutorial's definitions, examples, and proof sketches for each language feature are accurate and complete enough to be followed by a reader with minimal background.

What would settle it

A reader who follows the note's proof of normalization for the simply typed lambda calculus and obtains a term that is well-typed yet diverges would show the logical-relation definition fails to capture the intended property.

read the original abstract

Logical relations (LR) have been around for many years, and today they are used in many formal results. However, it can be difficult to LR beginners to find a good place to start to learn. Papers often use highly specialized LRs that use the latest advances of the technique which makes it impossible to make a proper presentation within the page limit. This note is a good starting point for beginners that want to learn about LRs. Almost no prerequisite knowledge is assumed, and the note starts from the very basics. The note covers the following: LRs for proving normalization and type safety of simply typed lambda calculus, relational substitutions for reasoning about universal and existential types, step-indexing for reasoning about recursive types, and worlds for reasoning about references.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

0 major / 3 minor

Summary. The manuscript is an expository note introducing logical relations (LRs) for beginners with minimal prerequisites. It covers LRs for normalization and type safety of the simply-typed lambda calculus, relational substitutions for universal and existential types, step-indexing for recursive types, and worlds for reasoning about references.

Significance. If the explanations prove accurate and self-contained, the note could fill a pedagogical gap in programming languages by providing an accessible entry point to LRs, a technique used in many formal results but often presented in specialized papers. The work's value is in its structured, bottom-up presentation rather than novel technical results.

minor comments (3)
  1. The abstract claims the note assumes 'almost no prerequisite knowledge' and starts 'from the very basics,' but the full text should explicitly state the assumed background (e.g., basic lambda calculus syntax and typing rules) in an early section to avoid ambiguity for true beginners.
  2. Section on relational substitutions for universal/existential types: the transition from unary to relational LRs could include a small concrete example of a polymorphic term to illustrate the relational substitution step, improving clarity without adding length.
  3. The note would benefit from a short concluding section or table summarizing the progression of LR techniques across the four topics, to help readers see how each builds on the previous.

Simulated Author's Rebuttal

0 responses · 0 unresolved

We thank the referee for their encouraging summary and recommendation of minor revision. No specific major comments were raised in the report, so we have no individual points requiring response or revision at this time. We will incorporate any minor editorial suggestions during the final preparation of the note.

Circularity Check

0 steps flagged

No significant circularity; purely expository introduction

full rationale

The document is an educational note introducing logical relations for STLC normalization, type safety, relational substitutions, step-indexing, and worlds. It contains no novel derivations, quantitative predictions, or load-bearing technical claims. All content is standard exposition of established techniques with no equations or results that reduce to fitted inputs, self-definitions, or self-citation chains. The central claim is pedagogical self-containment, which is independent of any internal derivation and matches the reader's assessment of zero circularity risk.

Axiom & Free-Parameter Ledger

0 free parameters · 0 axioms · 0 invented entities

This is an introductory note with no new mathematical claims, so it introduces no free parameters, axioms, or invented entities beyond standard background in programming language theory.

pith-pipeline@v0.9.0 · 5639 in / 971 out tokens · 24209 ms · 2026-05-24T15:43:37.491715+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. CHAD: Combinatory Homomorphic Automatic Differentiation

    cs.PL 2021-03 unverdicted novelty 7.0

    CHAD is a homomorphic source-to-source transformation for forward- and reverse-mode AD on higher-order functional languages with arrays, proven correct via compositional logical relations.