Adventures in Formalisation: Financial Contracts, Modules, and Two-Level Type Theory

11/28/2018
by   Danil Annenkov, et al.
0

We present three projects concerned with applications of proof assistants in the area of programming language theory and mathematics. The first project is about a certified compilation technique for a domain-specific programming language for financial contracts (the CL language). The code in CL is translated into a simple expression language well-suited for integration with software components implementing Monte Carlo simulation techniques (pricing engines). The compilation procedure is accompanied with formal proofs of correctness carried out in Coq. The second project presents techniques that allow for formal reasoning with nested and mutually inductive structures built up from finite maps and sets. The techniques, which build on the theory of nominal sets combined with the ability to work with isomorphic representations of finite maps, make it possible to give a formal treatment, in Coq, of a higher-order module system, including the ability to eliminate at compile time abstraction barriers introduced by the module system. The development is based on earlier work on static interpretation of modules and provides the foundation for a higher-order module language for Futhark, an optimising compiler targeting data-parallel architectures. The third project presents an implementation of two-level type theory, a version of Martin-Lof type theory with two equality types: the first acts as the usual equality of homotopy type theory, while the second allows us to reason about strict equality. In this system, we can formalise results of partially meta-theoretic nature. We develop and explore in details how two-level type theory can be implemented in a proof assistant, providing a prototype implementation in the proof assistant Lean. We demonstrate an application of two-level type theory by developing some results on the theory of inverse diagrams using our Lean implementation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/12/2022

Functional Pearl: Dependent type inference via free higher-order unification

Many type theories rely significantly on dependent types. Implementing a...
research
02/17/2018

Design and Implementation of the Andromeda Proof Assistant

Andromeda is an LCF-style proof assistant where the user builds derivabl...
research
11/10/2019

Gemini: A Functional Programming Language for Hardware Description

This paper presents Gemini, a functional programming language for hardwa...
research
04/08/2021

First-order natural deduction in Agda

Agda is a dependently-typed functional programming language, based on an...
research
09/11/2020

Internalizing Representation Independence with Univalence

In their usual form, representation independence metatheorems provide an...
research
09/05/2022

A Formal Theory of Choreographic Programming

Choreographic programming is a paradigm for writing coordination plans f...
research
09/20/2022

Staged Compilation with Two-Level Type Theory

The aim of staged compilation is to enable metaprogramming in a way such...

Please sign up or login with your details

Forgot password? Click here to reset