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: Bas Spitters <b.a.w.spitters AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Fwd: "Lean is like Coq but better"
  • Date: Mon, 6 Jan 2020 22:36:02 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=b.a.w.spitters AT gmail.com; spf=Pass smtp.mailfrom=b.a.w.spitters AT gmail.com; spf=None smtp.helo=postmaster AT mail-yb1-f196.google.com
  • Ironport-phdr: 9a23:hJtKHxbSSmzUKC5xaFozyfH/LSx+4OfEezUN459isYplN5qZrsq/bnLW6fgltlLVR4KTs6sC17ON9fq9ASdZvM7JmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRu7oR/PusQWnYduJbs9xxvVrnBVZ+lY2GRkKE6JkR3h/Mmw5plj8ypRu/Il6cFNVLjxcro7Q7JFEjkoKng568L3uxbNSwuP/WYcXX4NkhVUGQjF7Qr1UYn3vyDnq+dywiiaPcnxTbApRTSv6rpgRRH0hCsbMTMy7XragdJsgq1FvB2hpgR/w4/Kb4GTKPp+Zb7WcdcDSWZcQspdSylND4W7YIUSEuoBJv5YoJfhqFsSoxW+AgysC/nuyj9Om3T62aI33uAkHQzAwQcuHc8BsG7Modr6OqcdU+C7wqfLwzvecf1ZxTjz5ZPUchA4u/yAQa58fdbTxEQpCgjLjk+QqYvgPz6Ny+kCqXOb5Pd9W+K3im4ntx1xrSa1xsc3l4LEgZkaxkre+iljzoc5P8a4SFZ6Yd64DJtfqTuaN5BtT8MtRmFnoic6yrkctZGneygKzY0qyhjCYPKJdIiI5wjsVOeXITpggXJlYLO/iw+p8Umu0e3wTM600ExFriZdjtnNuHEN1wDP6seZUPtx5Fuu2TGK1wzL6+FEO0E0laTBJ54v2L48jpUTsUXfHi/2hUX5l7WadkQj+uSw9uvnZbTmqoWbN49uhQHyKqsums2jAeQ4LwgBRHKX9vi71L3m+0DyXbZEjuUun6XHrJzXId4Xq625DgNPzIov9hKyAy273NkcnHQKKk9OdgidgIjzIV7OJej1DfehjFSolzdm3/XGMafgApXJN3TCkKzucatk505S1QY+ydFS64hbCrEGJ/LzVUvxu8LCAhAlNAy0xv7rCNR71owARWKCGrGVPL/WvFOS5e8iI/OAaJEItDv5MfQp+vrjgH4hlV8YZ6ap3J8XaH6iHvRhJkWUeWHjjs0bHmsQsAsyVvfqiEWDUT5Pe3a9Qbg85iogBYKpCIfMXIGtgLib0CinGZ1WY3hKCkqQHnfwa4WER/AMZTqOLc9mizwITKSuS4s81R61rwL60LpmLu/M+iICr57j1d515/fSlR4o7zB0Ad6dgCmxSDRfmXpAbDsr1ugrqktkj1yHzKJQgvpCFNUV6ekfASkgMpuJ5eVhQ+vqWx7dc82SAAKsBNzgHncqVtMt39IUeG5yHtyjilbI2C/8UOxdrKCCGJFhqvGU5HP2PcsojiufjfhzvxwdWsJKcFaeqOt6/gnXCZTOlhzAxamvfKUYmiXK8TXalDfcjARjSAd1FJ79czUfa0/R94qr40rDS/q/A+1iPFIQl4iNLaxFbtCvhlJDFq+6ZIbuJlmpkmL1Pi6mg6uWZdOzKWoY1STZTkMDllJL8A==

Let me just quote John Baez today:
"I think of topos theory as being fashionable again, now that famous
mathematicians like Connes and Lafforgue who we don't think of as
category theorists are trying to use topos theory to tackle big
problems in number theory etc."
https://twitter.com/johncarlosbaez/status/1214225792307060736

Of course, synthetic mathematics is just one application of
constructive logic, the computational aspect is another one.

On Mon, Jan 6, 2020 at 9:58 PM Kevin Buzzard
<kevin.m.buzzard AT gmail.com>
wrote:
>
> 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



Archive powered by MHonArc 2.6.18.

Top of Page