Practical Subtyping for System F with Sized (Co-)Induction
Rodolphe Lepigre (1), Christophe Raffalli (1) ((1) LAMA)

TL;DR
This paper introduces a practical type system with subtyping for System F extensions, enabling size-aware inductive and coinductive types to verify termination and size invariants in complex programs.
Contribution
It presents a novel type system with size annotations and subtyping for System F, allowing precise reasoning about termination and size invariants in advanced polymorphic programs.
Findings
System supports sum, product, quantifiers, inductive, and coinductive types.
Size annotations enable verification of termination and size invariants.
Implementation successfully handles complex examples involving mixed induction and coinduction.
Abstract
We present a rich type system with subtyping for an extension of System F. Our type constructors include sum and product types, universal and existential quantifiers, inductive and coinductive types. The latter two size annotations allowing the preservation of size invariants. For example it is possible to derive the termination of the quicksort by showing that partitioning a list does not increase its size. The system deals with complex programs involving mixed induction and coinduction, or even mixed (co-)induction and polymorphism (as for Scott-encoded datatypes). One of the key ideas is to completely separate the induction on sizes from the notion of recursive programs. We use the size change principle to check that the proof is well-founded, not that the program terminates. Termination is obtained by a strong normalization proof. Another key idea is the use symbolic witnesses to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
