Abstract

We define the exceptional translation, a syntactic translation of the Calculus of Inductive Constructions (CIC) into itself, that covers full dependent elimination. The new resulting type theory features call-by-name exceptions with decidable type-checking and canonicity, but at the price of inconsistency. Then, noticing parametricity amounts to Kreisel's realizability in this setting, we provide an additional layer on top of the exceptional translation in order to tame exceptions and ensure that all exceptions used locally are caught, leading to the parametric exceptional translation which fully preserves consistency. This way, we can consistently extend the logical expressivity of CIC with independence of premises, Markov's rule, and the negation of function extensionality while retaining η-expansion. As a byproduct, we also show that Markov's principle is not provable in CIC. Both translations have been implemented in a Coq plugin, which we use to formalize the examples.

Highlights

  • Monadic translations constitute a canonical way to add effects to pure functional languages [1]

  • – We show that Markov’s rule is admissible in Calculus of Inductive Constructions (CIC). – We show that definitional η-expansion together with the negation of function extensionality is admissible in CIC. – We show that there exists a syntactical model of CIC that validates the independence of premises and use it to recover the recent result of Coquand and Mannaa [7], i.e., that Markov’s principle is not provable in CIC. – We provide a Coq plugin2 that implements both translations and with which we have formalized all the examples

  • The parametric exceptional translation allows to extend the logical expressivity of CIC in the following ways, which we develop in the remainder of this section

Read more

Summary

Introduction

Monadic translations constitute a canonical way to add effects to pure functional languages [1] Until recently, this technique was not available for type theories such as CIC because of complex interactions with dependency. We have a sound logical framework to prove safety properties about impure dependently-typed programs We push this technique further by noticing that parametricity provides a systematic way to describe that a term is not allowed to produce uncaught exceptions, bridging the gap between Kreisel’s modified realizability [4] and parametricity inside type theory [5]. – We describe the exceptional translation, the first monadic translation for the error monad for CIC, including strong elimination of inductive types, resulting in a sound logical framework to reason about impure dependently-typed programs.

Adding Exceptions to CCω
Exceptional Inductive Types
Flirting with Inconsistency
Living in an Exceptional World
Kreisel Meets Martin-Löf
Exceptional Parametricity in a Negative World
Exceptional Parametric Translation of CIC
Meta-Theoretical Properties of TEp
Effectively Extending CIC
Markov’s Rule
Function Intensionality with η-expansion
Independence of Premise
Non-provability of Markov’s Principle
Negative Records
Impredicative Universe
Implementation as a Coq Plugin
Usecase: A Cast Framework
Related Work
Conclusion and Future Work
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call