A Machine-checked proof of Birkhoff's Variety Theorem in Martin-Löf Type Theory

William DeMeo, Jacques Carette
1/25/2021
cs.LOmath.LO

Official code: ualib/agda-algebras (50 stars, Apache-2.0, last commit 2026-10-16). 1 more implementation below.

Abstract

The Agda Universal Algebra Library (agda-algebras) is a library of types and programs (theorems and proofs) we developed to formalize the foundations of universal algebra in dependent type theory using the Agda programming language and proof assistant. In this paper we draw on and explain many components of the agda-algebras library, which we extract into a single Agda module in order to present a self-contained formal and constructive proof of Birkhoff's HSP theorem in Martin-Löf dependent type theory. In the course of our presentation, we highlight some of the more challenging aspects of formalizing the basic definitions and theorems of universal algebra in type theory. Nonetheless, we hope this paper and the agda-algebras library serve as further evidence in support of the claim that dependent type theory and the Agda language, despite the technical demands they place on the user, are accessible to working mathematicians (such as ourselves) who possess sufficient patience and resolve to formally verify their results with a proof assistant. Indeed, the agda-algebras library now includes a substantial collection of definitions, theorems, and proofs from universal algebra, illustrating the expressive power of inductive and dependent types for representing and reasoning about general algebraic and relational structures.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

The Agda Universal Algebra Library (html docs available at the url below)

508Nix, ShellApr 22, 20216 days agoApache-2.0
agdaagda-librarydependent-typesfoundationslogic+3 more
CC-BY-SA-4.0

The Agda Universal Algebra Library (UALib) is a library of types and programs (theorems and proofs) that formalizes the foundations of universal algebra in dependent type theory using the Agda proof assistant language.

202CSS, TeXMar 3, 20214 years agoCC-BY-SA-4.0
agdaagda-libraryagda-ualibdependent-typesformalization+3 more

Similar Papers

Cite this paper

@article{demeo2021machinechecked,
  title  = {A Machine-checked proof of Birkhoff's Variety Theorem in Martin-Löf Type Theory},
  author = {William DeMeo and Jacques Carette},
  year   = {2021},
  eprint = {2101.10166},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.10166}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2101.10166.svg)](https://codeofpaper.com/paper/2101.10166)

Discussion