coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Mario Carneiro <di.gama AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Fwd: "Lean is like Coq but better"
- Date: Tue, 7 Jan 2020 21:20:33 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=di.gama AT gmail.com; spf=Pass smtp.mailfrom=di.gama AT gmail.com; spf=None smtp.helo=postmaster AT mail-ot1-f51.google.com
- Ironport-phdr: 9a23:PQJBIxIiGnDJk9E/S9mcpTZWNBhigK39O0sv0rFitYgRL/jxwZ3uMQTl6Ol3ixeRBMOHsqkC0beJ+Py4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCezbL9oMhm7rQfcusYZjId+N6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9g61VoB2jpxJxzY3abpyLOvViZa7SZ88WSHBbU8pNSyBMAIWxZJYPAeobOuZYqpHwqVwUohukBAmsA/7kxyFSiX/s2601zeUhERvB3Ac9GN8BrXXUoM/6NKgIVOC61rLFzTrGb/xM2Df97JLEfQwmofGJRL99d9fax0coFwPAlFqQqIrlMiuP2eQXvGmb7vRgWfioi249pAF9ujevxsYwionJm4Ia0UrI+jl+wIYwI9CzVU11Yca8HZdOqy2XM5F6T8AiTm1ypio216EKtYS7cSQXzpks2gTRZOadc4eS5xLuTOaRLil8hHJiYL+/ggy98UmkyuHlUcm0zEtGojNLktTMq3wBzRPT6s+ASvty+keuxyyD2BzU6uFBOUw0lKzbJIA9wrMoiJYfrUDOEjX1lUj2lqOaaFgo9vSy5+nnf7nqvpqcOJV1igH6PKQugMu/AeEgPwcTXmiX4+u826fm/ULjW7hKgfg2nbPYsJDeP8gUuqm5AwpN3oY59xm/Fyum0MgfnXQfMF1FfwuHg5H1NFHKPfD3Fuyyg0+skTdu3/DJJKftApTLLnjZkbfuZ6xx60BGyFl78dcK7JVNT7oFPfjbW0nrtdWeAAVqHRazxrPCAc980cs1UHiJD66DN+uGvV7O6esqKsGDYYYUvHD2LP1ztK2mtmMwhVJIJfrh5pAQcn3tRq03cXXcWmLlh5I6KUlPuwM/SOLwj1jbCGxcYn+zW+Q34TRpUdv7X7eGfZikhfm65An+HpBSYTobWFWFEHOtcJndHvlRMWSdJchuljFCXr+kGdd4iUOe8TTiwr8iFdL6vzUCvMu6htdw7uzX0xo18G4sAg==
[decloaking from lurker mode to add my $0.02]
Does having LEM built into Lean interfere with the user's ability to exploit the Curry-Howard isomorphism?
If so, that seems like a bad trade off: a small convenience for a
small group of people (Fields Medal wanabees) that imposes a large
inconvenience for a large group of people (software engineers).
I haven't found that Lean's ontology poses any serious issues for writing software, and if anything I think it helps. Lean makes a sharp distinction between data (in Type) and proofs (in Prop), and proofs are erased during code execution. So if you build a sorting function of type forall l : list A, { l2 : list A | l2 is a sorted permutation of l }, then the "list A" part is data, which can be executed assuming it doesn't use the axiom of choice in its definition, and the "l2 is a sorted permutation of l" part is a proof, so it completely disappears during execution. You can use choice if you want to prove this fact, as it is just a conventional mathematical assertion; it will not interfere with the computability of the overall function.
So it's a half-baked kind of constructivism, that is constructive only in the places where it actually matters to producing code. That seems like a reasonable compromise to me. In particular, LEM is not executable in any case, because it is a Prop; you can't case analyze on it unless you are proving another Prop and this too will be erased. Whenever you use "if" in Lean it infers decidability of the predicate in question, and this proof of decidability lives in Type and can be executed.
I could find no literature on Lean’s VM, and there is very little literature on Lean in general. This is a bad sign.
I could say a few things to respond to this.
(1) Lean comparatively young, and most of the academics who work on CIC as a type theory have been using Coq for a long time now, so unless they feel inclined to look at lean I don't see how this is going to just happen.
(2) I will point you to my paper https://github.com/digama0/lean-type-theory/releases/tag/v1.0 which tries to lay out the complete type theory that Lean implements, or at least an overestimate of it. There are many papers about subsets of Coq but I don't know any analogous paper that writes down everything the kernel is capable of doing, and I personally will not be convinced of the reasonableness of Coq as a formal foundation until this is done.
(3) The lean VM is a complicated compiler, and it is undergoing some significant changes in the newest version, but there is a reference for some of it: https://arxiv.org/pdf/1908.05647.pdf . Certainly it's not all you might like, but it at least satisfies an existence claim.
Mario
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", (continued)
- 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", 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
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Jason Gross, 01/08/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", Sylvain Boulmé, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Ramkumar Ramachandra, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Kevin Buzzard, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Florent Hivert, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Timothy Carstens, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Timothy Carstens, 01/09/2020
Archive powered by MHonArc 2.6.18.