├── FAQ.md ├── LICENSE └── README.md /FAQ.md: -------------------------------------------------------------------------------- 1 | ## Known Bugs 2 | * variable `a` bug. 3 | * type-class inference has exponential slowdown. 4 | * Lean sometimes crashes on unexpected input. 5 | * type-class inference bugs: [1](https://github.com/leanprover-community/mathlib/issues/1561#issuecomment-543022476) 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a page that lists many useful links related to the [Lean Theorem Prover](http://leanprover.github.io/) 2 | 3 | [***Up to date version of these links***](https://leanprover-community.github.io/links/) 4 | 5 | 17 | 18 | ## Main links 19 | 20 | * [Zulip](https://leanprover.zulipchat.com/): the Lean chatroom. Requires you to create an account. Ask any and all questions in the [new members stream](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members). 21 | * [Mathlib](https://github.com/leanprover-community/mathlib): the main library of Lean. Probably required for any nontrivial Lean project. 22 | * [Lean 3 on Github](https://github.com/leanprover/lean): the official current (frozen) version of Lean. 23 | * [Lean 3 Community Edition](https://github.com/leanprover-community/lean/): a fork of the frozen Lean 3 repository maintained by the mathlib team. 24 | * [Lean 4 on Github](https://github.com/leanprover/lean4): the next version of Lean under development. 25 | * [Leanprover official website](http://leanprover.github.io/). 26 | 27 | ## Try Lean 28 | 29 | * [Try Lean in your browser](https://leanprover.github.io/live/3.4.1/). 30 | * [Try Lean + mathlib in your browser](https://leanprover-community.github.io/lean-web-editor/). 31 | 32 | ## Learn Lean 33 | 34 | * [Kevin Buzzard's natural number game](http://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_game/) is a online interactive tutorial to Lean. 35 | * [Theorem Proving in Lean](https://leanprover.github.io/theorem_proving_in_lean/): a textbook to learn Lean with interactive code snippets. 36 | * [Logic and Proof](https://leanprover.github.io/logic_and_proof/): a textbook that is a first rigorous proving course that teaches Lean at the same time. 37 | * [Logical Verification in Lean (pdf)](https://github.com/blanchette/logical_verification_2019/raw/master/logical_verification_in_lean.pdf): course notes for a [course](https://lean-forward.github.io/logical-verification/2019/index.html) at VU Amsterdam. 38 | * [Video tutorial](https://av-media.vu.nl/VUMedia/Play/27894c3a8a4d4768a0421f62e5345a6c1d) of type theory and Lean. 39 | * [Lean tutorial](https://github.com/leanprover-community/tutorials/blob/master/src/first_proofs.lean): a file with many descriptive comments. 40 | * Ask questions in the [new members stream](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members) on Zulip. 41 | 42 | ## Installation 43 | 44 | You are strongly recommended to follow only the [installation instructions](https://github.com/leanprover-community/mathlib/blob/master/README.md) provided in the mathlib repository. (The installation instructions on the [downloads page](https://leanprover.github.io/download/) are not recommended). Here are the links to the OSs: 45 | * On [Debian-derived Linux](https://github.com/leanprover-community/mathlib/blob/master/docs/install/debian.md) (Debian, Ubuntu, LMDE...) 46 | * On [other Linux](https://github.com/leanprover-community/mathlib/blob/master/docs/install/linux.md) 47 | * On [MacOS](https://github.com/leanprover-community/mathlib/blob/master/docs/install/macos.md) 48 | * On [Windows](https://github.com/leanprover-community/mathlib/blob/master/docs/install/windows.md) 49 | 50 | Don't forget to also follow the instructions on [Lean Projects](https://github.com/leanprover-community/mathlib/blob/master/docs/install/project.md). 51 | 52 | * If you want to compile mathlib yourself (not recommended unless you only want to use very low-level files), you can skip the steps under *Installing mathlib supporting tools*. Compiling all of mathlib will probably take more than an hour. 53 | * If you want to contribute to mathlib, [here](https://github.com/leanprover-community/mathlib/blob/master/docs/contribute/index.md) are some useful pointers. 54 | 55 | ## Reference material 56 | * [Lean Reference Manual](https://leanprover.github.io/reference/). 57 | * [Mathlib documentation](https://leanprover-community.github.io/mathlib_docs/) 58 | * [Lean tactics for Coq users](https://github.com/jldodds/coq-lean-cheatsheet). 59 | * [Tactics in mathlib](https://github.com/leanprover-community/mathlib/blob/master/docs/tactics.md). 60 | 61 | ## Community 62 | * [Zulip](https://leanprover.zulipchat.com/) is a chat room where most of the action happens. 63 | * [leanprover-community website](https://leanprover-community.github.io/). This includes: 64 | - [Zulip archive](https://leanprover-community.github.io/archive/) 65 | - [Mathlib documentation](https://leanprover-community.github.io/mathlib_docs/) 66 | * There are also discussions on the mathlib [issue tracker](https://github.com/leanprover-community/mathlib/issues) and [pull requests](https://github.com/leanprover-community/mathlib/pulls). 67 | * [IMO Grand Challenge](https://imo-grand-challenge.github.io/): a grand challenge to write an AI that can write formal proofs of IMO problems. 68 | 69 | ## FAQs 70 | 71 | * [FAQ of the Lean 3 repository](https://github.com/leanprover/lean/blob/master/doc/faq.md) 72 | * [FAQ in this repository](FAQ.md) (currently empty) 73 | 74 | ## How to Write Lean Tactics 75 | * [Tactics writing tutorial](https://github.com/leanprover-community/mathlib/blob/master/docs/extras/tactic_writing.md) 76 | * [Programming in Lean](https://leanprover.github.io/programming_in_lean): chapters 8 and 9 might be useful if you want to learn to write tactics. 77 | 78 | ## Lean papers 79 | * We provide a [.bib file](lean.bib) which collects Lean-related papers. 80 | * [Official list of publications](https://leanprover.github.io/publications/) 81 | 82 | ### Papers about Lean 83 | * Mario Carneiro. [*The Type Theory of Lean.*](https://github.com/digama0/lean-type-theory/releases) Master thesis, 2019. 84 | * Meta-theoretic properties of Lean 3, including soundness. 85 | * Sebastian Ullrich, Leonardo de Moura. [*Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming.*](https://arxiv.org/abs/1908.05647) preprint 2019. 86 | * Reference counting in Lean 4 ([appendix](https://leanprover.github.io/papers/beans_appendix.pdf), [partial formalization](https://github.com/mhuisi/rc-correctness), [bachelor thesis about partial formalization](https://pp.ipd.kit.edu/uploads/publikationen/huisinga19bachelorarbeit.pdf)). 87 | * Gabriel Ebner, Sebastian Ullrich, Jared Roesch, Jeremy Avigad, and Leonardo de Moura. [*A metaprogramming framework for formal verification.*](https://dl.acm.org/citation.cfm?id=3110278) ICFP 2017. 88 | * Metaprogramming in Lean 3. 89 | * Daniel Selsam and Leonardo de Moura. [*Congruence Closure in Intensional Type Theory.*](https://leanprover.github.io/papers/congr.pdf) IJCAR 2016. 90 | * Congruence closure in Lean 3. 91 | * Leonardo de Moura, Soonho Kong, Jeremy Avigad, Floris van Doorn, Jakob von Raumer. [*The Lean Theorem Prover (System Description).*](https://kilthub.cmu.edu/articles/The_Lean_Theorem_Prover_system_description_/6492815/files/11937416.pdf) CADE 2015. 92 | * System description of Lean 2 93 | * Leonardo de Moura, Jeremy Avigad, Soonho Kong, Cody Roux. [*Elaboration in Dependent Type Theory.*](https://arxiv.org/abs/1505.04324) 2015 (unpublished). 94 | * Elaboration in Lean 2. 95 | 96 | ### Papers using Lean 97 | * The mathlib Community. [*The Lean mathematical library.*](https://arxiv.org/abs/1910.09336) CPP 2020. 98 | * [mathlib](https://github.com/leanprover-community/mathlib) 99 | * Kevin Buzzard, Johan Commelin, Patrick Massot. [*Formalising perfectoid spaces.*](https://arxiv.org/abs/1910.12320) CPP 2020. 100 | * [Formalization](https://github.com/leanprover-community/lean-perfectoid-spaces) 101 | * Jesse Michael Han and Floris van Doorn. [*A Formal Proof of the Independence of the Continuum Hypothesis.*](https://github.com/flypitch/flypitch-cpp-2020/releases/tag/1.0)) CPP 2020. 102 | * [Formalization](https://github.com/flypitch/flypitch) / [Website](https://flypitch.github.io/) 103 | * Sander R. Dahmen, Johannes Hölzl, Robert Y. Lewis. ([Formalizing the Solution to the Cap Set Problem.](https://arxiv.org/abs/1907.01449)) ITP 2019. 104 | * [Formalization](https://github.com/lean-forward/cap_set_problem) 105 | * Minchao Wu and Rajeev Goré. [*Verified decision procedures for modal logics.*](http://drops.dagstuhl.de/opus/volltexte/2019/11086/pdf/LIPIcs-ITP-2019-31.pdf) ITP 2019. 106 | * [Formalization](https://github.com/minchaowu/ModalTab) 107 | * Mario Carneiro. [*Formalizing computability theory via partial recursive functions.*](https://arxiv.org/abs/1810.08380) ITP 2019. 108 | * Formalization in [mathlib/computability](https://github.com/leanprover-community/mathlib/tree/master/src/computability) 109 | * Jesse Michael Han and Floris van Doorn. [*A formalization of forcing and the unprovability of the continuum hypothesis.*](https://arxiv.org/pdf/1904.10570.pdf) ITP 2019. 110 | * [Formalization](https://github.com/flypitch/flypitch) / [Website](https://flypitch.github.io/) 111 | * Jeremy Avigad, Mario Carneiro, and Simon Hudon. [*Data types as quotients of polynomial functors.*](https://www.andrew.cmu.edu/user/avigad/Papers/qpf.pdf) ITP 2019. 112 | * [Formalization](https://github.com/avigad/qpf) 113 | * Juneyoung Lee, Chung-Kil Hur, and Nuno P. Lopes [*AliveInLean: A Verified LLVM Peephole Optimization Verifier.*](https://sf.snu.ac.kr/publications/aliveinlean.pdf)) CAV 2019. 114 | * [Formalization](https://github.com/microsoft/aliveinlean) / [Website](https://sf.snu.ac.kr/aliveinlean/) 115 | * Robert Y. Lewis. [*A formal proof of Hensel's lemma over the p-adic integers.*](https://robertylewis.com/padics/padics.pdf) CPP 2019. 116 | * The [formalization](https://github.com/leanprover-community/mathlib/tree/master/src/data/padics) is part of mathlib. [Website](https://robertylewis.com/padics/). 117 | * Daniel Selsam, Percy Liang, David L. Dill [*Developing Bug-Free Machine Learning Systems With Formal Mathematics.*](https://arxiv.org/abs/1706.08605) ICML 2017. 118 | * [Formalization](https://github.com/dselsam/certigrad) 119 | * Robert Y. Lewis. [*A bi-directional extensible ad hoc interface between Lean and Mathematica.*](https://robertylewis.com/leanmm/lean_mm.pdf)) PxTP 2017. 120 | * [Formalization](https://github.com/robertylewis/mathematica) / [Website](https://robertylewis.com/leanmm/) 121 | 122 | ### Unpublished works using Lean 123 | * Paul-Nicolas Madelaine. [*Arithmetic and Casting in Lean.*](https://lean-forward.github.io/internships/arithmetic_and_casting_in_lean.pdf). Master thesis, 2019. 124 | * A description of the [`norm_cast` tactic](https://github.com/leanprover-community/mathlib/blob/master/src/tactic/norm_cast.lean) in mathlib. 125 | * Neil Strickland, Nicola Bellumat [*Iterated chromatic localisation.*](https://arxiv.org/abs/1907.07801)) arXiv 2019. 126 | * [Formalization](https://github.com/NeilStrickland/itloc) 127 | * Marc Huisinga. [*Formally Verified Insertion of Reference Counting Instructions.*](https://pp.ipd.kit.edu/uploads/publikationen/huisinga19bachelorarbeit.pdf) Bachelor thesis, 2019. 128 | * [Formalization](https://github.com/mhuisi/rc-correctness) 129 | * Ramon Fernández Mir. ([*Schemes in Lean.*](https://www.imperial.ac.uk/media/imperial-college/faculty-of-engineering/computing/public/1819-ug-projects/Fernandez-I-MirR-Schemes-in-Lean.pdf)) project report 2019. 130 | * [Formalization](https://github.com/ramonfmir/lean-scheme) 131 | * More reports/theses are listed on the [Lean Forward project page](https://lean-forward.github.io/#papers). 132 | 133 | ### Main Repositories 134 | * The [core library](https://github.com/leanprover/lean/tree/master/library) ships with Lean. 135 | * [mathlib](https://github.com/leanprover-community/mathlib): main library of Lean. 136 | * [mathlib archive](https://github.com/leanprover-community/mathlib/tree/master/archive): some formalization projects maintained by mathlib maintainers. 137 | 138 | ## Conferences 139 | * [Lean Together 2019](https://lean-forward.github.io/lean-together/2019/) ([recorded videos](https://lean-forward.github.io/lean-together/2019/#videos)) 140 | * [Lean Together 2020](http://www.andrew.cmu.edu/user/avigad/meetings/fomm2020/) 141 | 142 | ## Lean 4 143 | Lean 4 is the next version of Lean. It was made public early 2019, but is still missing certain core features as of October 2019 (such as a tactic framework) 144 | * [Lean 4 on Github](https://github.com/leanprover/lean4): the source code. 145 | * [Lean 4: a guided preview](http://leanprover.github.io/talks/vu2019.pdf): a presentation about Lean 4 at Lean Together 2019. 146 | * [Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming](https://arxiv.org/abs/1908.05647): reference counting in Lean 4. 147 | 148 | 149 | 150 | 151 | ## HoTT in Lean 152 | [Homotopy type theory](https://homotopytypetheory.org/book/) is not actively maintained in Lean. Here are some pointers to past projects: 153 | * The [Lean 2 HoTT library](https://github.com/leanprover/lean2/blob/master/hott/hott.md). 154 | * The [Spectral repository](https://github.com/cmu-phil/Spectral) in Lean 2, doing more synthetic homotopy theory and formalizing the Serre spectral sequence. 155 | * The [Lean 3 HoTT library](https://github.com/gebner/hott3) (much smaller, not officially supported by Lean). 156 | 157 | ### Papers using Lean 2 158 | * [Constructing the Propositional Truncation using Non-recursive HITs](https://arxiv.org/abs/1512.02274) ([code](https://github.com/fpvandoorn/leansnippets/blob/master/cpp.hlean)). 159 | * [The Cayley-Dickson Construction in Homotopy Type Theory](https://arxiv.org/abs/1610.01134) ([code](https://github.com/leanprover/lean2/blob/master/hott/homotopy/imaginaroid.hlean)). 160 | * [The real projective spaces in homotopy type theory](https://arxiv.org/abs/1704.05770) ([code](https://github.com/cmu-phil/Spectral/blob/master/homotopy/realprojective.hlean)). 161 | * [Higher Groups in Homotopy Type Theory](https://arxiv.org/abs/1802.04315) ([code](https://github.com/cmu-phil/Spectral/blob/master/higher_groups.hlean)). 162 | --------------------------------------------------------------------------------