The Marriage of Univalence and Parametricity

09/11/2019
by   Nicolas Tabareau, et al.
0

Reasoning modulo equivalences is natural for everyone, including mathematicians. Unfortunately, in proof assistants based on type theory, equality is appallingly syntactic and, as a result, exploiting equivalences is cumbersome at best. Parametricity and univalence are two major concepts that have been explored to transport programs and proofs across type equivalences, but they fall short of achieving seamless, automatic transport. This work first clarifies the limitations of these two concepts in isolation, and then devises a fruitful marriage between both. The resulting concept, univalent parametricity, is an heterogeneous extension of parametricity strengthened with univalence that fully realizes programming and proving modulo equivalences. In addition to the theory of univalent parametricity, we present a lightweight framework implemented in Coq that allows the user to transparently transfer definitions and theorems for a type to an equivalent one, as if they were equal. For instance, this makes it possible to conveniently switch between an easy-to-reason-about representation and a computationally-efficient representation, as soon as they are proven equivalent. The combination of parametricity and univalence supports transport à la carte: basic univalent transport, which stems from a type equivalence, can be complemented with additional proofs of equivalences between functions over these types, in order to be able to lift more programs and proofs, as well as to yield more efficient terms. We illustrate the use of univalent parametricity on several examples, including a recent integration of native integers in Coq.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 14

page 34

page 36

09/02/2020

Check Your (Students') Proofs-With Holes

Cyp (Check Your Proofs) (Durner and Noschinski 2013; Traytel 2019) verif...
08/07/2017

Deriving Law-Abiding Instances

Liquid Haskell's refinement-reflection feature augments the Haskell lang...
10/31/2018

Bisimulation as path type for guarded recursive types

In type theory, coinductive types are used to represent processes, and a...
04/08/2021

First-order natural deduction in Agda

Agda is a dependently-typed functional programming language, based on an...
10/02/2020

Proof Repair Across Type Equivalences

We describe a new approach to automatically repairing broken proofs in t...
01/10/2019

PML 2 : Integrated Program Verification in ML

We present the PML 2 language, which provides a uniform environment for ...
09/11/2020

Internalizing Representation Independence with Univalence

In their usual form, representation independence metatheorems provide an...

Code Repositories

univalent_parametricity

Univalent Parametricity for Effective Transport


view repo
This week in AI

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