Published November 8, 2022 | Version v1.1
Software Open

Agda code accompanying the paper "Locally Nameless Sets"

Authors/Creators

  • 1. University of Cambridge

Description

The zip archive locns-agda.zip contains code for Agda (version 2.6.2.2) that was used to develop the theory of locally nameless sets and to check some of the proofs in the paper

Andrew M. Pitts. 2023. Locally Nameless Sets. Proc. ACM Program. Lang. 7, POPL, Article 17 (January 2023), 27 pages. https://doi.org/10.1145/3571210

The root is the file Everything.agda (for browsable code start at html/Everything.html). A browsable version of the code is also available at https://amp12.github.io/LocallyNamelessSets/.

The code mainly targets proofs that involve equational reasoning combined with the use of atoms and indices that are sufficiently fresh (via cofinite quantification). Some of these proofs involve a lot of nested case analysis on elements of sets with decidable equality (atoms and indices); some of the equational axioms are unfamiliar-looking and combinatorially complicated; and it is easy to forget to check necessary freshness conditions are satisfied when doing informal proofs. For all these reasons the use of an interactive theorem prover to produce machine-checked proofs was essential to gain assurance that the results in the paper are correct.

The Agda code is stand-alone: some standard definitions (that might otherwise be called from the Agda Standard Library) are collected in the file Prelude.agda. The last part of the development requires function extensionality, which we postulate in the file FunExt.agda.

Files

locns-agda.zip

Files (365.3 kB)

Name Size Download all
md5:c43d9abb24057e50c20da4f0ab747f5a
365.3 kB Preview Download