A Reasonably Gradual Type Theory

09/02/2022
by   Kenji Maillard, et al.
0

Gradualizing the Calculus of Inductive Constructions (CIC) involves dealing with subtle tensions between normalization, graduality, and conservativity with respect to CIC. Recently, GCIC has been proposed as a parametrized gradual type theory that admits three variants, each sacrificing one of these properties. For devising a gradual proof assistant based on CIC, normalization and conservativity with respect to CIC are key, but the tension with graduality needs to be addressed. Additionally, several challenges remain: (1) The presence of two wildcard terms at any type-the error and unknown terms-enables trivial proofs of any theorem, jeopardizing the use of a gradual type theory in a proof assistant; (2) Supporting general indexed inductive families, most prominently equality, is an open problem; (3) Theoretical accounts of gradual typing and graduality so far do not support handling type mismatches detected during reduction; (4) Precision and graduality are external notions not amenable to reasoning within a gradual type theory. All these issues manifest primally in CastCIC, the cast calculus used to define GCIC. In this work, we present an extension of CastCIC called GRIP. GRIP is a reasonably gradual type theory that addresses the issues above, featuring internal precision and general exception handling. GRIP features an impure (gradual) sort of types inhabited by errors and unknown terms, and a pure (non-gradual) sort of strict propositions for consistent reasoning about gradual terms. Internal precision supports reasoning about graduality within GRIP itself, for instance to characterize gradual exception-handling terms, and supports gradual subset types. We develop the metatheory of GRIP using a model formalized in Coq, and provide a prototype implementation of GRIP in Agda.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/27/2021

Normalization for Cubical Type Theory

We prove normalization for (univalent, Cartesian) cubical type theory, c...
research
01/02/2019

Parametric Cubical Type Theory

We exhibit a computational type theory which combines the higher-dimensi...
research
05/22/2020

Internal Parametricity for Cubical Type Theory

We define a computational type theory combining the contentful equality ...
research
02/11/2022

An inductive-recursive universe generic for small families

We show that it is possible to construct a universe in all Grothendieck ...
research
11/20/2020

Gradualizing the Calculus of Inductive Constructions

Acknowledging the ordeal of a fully formal development in a proof assist...
research
02/22/2012

A Bi-Directional Refinement Algorithm for the Calculus of (Co)Inductive Constructions

The paper describes the refinement algorithm for the Calculus of (Co)Ind...
research
09/08/2020

On principal types and well-foundedness of terms in ECC

When we investigate a type system, it is helpful if we can establish the...

Please sign up or login with your details

Forgot password? Click here to reset