Skip to main content
QUICK REVIEW

[Paper Review] Constructing (Co)inductive Types via Large Sizes

Benno van den Berg, Bastiaan Laarakker|arXiv (Cornell University)|Feb 21, 2026
Logic, programming, and type systemsComputer Science0 citations
TL;DR

The paper extends intensional type theory with a large Size type and parametric size quantifiers to encode all (co)inductive types, and proves consistency via a realisability model interpreting sizes as an uncountable ordinal.

ABSTRACT

To ensure decidability and consistency of its type theory, a proof assistant should only accept terminating recursive functions and productive corecursive functions. Most proof assistants enforce this through syntactic conditions, which can be restrictive and non-modular. Sized types are a type-based alternative where (co)inductive types are annotated with additional size information. Well-founded induction on sizes can then be used to prove termination and productivity. An implementation of sized types exists in Agda, but it is currently inconsistent due to the addition of a largest size. We investigate an alternative approach, where intensional type theory is extended with a large type of sizes and parametric quantifiers over sizes. We show that inductive and coinductive types can be constructed in this theory, which improves on earlier work where this was only possible for the finitely-branching inductive types. The consistency of the theory is justified by an impredicative realisability model, which interprets the type of sizes as an uncountable ordinal.

Motivation & Objective

  • Motivate termination and productivity guarantees in dependently typed programming and mathematics.
  • Develop a type-theoretic framework that uses large sizes and parametric quantifiers to encode (co)inductive types.
  • Provide a consistent encoding of both inductive and coinductive types for all polynomial endofunctors.
  • Demonstrate how size-indexed constructions yield initial algebras and final coalgebras.
  • Show consistency via a realisability model based on Hyland’s effective topos.
  • Ensure compatibility with homotopy type theory by avoiding reliance on uniqueness of identity proofs.

Proposed method

  • Introduce a Size type with zero, successor, and a well-founded size-based induction principle (fix).
  • Add impredicative universal/existential quantifiers over sizes and axioms for parametricity between sizes and type constructors.
  • Define size-indexed endofunctors (Diamond and Box) to model bounded existential and universal quantification over sizes.
  • Construct size-indexed initial algebras and prove their existence using a fixpoint-based unfolding and initiality arguments.
  • Show that the ordinary (unindexed) endofunctor F has an initial algebra via existential quantification of the size-indexed initial algebra, using a left adjoint relation.
  • Provide a consistency justification through a realisability model interpreting sizes as an uncountable ordinal.

Experimental results

Research questions

  • RQ1Can inductive and coinductive types be encoded for all polynomial endofunctors using large sizes and parametric quantifiers?
  • RQ2How do size quantifiers interact with standard type constructors and universes in the presence of impredicativity?
  • RQ3Is the resulting theory consistent, and how can this be demonstrated via a realisability model?
  • RQ4What is the relationship between size-indexed constructions and existing approaches like guarded type theory for forming (co)inductive types?

Key findings

  • All (co)inductive types can be encoded using sizes and parametric quantifiers.
  • Inductive and coinductive constructions are obtained via initial algebras and final coalgebras for polynomial endofunctors.
  • Consistency is justified by a realisability model interpreting the size type as an uncountable ordinal.
  • The approach internalizes parametricity and avoids reliance on uniqueness of identity proofs, enabling compatibility with HoTT.
  • The theory extends Martin-Löf type theory with a large size type and impredicative size quantifiers while preserving extensional reasoning.
  • Axioms for parametric commutation of size quantifiers with type constructors underpin the encodings.

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.