Practical Sized Typing for Coq

12/11/2019
by   Jonathan Chan, et al.
0

Termination of recursive functions and productivity of corecursive functions are important for maintaining logical consistency in proof assistants. However, contemporary proof assistants, such as Coq, rely on syntactic criteria that prevent users from easily writing obviously terminating or productive programs, such as quicksort. This is troublesome, since there exist theories for type-based termination- and productivity-checking. In this paper, we present a design and implementation of sized type checking and inference for Coq. We extend past work on sized types for the Calculus of (Co)Inductive Constructions (CIC) with support for global definitions found in Gallina, and extend the sized-type inference algorithm to support completely unannotated Gallina terms. This allows our design to maintain complete backward compatibility with existing Coq developments. We provide an implementation that extends the Coq kernel with optional support for sized types.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/13/2021

Circular Proofs as Processes: Type-Based Termination via Arithmetic Refinements

Type systems for concurrent programs guarantee such desirable properties...
research
10/11/2017

Consistency of the Predicative Calculus of Cumulative Inductive Constructions (pCuIC)

In order to avoid well-know paradoxes associated with self-referential d...
research
04/06/2019

System FR as Foundations for Stainless

We present the design, implementation, and foundation of a verifier for ...
research
09/15/2023

Dependent Type Refinements for Futures

Type refinements combine the compositionality of typechecking with the e...
research
02/12/2021

Complete Bidirectional Typing for the Calculus of Inductive Constructions

This article presents a bidirectional type system for the Calculus of In...
research
03/06/2020

Diamonds are not forever: Liveness in reactive programming with guarded recursion

When designing languages for functional reactive programming (FRP) the m...
research
10/21/2020

On the Semantic Expressiveness of Recursive Types

Recursive types extend the simply-typed lambda calculus (STLC) with the ...

Please sign up or login with your details

Forgot password? Click here to reset