coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Thorsten Altenkirch <t.altenkirch AT googlemail.com>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Cc: "kevin.m.buzzard AT gmail.com" <kevin.m.buzzard AT gmail.com>
- Subject: Re: [Coq-Club] Fwd: "Lean is like Coq but better"
- Date: Fri, 03 Jan 2020 12:37:21 +0000
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=t.altenkirch AT googlemail.com; spf=Pass smtp.mailfrom=t.altenkirch AT googlemail.com; spf=None smtp.helo=postmaster AT mail-wr1-f43.google.com
- Ironport-phdr: 9a23:lAwH7RDoU7rvuS/U8sAMUyQJP3N1i/DPJgcQr6AfoPdwSPT7rsbcNUDSrc9gkEXOFd2Cra4d0KyM7/urBTdIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfL1/IA+ooQjeuMQajoRvJ6gswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKMSMy/mPKhcxqlK9UrhyvqQF/zYDKY4+aO+Zxc7jHct8GQGpMRNpdWjZDD466coABD/ABPeFdr4TluVUOrRy+BRO3BOPz1DBIgGL90LE+0+Q9Dw7G2g8gH9MUsHvIrNX+KaAfUfyvwKbSyTXDc+1Z2TH+6IjJaBAuvfGMUKl/ccrWzkkvGAfFgUuVqYP/PjOV0v4BvHSc7+plTO+ijXMspQJpojW32Msglo3EipgWx13E7yl13pg5KcCiREN0b9OoCJhduiCAO4doQc4uWX9ktDg7x7EcpJK2fzYGxZI6zBDFcfOHaZKH4hf7WeaRPzh4gHVldaq6hxmo8EigzvTwV8eu0FpXtyZFnNbBu34X2xzc7ciHTfR9/kO/1jqVyw/T7eRELVg1lardNZEh3qY9moQPvUnHBCP7m0X7gLWIekk65+Sk8evqb7v+qp+ZLYB0iwX+Mqo0msy4BOQ1KhQOU3KB9uS4yL3s40v5QLZLjv0sjqbZsIvXJcscpq6+DA9V1pgs6xOlADen1NQUh2UILFVAeB6flYjmJ0nOIOzkDfe4m1mjjDBrx+nfMrL9BpXNM2PMnaz6fbd97k5c0BA8wcpe55JSELEBIej8VlX/tNzCXVcFNFn+yOH+Td55y4k2WGSVA6bfPrmY+QuD4ftqKO2RbqcUviz8Ir4r/ai9o2U+nAohfa6zxocabjiRGuhrJUaYe3HsyoMdV24Oogc4T+3wg12qXjlUaHK/Wqs94ncwD4fwXtSLfZyknLHUhHTzJZZRfG0TUgnQQ0etTJ2NXrI3UAzXOtVoy2JWWr+mRIss0BivsEnxzL81drOFqB1djorq0Z1O38OWkBgz8TJuCMHEjTOCSGZ7mm4NTj4ymqt4pB4kkwrR4e1Dm/VdUOdrybZJXwM9b8OOyuV7D5XtQFuEcIvSDlmhRdqiDHc6Sddjm9I=
I realize that this discussion is about pragmatic aspects of proof assistants but I would like to use the opportunity to say something about foundational aspects where both Coq and Lean fail badly. There is the slogan nothing is as practical as a good
theory and I would add a good theory is based on solid foundations.
Both Coq and Lean fail in properly supporting structures with a non-trivial equality. Lean doesn’t really offer an answer to setoid hell but just adds quotients as an axiomatic principle with no computational explanation. This is despite us knowing since
a while (I wrote a paper on this in ’99) how to turn setoid hell into setoid heaven by working within the setoid model: that is if you want to talk about setoids all the time just accept that every type comes with its own eqaulity and build your type theory
around this.
But going further: setoids only support types with a propositional equality. We know that this is wrong, it is an unfortunate legacy of set theory formulated within the framework of predicate logic. It is wrong because equality of structures is a structure
not a proposition. I recently attended a talk by Kevin in Nottingham where he exactly stumbled into this issue, trying to implement a construction by Grothendieck. It seems that Grothendieck had the right intuition but it doesn’t fit into the framework of
set-theory inspired type theory. Now, if I remember correctly, Kevin and his students found ingenious solutions but never questioned the dogma that equality needs to be propositional! The particular irony is that they weren’t even working in set theory but
in a type theory which had been designed artificially in a way that makes it hard or impossible to have a proof-relevant equality. And this is indeed one of the gifts Type Theory has to give to structural Mathematics! In this respect Lean is worse than Coq
because it is explicitly anti-structural.
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.
I don’t suggest that Mathematicians should immediately throw out all classical principles and adopt constructive Mathematics but they should be aware of both. Often a classical construction is like a rough sketch , a motivation for looking for a finer
picture which can be expressed in a constructive setting. Instead of digging always deeper into higher levels of abstraction and generality, it can be very worthwhile to look at Mathematics form this perspective.
As an added benefit, intuitionistc Mathematics does have a philosophical foundation that classical Mathematics lacks. I know Mathematicians usually leave the room when the word “philosophy” is said but maybe they shouldn’t (always). What is a proposition?
A very basic question. It is either true or false, that is Prop=Bool? I never understood this, if I have an infinite family of booleans who do I obtain one boolean which express that they are never false? Ah, I don’t obtain it it is just the case? What does
this mean? Ah in the real world this is the case? But we are talking about Mathematical constructions – what do they have to do with the “real world”? Ah the world of ideas is like the real world? Does anybody seriously believe this (apart from Plato)? Anyway
there is a nice way out of this dilemma: a proposition is something you can have evidence for. This is the intuitionistic explanation of propositions and it works perfectly fine. We can even justify the principle of excluded middle via the negative translation
but we cannot save all instances of the axiom of choice. Maybe this tells you something.
What is my conclusion: yes today we should work with the proof assistants available and I am quite impressed with Kevin’s work and the way he uses Lean in his teaching (I recommend to everybody to ave a look at his number world on the web). But this shouldn’t
stop us looking for tomorrow, for the proof assistants of the future. In the moment it seems to me that cubical agda is the one who comes closest to this vision from my point of vie. But yes, we need to combine the practical with the foundational. I view the
formalisation of Mathematics which is going to happen one way or another as an opportunity also to develop mathematical foundations further. It would be such a shame if we use the tools of tomorrow to implement the Mathematics of yesterday!
From: <coq-club-request AT inria.fr> on behalf of Kevin Buzzard <kevin.m.buzzard AT gmail.com>
Reply-To: "coq-club AT inria.fr" <coq-club AT inria.fr>
Date: Thursday, 2 January 2020 at 20:59
To: "coq-club AT inria.fr" <coq-club AT inria.fr>
Subject: [Coq-Club] Fwd: "Lean is like Coq but better"
Reply-To: "coq-club AT inria.fr" <coq-club AT inria.fr>
Date: Thursday, 2 January 2020 at 20:59
To: "coq-club AT inria.fr" <coq-club AT inria.fr>
Subject: [Coq-Club] Fwd: "Lean is like Coq but better"
[trying again after subscribing]---------- Forwarded message ---------
From: Kevin Buzzard <kevin.m.buzzard AT gmail.com>
Date: Thu, 2 Jan 2020 at 20:42
Subject: Re: [Coq-Club] "Lean is like Coq but better"
To: Timothy Carstens <intoverflow AT gmail.com>
Cc: <coq-club AT inria.fr>Hello Coq people! Bas is right, I did say this, and I guess also that it is too simplistic a statement to be reasonable; clearly Coq is better than Lean at some things, for example it does have a proof of the odd order theorem.I guess it's clear from the context of the talk though, that I am interested in formalising modern mathematics (and perhaps I should say that this is because I am beginning to distrust the mathematical literature, although I should say that I am *very much* in a minority here; mathematicians have a system, and it basically works, and sure we find errors in the literature, but this is how life has been for a long time and we're used to it now; besides, the important stuff is "probably all fine"). And for formalising modern mathematics I do think that Lean has changed some of Coq's design decisions for the better. I guess the two big things that I would flag if anyone were to ask me why I think Lean is better designed than Coq for modern research mathematics would be:1) Lean has quotients baked into the kernel. I have talked to several people doing mathematics in Coq who tell me of "setoid hell". In modern fashionable mathematics quotients are everywhere.2) Lean is designed to work in classical logic, and Coq is more tied to a constructive viewpoint (so I have heard). Probably most of the people on this list have a CS background and you might think that this is a funny issue to be fussy about -- but 99% of modern research mathematicians *do not even know what constructive logic is* and any attempts by computer scientists to justify the importance of constructive logic, perhaps based on the notion that mathematicians somehow want to "compute", will fall on deaf ears. At the top end of mathematics, mathematicians just want to reason. Those that want to compute use unverified (and sometimes closed source) software such as magma, sage, mathematica etc (and furthermore they're not the ones getting the Fields Medals). You might raise concerns about the rigour of our work when we use these systems (and I personally would most definitely share those concerns) but mathematicians in general are not interested in such objections.Other things:In Lean I can write proofs in tactic mode or term mode; Lean tactics are written in Lean. I think this gives us more flexibility.Lean's maths library is currently one big library so there are no issues with incompatibilities of various imports, however this might well be because we are younger.And finally, Lean's maths library seems to me to be going in the direction of where pure mathematicians want it to go, we are currently building MSc level pure mathematical definitions/theorems across algebra and geometry, and analysis will catch up in the end.So those are the thoughts that are in my head about the relationship between Lean's type theory and Coq's. Again, I'm sure that Coq will be better at doing some things than Lean, but *speaking as a pure mathematician who wants to reason about complex modern mathematical objects* I have found Lean to be a very good fit.
rest omitted due to some strange space restrictions
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Thorsten Altenkirch, 01/03/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Adam Chlipala, 01/03/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Timothy Carstens, 01/03/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Thorsten Altenkirch, 01/03/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Timothy Carstens, 01/03/2020
- <Possible follow-up(s)>
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Thorsten Altenkirch, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/10/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Timothy Carstens, 01/10/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Tadeusz Litak, 01/10/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/11/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Tadeusz Litak, 01/11/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/11/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Tadeusz Litak, 01/10/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Adam Chlipala, 01/03/2020
Archive powered by MHonArc 2.6.18.