Skip to Content.
Sympa Menu

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

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

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


Chronological Thread 
  • From: Timothy Carstens <intoverflow AT gmail.com>
  • To: coq-club AT inria.fr
  • Cc: Kevin Buzzard <kevin.m.buzzard AT gmail.com>
  • Subject: Re: [Coq-Club] "Lean is like Coq but better"
  • Date: Thu, 2 Jan 2020 11:41:44 -0800
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=intoverflow AT gmail.com; spf=Pass smtp.mailfrom=intoverflow AT gmail.com; spf=None smtp.helo=postmaster AT mail-lj1-f172.google.com
  • Ironport-phdr: 9a23:tW1WdBb7aukAy8iIvk0QHkD/LSx+4OfEezUN459isYplN5qZr8++bnLW6fgltlLVR4KTs6sC17ON9fq8ACdZu8jJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRu7oR/PusQZnIduJbs9xgXIr3BVZ+lY2GRkKE6JkR3h/Mmw5plj8ypRu/Il6cFNVLjxcro7Q7JFEjkoKng568L3uxbNSwuP/WYcXX4NkhVUGQjF7Qr1UYn3vyDnq+dywiiaPcnxTbApRTSv6rpgRRH0hCsbMTMy7XragdJsgq1FvB2hpgR/w4/Kb4GTKPp+Zb7WcdcDSWZcQspdSylND4WhZIUNEuUBJ/5VoIbzp1QMrRWwCwqiCv7xxDBUnXL5x7E23v47HA3awAAtHdQDu2nUotXvM6cSVPi4wrfJzTXGaPNWxTf96YjVeR0/u/6MR6lwcdbPxkkpDAPOk1KdqY3jPzOJ0eQNrXaU7/BuVeKrjG4mpRp8ojeqxsg2i4nJgpgZxUzD9SV82Ys4I8CzRkB8Yd6hCpRQtieaOpN3QsMnW2Fnpjw6yrwctp6/ZiQF0ogoywTCa/yEa4SH/hfjVPuLLThmmX1lZbSyjAux/0i40uDwSNW43VJQoidGktTArG4B2wDQ58SdV/dw/Fmt1DCS3A7J8O5EO1o7la/DJp4h3LEwkp0TvFzGHiDsmUX2iLaadkEm+uS18ujnbKjqq52CO4NuhQH+NaMumsO7AesmKAQBQ2+b+eGk2L3i+032XqlKg+UonqXFtJ3WP8cWq66jDwNLzoou6AyzAyqk3dgGhXUHKUhKeBODj4jnIVHOJ/X4AO++g1SqjDdrwO7GMaP7ApXDKnjDl7ngcK1y605Z0gUzzNRf64hIBbEGJfL/QlXxu8DADh8lLwy0xP7qB8l61oMHQG6AHquZML7JvlKT/eIuI+yMZJcPtzrnKvgl4eTujX4jllMHc6mpx8hfVHftFfN/Zk6dfHDEg9EbEG5MsBBtYvbtjQi+UDtUe3ajF4k1/ConBYS9RdPCQJyqnrGb0iO8AbVZY2lHDhaHFnK+JNbMYOsFdC/HepwpqTcDT7X0DtZ5jUjz5j+/8KJuK6/vwgNdtZ/n04IrtejalBV38T4tSsrEjDvLQGZzkWcFATQx2fIn+BAv+hK4yaF9xsdgO5lL/foQC1U1MJfdy6pxDNWgAluQLOfMc06vR5CdOR90S9swx9EUZEMkQoetixnC22yhBLpHzrE=

I'm not Kevin, but it's a public thread, so -

My experience with Lean+Coq has been that they suffer from many of the same challenges, but in different ways

* Universes. Either you're gonna have explicit lifting (Lean) or you're gonna have a cumulative checker (Coq). One is tedious to use, the other is relatively complex under the hood.

* DLL Hell. Lean and Coq both have a hard time building a big collection of user-contributed libs, since minor changes to the engines break old code. I'm not a maintainer for either system but it seems like both engines rely on these really sensitive inference algorithms. Minor tweaks to these algo's just completely wrecks backwards compatibility for tactic-mode proofs.

* Tactic mode. Arguably this should be a rich programming environment with useful abstractions. Right now you can get that if you're willing to write a Coq plugin, but that's kinda heavy-handed, and it's certainly a highly-coupled (hard to maintain) way to go. Lean has a goal of offering a richer environment for tactics. IMHO everyone will eventually need to go in this direction.

* Few user libs, and even fewer that actually build on each other. This is a bad sign for both environments - healthy software ecosystems have towering stacks of libs and tools with meaningful dependencies.

* Performance. If you set out to write a high-perf pCIC checker, and you're an extremely experienced software engineer, you'll probably succeed. 3 years ago I'd say this was Lean's greatest strength, but in recent years Coq has gotten waaaaay faster, so maybe this isn't as relevant as it once was.

* Language server. Last I checked, both had an ad-hoc approach to this.

Coq has improved vastly in each of these areas in my ~7 years of working with it. There's still more work to be done, but not so-much that I'd advocate for completely starting over.

From the outside, it looks to me like Lean won't be "ready" until it has solved all of those issues to the team's satisfaction. Thus, every year or so they throw away their old code base and start from scratch, including how to organize things like the standard library (really fam, could we just do a good job with it and stop moving the chairs around??)

Anyway, that's my 2 cents ;)

Happy New Years! Wishing everyone deep insights and clever proofs,
-t







On Thu, Jan 2, 2020 at 9:36 AM Bas Spitters <b.a.w.spitters AT gmail.com> wrote:
Dear Kevin,

You claimed
"Lean is like Coq but better"
https://wwwf.imperial.ac.uk/~buzzard/one_off_lectures/msr.pdf

There was a bit of discussion among coq users about what this means.
Did you have any concrete suggestions on how lean is better, and how
Coq could be improved?

While I'm at it, let me announce this workshop next week to the coq-community:
https://www.andrew.cmu.edu/user/avigad/meetings/fomm2020/

Best regards,

Bas



Archive powered by MHonArc 2.6.18.

Top of Page