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 10:39:22 +0100
  • Authentication-results: mail3-smtp-sop.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-f181.google.com
  • Ironport-phdr: 9a23:I4yXTRKJHcrtCVRYytmcpTZWNBhigK39O0sv0rFitYgfKfTxwZ3uMQTl6Ol3ixeRBMOHsqkC0beO+Pi/EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCezbL9oMhm7rRndusYKjYZgN6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhTwZPDAl7m7Yls1wjLpaoB2/oRx/35XUa5yROPZnY6/RYc8WSW9HU8lWSiJBH5i8b5MRAOUdIeZWoY79p14Uohu/AwmnGefjxzBMi3Pz26AxzuYvHhzc3AE4EN0OvnbbotX7OqkRTO670rXHwzrYYvNKwDfw8pTEfgw9rfyOW797bMrfyVMoFwPAllidtJbqPyiI3eoQq2ib7vZgVf6xhG49sAF6vz+iydw2hobTnI4UxErI9T5hwIY0Od24VFB0YcS/EJZLuCGaMpF5QsImQ21ypCk6zbgGtIe9cSMXxponwBvfZOaGc4iO+h/jUf6RITZhiHJ+drO/nAy+8U+6yu3zTsW00UxKritLktXWuHANzQTf5dWASvt85Euh3iyP1w/L5uFLIEA0iarbK4M6zbIql5oTtlzPHiD3mEXqjK+Wa14r9vK05OTgZ7XroIKXOYxsigzmLKgihsiyDf47PwUORWSX5/mw2bn58UHkQ7hGk/s7mbTDvp/AP8QUvKu5DhdV0ok97xa/CC+r0NECknkGKFJJYRKGgJP0N13XLvD0EPSyj0m2nDdkwPDGObLhApHTIXTZjLjherN951ZdyAo1099f+4pZBq8dLP/3QEP8t9zVAgUnPwCpx+vrEshx24ADVW6XB6+WKqLSsVuG5uI1JOmMYZcYty3nJ/c//fLvg2U1mUQFfamowZsXdG63Hu59I0iCbnrsh80OEWYOvgYkUOPqj1iCXSZJZ3muR6I8+i07CIW+AIjfQYCtmaWN0zu/Hp1LfW9LEUuMEHftd4WcQfgAciOSIsl7kjwFT7etUYEh1Qv9/DP9npFgN6L//jAS/cbo08Ew7OnOnzkz8yZ1BoKTyTfeYXtzmzYiTiR+57h+vVBw0EzLhaI+irpHU8dL5u9VXx0hHZHZxu1+Tdv1X1SSLZ+yVF+6T4D+UnkKRdUrzopLPh8kR4eSyyvb1i/vOIc70qSRDcVtoK3Z1nn1Yc16ziSejfRzvxwdWsJKcFaeqOt/+gzUXdCblkyYk+O7f/1Z0nedrSGMym2BuEweWwl1A/2cDCIvI3DOpNG83XvsCrqnCLApKAxEkJfQJa5Da9mvhlJDFq7u

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