Coder Social home page Coder Social logo

agda-universal-algebra's Introduction

*** Formalization of Universal Algebra in Agda ***

This development corresponds to the formalization of Universal Algebra in Agda, accepted for presentation in LSFA 2017.

This README file contains instructions to install agda and compile the library, and a description of the modules.

** Installation **

The formalization was tested on Ubuntu with Agda 2.5.2 installed and the standard library version 0.13.

  • How to install agda (using cabal) with emacs, and the standard library in Ubuntu:
  • Install emacs.
  • Install 'Haskell platform' using apt-get: $ apt-get install haskell-platform
  • Install 'cpphs' using cabal: $ cabal install cpphs
  • Install 'agda' using cabal: $ cabal install agda
  • Download the standard library version 0.13 from https://github.com/agda/agda-stdlib/archive/v0.13.tar.gz
  • Unpack the tar.gz file to somewhere, say '~/.agda/agda-stdlib-0.13'.
  • Create the file '~/.agda/libraries' and put the text: /.agda/agda-stdlib-0.13/standard-library.agda-lib (replace folder '/.agda/agda-stdlib-0.13' if it corresponds).
  • Create the file '~/.agda/defaults' with the line: standard-library
  • Edit file .emacs. Put the following text: (load-file (let ((coding-system-for-read 'utf-8)) (shell-command-to-string "agda-mode locate")))

** Modules **

The formalization is modularized in these files:

  • Setoids.agda Definitions and properties about setoids.
  • HeterogeneousVec.agda Definition, operations, and properties of heterogeneous vectors.
  • UnivAlgebra.agda Basic definitions of Heterogeneous Universal Algebra: Signature, Algebra, Homomorphism, Congruence, Quotient, Subalgebra.
  • Morphisms.agda Definitions of Homomorphism, Homo composition and equality, Isomorphism, Initial and Final Algebras, Homomorphic image and Kernel of a congruence.
  • IsoTheorems.agda Proofs of the three isomorphism theorems.
  • TermAlgebra.agda Definition of the term algebra of a signature and proof of initiality.
  • SigMorphism.agda Definition of derived signature morphisms and reduct algebras. Translation of terms and theories.
  • Equational.agda Formalization of conditional equational logic: Signature with variables, equations, environments, proofs, models, proof of Birkhoff soundness and completeness.
  • Examples -- EqBool.agda Definition of two theories of Boolean algebras; translation between them, and preservation of models. -- Monoid.agda Definition of the theory of Monoids. Examples of monoids (as algebras) and a homomorphism between them. Bijection between the standard library definition of monoids and the universal algebra approach.
    -- Group.agda Definition of the theory of Groups, as an extension for the theory of Monoids. -- CompilerArith.agda McCarthy and Painter compiler correct by construction by framing it as a translation of signatures. -- GoguenMeseguer.agda Example taken from the paper “Completeness of many-sorted equational logic” by Goguen and Meseguer. Its first example shows that when defining satisfiablity naively, the deduction system is not sound. As can be seen in this module, our formalization prevents that their example can be completed.

** Using the library **

You can load a file in emacs and type-check it with the command "C-c C-l". Alternatively one uses the type-checker from the command line: $ agda Examples/Monoid.agda

A reference with commands to edit, type check and compile Agda code in emacs is available online: http://agda.readthedocs.io/en/latest/tools/emacs-mode.html

agda-universal-algebra's People

Contributors

manugunther avatar

Watchers

Miguel Pagano avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.