Formal polytypic programs and proofs

2Citations
Citations of this article
5Readers
Mendeley users who have this article in their library.

Abstract

The aim of our work is to be able to do fully formal, machine verified proofs over Generic Haskell-style polytypic programs. In order to achieve this goal, we embed polytypic programming in the proof assistant Coq and provide an infrastructure for polytypic proofs. Polytypic functions are reified within Coq as a datatype and can then be specialized by applying a dependently typed term specialization function. Polytypic functions are thus first class citizens and can be passed as arguments or returned as results. Likewise, we reify polytypic proofs as a datatype, and provide a lemma that a polytypic proof can be specialized to any datatype in the universe. The correspondence between polytypic functions and their polytypic proofs is very clear: programmers need to give proofs for, and only for, the same cases that they need to give instances for when they define the polytypic function itself. Finally, we discuss how we can write (co)recursive functions and do (co)recursive proofs in a similar way that recursion is handled in Generic Haskell. Copyright © 2010 Cambridge University Press.

Cite

CITATION STYLE

APA

Verbruggen, W., De Vries, E., & Hughes, A. (2010). Formal polytypic programs and proofs. Journal of Functional Programming, 20(3–4), 213–269. https://doi.org/10.1017/S0956796810000158

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free