GithubHelp home page GithubHelp logo

annenkov / two-level Goto Github PK

View Code? Open in Web Editor NEW
27.0 5.0 1.0 155 KB

Two-Level Type Theory

Makefile 0.33% Lean 96.81% Shell 0.05% Dockerfile 1.63% Emacs Lisp 1.18%
type-theory homotopy-type-theory proof-assistant formalization lean

two-level's Introduction

Lean Formalisation of Two-Level Type Theory

Files in the 2ltt directory:

File
fibrant.lean implementation of the two-level type theory
finite.lean facts about finite sets and categories with a finite set of objects
limit.lean definition of limits and construction of limits in category of pretypes
inverse.lean definition of inverse categories (Section 4.2)
pullbacks.lean definition of a pullback, constructed explicitly and using the limit of a diagram along with a proof these definitions are equivalent. Proof of that fibrations are closed under pullbacks.
matching.lean definition of the matching object (Section 4.3)
matching_facts.lean facts about the matching object from the category C with one object removed
fibrantlimits_aux.lean auxiliary lemmas for the proof of the fibrant limits theorem including equivalences forming the core of the proof
fibrantlimits.lean a proof of the fibrant limit theorem (Section 4.3, Theorem 4.8.)
simplicial.lean initial definition of semi-simplicial types (work in progress)
facts.lean some auxiliary lemmas which we could not find in the standard library
types/* some examples of reasoning in the inner (fibrant) theory. Mainly, ported from the Lean 2 HoTT library.

Compilation

Requires Lean 2 (version 0.2.0) to compile.

Lean 2 installation instructions in Ubuntu : https://github.com/leanprover/lean2/blob/master/doc/make/ubuntu-12.04-detailed.md

After installing Lean 2, in the terminal, go to the directory containing the development and use make to compile the project, or run go to the 2ltt folder and run linja directly.

Use your favorite editor to navigate the source code (see some hints about emacs lean-mode blow).

Using Docker

Alternatively, use Docker image. The image is based on Ubuntu and contains Lean 2, our development and Emacs with lean-mode, allowing to navigate through the development and compile it.

Steps to build a Docker image:

  • In the terminal, go to the directory containing the development and run make docker
  • After building step is complete (this might take some time), run make run-image to connect your current terminal session to the container.
  • In the container, type emacs /root/2ltt/fibrantlimits.lean to start editing fibrantlimits.lean with the lean-mode in Emacs.

Interacting with the Lean development in the Docker image

As we have said before, the docker image comes with Emacs and lean-mode. The lean-mode provides syntax highlighting and allows to interactively develop proofs. Use C-c C-g to show goal in tactic proof, C-c C-p to print information about identifier, C-c C-t to show type, and C-c C-l to comple a lean file.

Alternatively, one can use the command line to compile the project or individual files:

  • After executing make run-image, change directory (in the Ubuntu's command line) to our Lean development cd /root/2ltt.
  • Run make clean to clean previously compiled files
  • Run make again to rebuild the project.
  • Individual files can be compiled using lean <filename.lean>.

The image comes with the preinstalled nano editor that can be used to view/edit the source files (but without syntax highlighting). Other editors can be installed, if required, using the apt-get command. For example, apt-get install vim.

two-level's People

Contributors

annenkov avatar nicolaikraus avatar pcapriotti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

5ht

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.