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
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

05/13/2021

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

Type systems for concurrent programs guarantee such desirable properties...
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...
04/06/2019

System FR as Foundations for Stainless

We present the design, implementation, and foundation of a verifier for ...
02/12/2021

Complete Bidirectional Typing for the Calculus of Inductive Constructions

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

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

When designing languages for functional reactive programming (FRP) the m...
02/17/2018

Design and Implementation of the Andromeda Proof Assistant

Andromeda is an LCF-style proof assistant where the user builds derivabl...
07/02/2021

Dependent Type Systems as Macros

We present Turnstile+, a high-level, macros-based metaDSL for building d...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.