coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Kevin Buzzard <kevin.m.buzzard AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Fwd: "Lean is like Coq but better"
- Date: Mon, 6 Jan 2020 20:56:42 +0000
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=kevin.m.buzzard AT gmail.com; spf=Pass smtp.mailfrom=kevin.m.buzzard AT gmail.com; spf=None smtp.helo=postmaster AT mail-ot1-f53.google.com
- Ironport-phdr: 9a23:v5gTfxH4+Cyztyq7k61l8J1GYnF86YWxBRYc798ds5kLTJ7zr8WwAkXT6L1XgUPTWs2DsrQY0rGQ6f24EjVcut6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vIhi6txvdu8kKjYdtN6o8xRXEqWZUdupLwm9lOUidlAvm6Meq+55j/SVQu/Y/+MNFTK73Yac2Q6FGATo/K2w669HluhfFTQuU+3sTSX4WnQZSAwjE9x71QJH8uTbnu+Vn2SmaOcr2Ta0oWTmn8qxmRgPkhDsBOjUk927Zl9FwjLlDoB2/uxN/34DaYIaQNPVkf6Pde84RSW5OU8tVUiBMBJ63YYkSAOobJetXoIf9qFkOoxWwBgeiGf3hxSNTi3DswaE3yf4sHR3a0AEiGd8FrXTarM/yNKcXSe27ybfHzSvCb/NQxDzw9ZXIcxEgoP6WR7J/bNfaxE4sFwzbkFWQqIrlMymQ1ugXqGeb8uthVOO1hG49tg58uTevxsI2hYnIgoIZ0EzL9SJ8wIssI9CzVUB1YdmhEJRKtiGaMZN7QsY6Q2FpoSo60bMHuYWhcCgN0pQnyAbTa/2dc4iJ7BLvTuiRIS1giHJqebK/mxay8VW7xeHmV8m0105GoTdCktnNrHwN0AbT6sefRvty/0ehxTaP1x3I5e1ePU80kq/bJpg8ybAzjpoeqVrPEjPylUnsj6Kbdl8o9va15+j7eLnrppGROolpgQ/kKKsugNawAeEgPwgOQWeb/eO82aXm/ULjQbVKiuQ6kq7FsJzHPMgbqK60DgFP3oYs7Ba/CDim0NAGknUdMF1FfxeHg5DoO1HIPv/4Ee+yj0qwnDpv3fzLPb3sDo/TInTejLvtZ7Zw5kBExAo2199f5pZUCr8bIPL0X0/8rN/YAQEnMwy1xebrEtB92pkFVmKSA66YMbndsUWV6e80LOmMYZUauDf5K/Q/+/Huino5lUcHfaa1xZsXdGy4HvN+LkqFZnrsm84NHnsOvgojV+Pnk0aCUD5WZ3aqRa0w/DA7CIS8DYfCXI+hmrKB3D3oVqFRM2tBExWHFWriX4SCQfYFLiyIceF7lTlRdrW/Solp/wy8pgbgx/IzLefK+ytesNTpycpn7vffvR43/D1wSc+a1jfeHClPgmoUSmpuj+hEqktnxwLfgPEl0cwdLsRa4rZyail/NZPYyLYnWdX7WwaEecvQDVj7GZOpBjY+St93yNgLMR4kSoeSyyvb1i/vOIc70rmCBZg66KXZhiGjKMN0ynKA364k3QB/Hpl/cFa+j6s6zDD9QpbTmhzAxamvfKUYmiXK8TXbwA==
Yes, Diaconescu is formalised in the Lean standard library and this is how excluded middle is proved in Lean: https://leanprover.github.io/theorem_proving_in_lean/axioms_and_computation.html#the-law-of-the-excluded-middle
While I'm here let me respond to something Thorsten said:
> Now let me get to the point that most Mathematicians are not aware of
constructive Mathematics. This may well be true but does this mean that
they are right and that constructive Mathematics is irrelevant for
Mathematics? This seems rather a sociologically
issue than anything else. And fashions can change faster than you think
especially once a new generation of Mathematicians take over who are
not only influenced by the older Mathematicians but who are often also
excellent programmers acquiring new intuitions.
To not educate them as well in constructive Mathematics reflecting
these intuitions is a criminal omission.
It is certainly true, and I would also argue that the law of the excluded middle is completely embedded in "Fields Medal mathematics". The bright young mathematicians look up to the Fields Medallists, and are taught on day one that Prop = bool and hence that the law of the excluded middle is an axiom. This will be an extremely hard cycle to break. I agree that young people are more and more coming into mathematics departments with a knowledge of programming and this is what I want to tap into, but rejecting LEM would not be a suggestion which would be taken seriously by anybody in our department. In fact I do not know of a mathematics department anywhere in the world where undergraduates are not told that LEM is true right from the start, and most lecturers. It would be interesting to find examples of International Mathematical Olympiad questions which would be unsolvable without LEM.
Kevin
On Mon, 6 Jan 2020 at 09:40, Bas Spitters <b.a.w.spitters AT gmail.com> wrote:
Thanks for the summary.
Do I understand correctly that the formulation of lean's choice
implies excluded middle (by Diaconescu) ?
About ad-hoc polymorphism: it has been done in coq in two ways:
canonical structures (Gonthier, Ziliani, Nanevski, Dreyer, How to make
ad hoc proof automation less ad hoc,
https://people.mpi-sws.org/~beta/lessadhoc/)
type classes (Bas Spitters and Eelis van der Weegen, Type Classes for
Mathematics in Type Theory,
http://dx.doi.org/10.1017/S0960129511000119)
On Sat, Jan 4, 2020 at 6:43 AM Ramkumar Ramachandra <artagnon AT gmail.com> wrote:
>
> Lean has much lower startup-cost for pure mathematicians, since the built-in features and mathlib are great for doing undergraduate-level group theory & topology, masters-level commutative algebra & category theory, but I think it plateaus quickly thereafter; future releases of Lean will probably fix this.
>
> Lean seems to have taken a top-down approach, by focusing on writing real proofs as quickly as possible, without compromising soundness [https://github.com/digama0/lean-type-theory/releases/tag/v1.0]. There are three axioms in Lean: propositional extensionality, quotient soundness, and choice; however, these don’t block computation, since computation is done by a VM. However, they break good type theoretic properties like strong normalization, subject reduction, and canonicity — this was a conscious design choice, and they decided that these properties weren’t as important to working mathematicians.
>
> Coq, on the other hand, has always been very particular about sound type theoretic foundations. The recent “Coq Coq Correct!” paper [https://www.irif.fr/~sozeau/research/publications/drafts/Coq_Coq_Correct.pdf] proves various metatheoretic properties of the Coq engine.
>
> Lean supports both constructive and classical reasoning, but I’m hoping HoTT will be integrated into mainline Coq and solve most of the setoid-related issues (not that I understand much about it).
>
> One would think that Lean is an engineering feat, since it’s written in C++ (and lean4 is written mostly in C): math-comp is 90k loc, while mathlib is 150k loc; and it takes over thirty minutes to build mathlib! Coq is much faster.
>
> Quotients are indeed a great feature to have, and makes formalizing commutative algebra painless; an example [https://github.com/leanprover-community/mathlib/blob/master/docs/tutorial/Zmod37.lean] of using quotients in Lean. However, quotients are tricky to implement without breaking certain metatheoretic properties that Coq’ers cherish, which is why it hasn’t been implemented yet.
>
> Lean’s inheritance [https://leanprover.github.io/theorem_proving_in_lean/structures_and_records.html#inheritance] is another good feature; it disallows diamond-inheritance, and seems like a bit of a hack, but Coq should definitely get some form of a well-thought-out ad-hoc polymorphism.
>
> Category theory in Lean has not been developed [https://github.com/leanprover-community/mathlib/blob/master/docs/theories/category_theory.md] with higher categories in mind; I’m not sure how one would define ∞-categories, since universes are explicit, and since there are no coinductive types: Coq’s impredicativity seems to be a better design choice.
>
> Footnote. Metamath Zero [https://github.com/digama0/mm0] might be of interest to the Coq community for high-performance checking.
>
> Ram
- [Coq-Club] "Lean is like Coq but better", Bas Spitters, 01/02/2020
- Re: [Coq-Club] "Lean is like Coq but better", Timothy Carstens, 01/02/2020
- Re: [Coq-Club] "Lean is like Coq but better", Kevin Buzzard, 01/02/2020
- [Coq-Club] Fwd: "Lean is like Coq but better", Kevin Buzzard, 01/02/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Gaëtan Gilbert, 01/03/2020
- Message not available
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Ramkumar Ramachandra, 01/04/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Bas Spitters, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Kevin Buzzard, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Stefan Monnier, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Bas Spitters, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Xuanrui Qi, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Bas Spitters, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Ramkumar Ramachandra, 01/04/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Thorsten Altenkirch, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Ramkumar Ramachandra, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", jonikelee AT gmail.com, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Mario Carneiro, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", jonikelee AT gmail.com, 01/08/2020
- Message not available
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Gaëtan Gilbert, 01/03/2020
- [Coq-Club] Fwd: "Lean is like Coq but better", Kevin Buzzard, 01/02/2020
- Re: [Coq-Club] "Lean is like Coq but better", Kevin Buzzard, 01/02/2020
- Re: [Coq-Club] "Lean is like Coq but better", Timothy Carstens, 01/02/2020
Archive powered by MHonArc 2.6.18.