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\"of 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.
翻译:Agda Universal Algebra图书馆(Agda-algebras)是我们利用Agda编程语言和证明助理,为正式确定依赖型理论中通用代数基础而开发的一种类型和方案(理论和证据)图书馆,我们利用Agda编程语言和证明助理,在本文中引用和解释Agda-algebras图书馆的许多组成部分,我们将其提取成一个单一的Agda模块,以展示Birkhoff在Martin-L\"依赖型理论中自成一体的正式和建设性证明Birkhoff的HSP理论。在我们介绍过程中,我们强调将基本定义和通用代数理论理论正规化的一些更具挑战性的方面。然而,我们希望本文和Agda-algebras图书馆作为进一步的证据,支持以下主张:尽管依赖型理论和Agda语言对用户提出了技术要求,但能够让具有足够耐心和决心与证据助理正式核实其结果的数学家(例如我们自己)工作。事实上,从现在的、表明和显示普遍逻辑结构的源、从现在的证明和从现在的证明和标志结构中看出的图书馆的典型的典型的分类和标志性结构的收藏收藏收藏收藏,包括大量的典型的典型和标志和标志。