LLMpediaThe first transparent, open encyclopedia generated by LLMs

Agda

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: lambda calculus Hop 4
Expansion Funnel Raw 51 → Dedup 16 → NER 12 → Enqueued 12
1. Extracted51
2. After dedup16 (None)
3. After NER12 (None)
Rejected: 4 (not NE: 4)
4. Enqueued12 (None)
Agda
NameAgda
ParadigmFunctional programming, Type theory, Proof assistant
DesignerUlf Norell; contributors: Nils Anders Danielsson, Peter Thiemann, Graham Hutton
DeveloperChalmers University of Technology, Uppsala University, University of Gothenburg
First appeared2002
TypingDependent type
Influenced byCurry–Howard correspondence, Martin-Löf type theory, Coq
InfluencedIdris (programming language), Lean (proof assistant), Epigram (programming language)
LicenseMIT License

Agda is a dependently typed functional programming language and interactive proof assistant designed for writing programs and machine-checkable proofs. It integrates a rich type theory-based type system with an editor-oriented development environment, enabling users to develop formalizations across algorithms, lambda calculus encodings, and mathematical theorems. Originating in Scandinavian academic projects, Agda bridges research in constructive mathematics, category theory, and program verification.

History

Agda emerged from research efforts at Chalmers University of Technology and Uppsala University in the early 2000s, building on influences from Martin-Löf, Per Martin-Löf, and the Curry–Howard correspondence. Early implementations and prototypes were shaped by projects at Gothenburg and collaborations with researchers such as Ulf Norell, Nils Anders Danielsson, and Peter Thiemann. Developments in Agda paralleled work on Coq, Isabelle (proof assistant), and Epigram (programming language), while cross-pollination with systems like Lean (proof assistant) and Idris (programming language) affected language features and tooling. Conferences such as ICFP, POPLOG, and LICS provided venues for dissemination; key papers introduced concepts like sized types and interactive tactics influenced by broader trends in constructive type theory.

Features

Agda provides a totality-oriented, dependently typed language with syntax influenced by Haskell (programming language), ML (programming language), and Coq. Core features include interactive proof development via editor integration with tools such as Emacs and Visual Studio Code, pattern matching with coverage checking, and support for inductive and coinductive types. The system emphasizes total functions and termination checking, employing techniques such as sized types and structural recursion. Agda offers Unicode identifiers, mixfix operators, and implicit arguments to concisely express constructions found in homotopy type theory and category theory formalizations. Its interactive mode supports hole-driven development and incremental refinement, drawing workflows similar to those in Proof General and CoqIDE.

Type System and Semantics

Agda's type system is grounded in Martin-Löf type theory with dependent types, universes, inductive families, and pattern-matching elimination principles. It implements a cumulative hierarchy of universes to avoid paradoxes related to self-reference, echoing designs in Coq and Lean (proof assistant). Equality is treated via identity types; users can encode notions from homotopy type theory and reason about paths and higher inductive types. Termination and totality are enforced by structural recursion checks and optional annotations such as sized types, inspired by research from Nils Anders Danielsson and others. Semantically, Agda programs correspond to constructive proofs under the Curry–Howard correspondence, enabling program extraction aligned with constructive mathematics developed by figures like Brouwer and Bishop.

Implementation and Tooling

The reference implementation of Agda is written in Haskell (programming language), leveraging libraries such as Cabal and GHC (Glasgow Haskell Compiler) for distribution and performance. Tooling includes editor plugins for Emacs via the agda-mode package and an extension for Visual Studio Code that integrates with the language server protocol. The interactive development experience provides features like hole refinement, automatic context display, and type-driven refactoring, comparable to systems such as CoqIDE and Isabelle/jEdit. Build and package workflows use Hackage and Stackage conventions; community tooling coordinates through repositories hosted on platforms such as GitHub.

Libraries and Ecosystem

Agda's ecosystem contains libraries for formalized mathematics, category-theoretic constructions, and verified algorithms. Prominent collections include the standard library maintained by Agda contributors with modules covering algebra, order theory, and combinatorics. Research libraries implement formalizations of lambda calculus, automata theory, probability theory, and parts of homotopy type theory. Community contributions and projects hosted on GitHub and discussed at venues like ICFP and TPLP extend support for interoperability with Haskell (programming language) and export mechanisms for extracted code. Educational resources and tutorials arise from courses at Chalmers University of Technology and Uppsala University.

Use Cases and Applications

Agda is used for mechanized proofs in constructive mathematics, formal verification of algorithms and protocols, and exploratory research in type theory and homotopy type theory. Case studies include verified parsers, certified compilers, and formalized proofs of properties in lambda calculus and category theory. Agda serves in teaching advanced topics at universities such as Uppsala University and Chalmers University of Technology, and researchers use it to prototype dependent-type-driven designs that influence languages like Idris (programming language) and Lean (proof assistant).

Compared to Coq, Agda emphasizes a programming-language-like syntax and editor-driven interaction, while both share foundations in Martin-Löf type theory and the Curry–Howard correspondence. Relative to Isabelle (proof assistant), Agda focuses more on dependent types and constructive proofs, whereas Isabelle offers a broader logic framework such as Isabelle/HOL. Against Idris (programming language), Agda prioritizes theorem-proving and totality checking over practical compilation and systems programming targets. Agda's influence extends to Lean (proof assistant) and other dependently typed languages, informing approaches to tactics, elaboration, and library organization.

Category:Programming languages