{"id":13993192,"url":"https://github.com/annenkov/two-level","last_synced_at":"2025-04-22T13:55:28.473Z","repository":{"id":66326929,"uuid":"90484824","full_name":"annenkov/two-level","owner":"annenkov","description":"Two-Level Type Theory","archived":false,"fork":false,"pushed_at":"2019-12-13T20:39:18.000Z","size":155,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-25T04:26:24.120Z","etag":null,"topics":["formalization","homotopy-type-theory","lean","proof-assistant","type-theory"],"latest_commit_sha":null,"homepage":null,"language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/annenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-05-06T19:02:56.000Z","updated_at":"2023-12-03T07:23:46.000Z","dependencies_parsed_at":"2024-01-18T04:25:47.836Z","dependency_job_id":null,"html_url":"https://github.com/annenkov/two-level","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annenkov%2Ftwo-level","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annenkov%2Ftwo-level/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annenkov%2Ftwo-level/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annenkov%2Ftwo-level/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/annenkov","download_url":"https://codeload.github.com/annenkov/two-level/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250254744,"owners_count":21400408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formalization","homotopy-type-theory","lean","proof-assistant","type-theory"],"created_at":"2024-08-09T14:02:15.976Z","updated_at":"2025-04-22T13:55:28.454Z","avatar_url":"https://github.com/annenkov.png","language":"Lean","funding_links":[],"categories":["Lean"],"sub_categories":[],"readme":"# Lean Formalisation of Two-Level Type Theory\n\nFiles in the `2ltt` directory:\n\n| File | |\n|--------------------|:--------------------------------------------------------------------:\n| fibrant.lean        | implementation of the two-level type theory\n| finite.lean         | facts about finite sets and categories with a finite set of objects\n| limit.lean          | definition of limits and construction of limits in category of pretypes\n| inverse.lean        | definition of inverse categories (Section 4.2)\n| 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.\n| matching.lean       | definition of the matching object (Section 4.3)\n| matching_facts.lean | facts about the matching object from the category C with one object removed\n| fibrantlimits_aux.lean  | auxiliary lemmas for the proof of the fibrant limits theorem including equivalences forming the core of the proof\n| fibrantlimits.lean  | a proof of the fibrant limit theorem (Section 4.3, Theorem 4.8.)\n| simplicial.lean     | initial definition of semi-simplicial types (work in progress)\n| facts.lean          | some auxiliary lemmas which we could not find in the standard library\n| types/*             | some examples of reasoning in the inner (fibrant) theory. Mainly, ported from the Lean 2 HoTT library.\n\n## Compilation\n\nRequires Lean 2 (version 0.2.0) to compile.\n\nLean 2 installation instructions in Ubuntu : https://github.com/leanprover/lean2/blob/master/doc/make/ubuntu-12.04-detailed.md\n\nAfter 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.\n\nUse your favorite editor to navigate the source code (see some hints about emacs lean-mode blow).\n\n### Using Docker\n\nAlternatively, 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.\n\nSteps to build a Docker image:\n* In the terminal, go to the directory containing the development and run `make docker`\n* After building step is complete (this might take some time), run `make run-image` to connect your current terminal session to the container.\n* In the container, type `emacs /root/2ltt/fibrantlimits.lean` to start editing `fibrantlimits.lean` with the lean-mode in Emacs.\n\n\n### Interacting with the Lean development in the Docker image\n\nAs 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. \nUse \u003ckbd\u003eC-c C-g\u003c/kbd\u003e to show goal in tactic proof, \u003ckbd\u003eC-c C-p\u003c/kbd\u003e to print information about identifier, \u003ckbd\u003eC-c C-t\u003c/kbd\u003e to show type, and \u003ckbd\u003eC-c C-l\u003c/kbd\u003e to comple a lean file.\n\nAlternatively, one can use the command line to compile the project or individual files:\n\n* After executing `make run-image`, change directory (in the Ubuntu's command line) to our Lean development `cd /root/2ltt`.\n* Run `make clean` to clean previously compiled files\n* Run `make` again to rebuild the project.\n* Individual files can be compiled using `lean \u003cfilename.lean\u003e`.\n\nThe 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`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannenkov%2Ftwo-level","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fannenkov%2Ftwo-level","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannenkov%2Ftwo-level/lists"}