Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Fwd: "Lean is like Coq but better"

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Fwd: "Lean is like Coq but better"


Chronological Thread 
  • From: Thorsten Altenkirch <Thorsten.Altenkirch AT nottingham.ac.uk>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Cc: Kevin Buzzard <kevin.m.buzzard AT gmail.com>
  • Subject: Re: [Coq-Club] Fwd: "Lean is like Coq but better"
  • Date: Tue, 7 Jan 2020 10:12:55 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=exmail.nottingham.ac.uk; dmarc=pass action=none header.from=exmail.nottingham.ac.uk; dkim=pass header.d=exmail.nottingham.ac.uk; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kcyA+UtkV4osdwJE7Y7D1bVjyHNSMayaJCmID5k/vEU=; b=N6HnXSY3ULhR8E9QWke71srwR6zyWIKvNG9emPo7fqOVtCbAxSGBQYGi4TMtRst7blcZtNd+I7d5RX3Ke+YjiO0cSFiQg55kBaOMyJChvIwUqaKO6IzXO0vTpY4jkj6sboIwppV0+C3REtlFiERHzxle2+KOoRfn01Qy3Vm+KR5KwiUwhSmtId0VnrS1EMoEXrqfRRYscZKBHT3vh/dZf83QT1ddCbrisol93LR3mVvlmRYXgqpTa1JWqHlWQR/oiWhqi1aBYklF/wu6tMH5f0dtbL0VVgNynZJDHNuppez7uxQjAmPcuK1mGK8SVKI/4jWPpQAArSYo132v26XnzA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iyP47fy7cXw4aS8M6gWGPd2z470RHp2t/SO/jLdAKtNW7Xug3xfK2R1y+w0NAO3GBEeKn5et90kRd7/1XOmup9+O6kJXqiciv2aIpiwlrl+rN6wTXUEbHydqHqi8PNmExI0hHwOLB4eg2acnV5cbjDKd6SNbjz17UnCtfyVx7q6mARtiapDapcPDoWfrKL0l8wAHVXy072r7w6NeXGqOJS9Nv5ZenrWwRxQbDdMc5KYcliJyq1vMFmcFRBDle2SmA8is7aj6SwJzUpuoAWr70XdnPsw9FGEH/3UWXUfih83/6O/zFB7lrf/TdQgDyIRS4EEfRasSvlDANy4H7xpOEg==
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=Thorsten.Altenkirch AT nottingham.ac.uk; spf=Pass smtp.mailfrom=Thorsten.Altenkirch AT nottingham.ac.uk; spf=None smtp.helo=postmaster AT uidappmx05.nottingham.ac.uk
  • Ironport-phdr: 9a23:xNYj5BE1pogly+NH91BKd51GYnF86YWxBRYc798ds5kLTJ76ps2ybnLW6fgltlLVR4KTs6sC17ON9fq9AydZud6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vIhi6txvdu8kIjYdtN6o91gbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDMi7mrZltJ/g75aoBK5phxw3YjUYJ2ONPFjeq/RZM4WSXZdUspUUSFOBZ6yb5YUD+oZI+lXs5X9qVUJrRu7HwasBeXvwSJMinL52aA21uIsGhzE0gM9BdIDqHTaosvoOqcOX+67z6fIwjfNYPNXxTjy55PFfQo9rfGJR798bdDcxEspGgjYjluQs4vlPzaN2+oTs2ib6PBgVfmzi2E5rQF6vySixsMwiobXgIIVyVHE9T9lz4Y1ONa1T1B1Yd6jEJtKrCGaK5V5QsU4T2x0vCY61qMJuZi4fCgL0pQo2x7fZueBc4iP/hLjSOeRITF3hHJlYr2/ggy+/lK8xeHmS8m0009HoyxYmdfCsXAN0gbc6smBSvZl+0ehwTeP2xnI6uBKOkA4j63bK4QuwrIol5oTq0XDHiHslEX4lq+abkok+um06+Tnf7XpvYWQN45zig3mL6sunc2/Df4/MggUUGiX4eu81Lz//U35XbVFlec6nbXesJDfI8kQu623AxdN34o+9RqyDC2q3MoXkHQJNl5IdxyKg5L0N13QI/30Feqzj0qvnTtx2fzLMbPsDo/TInTZjrvscq5x60BCxwcw0dxS4pdZBa0CLf/zVUL8sd3VAxs2PgOoxuvnBsly2p4CVW+KHqCWK7ndvkWO6+kyOeeDfpUVtyz4K/U95/7hk3s5mVgFcKm03JsYdWq3Hux+I0WcbnvgntcMHX0Mvgo5UOzqlFyCUThcZ3ayRa084ys3B5i6AovZW4Ctg6SN3Ca9HpJIemBLEk2AHWnreomeRfsBZyyfLtVunzEKT7StVpEt2BK2uA//0bVnL+7U+iMCtZLk0dh4//PdlRE19TxuFMSdz3+CT2dukm4UQz82wL5woUp+yleCy6h3n/xYGMdV5/NOTgc6KZ/cz+p1C9DyQA3Be82FR0y6Tdm8HDExTco9w8USbEZlB9WikhfD0jK2DL8SjryHHYA78qbB33fqPMt90HbH1Kw5j1Y8WMdPNGumhrR+9wfJHYLJnV+ZxO6WcvFW1ynUsWyH0GCmvUdCUQc2X7+PFSQUYVKTptDk7GvDSaWvAPIpKF0S59SFL/52atrzlklLQr/KPMjTZWGwgWywTUK0xrSWd5bnfSM02DnQDksFiQsT1XCBKRQ/ACihqmeYBTcoCFG5MBCkyvV3tH7uFhx89AqNdUA0kufso09HtbmnU/oWm4k8lmIkojRwEky62ouGWdyHuxZgeqpcaNZ76VwByGGL7lUhbKzlFLhrgxslSyoyp1nnjkUlDIJcjckso3MjyUx7IuSF0wEZLm7K7dXLIrTSb1LK0lWvZqrRgACMzdea878X7eRg9hPlux21F0wt83xildBelWaftM3H

Intuitionism does not reject the excluded middle (this is a theorem). All I was suggesting is to be aware when you are using it.

 

Thorsten

 

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: Monday, 6 January 2020 at 20:57
To: "coq-club AT inria.fr" <coq-club AT inria.fr>
Subject: Re: [Coq-Club] Fwd: "Lean is like Coq but better"

 

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


This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment. 

Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored 
where permitted by law.






Archive powered by MHonArc 2.6.18.

Top of Page