coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Fwd: "Lean is like Coq but better"
- Date: Tue, 7 Jan 2020 23:11:54 -0500
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-ed1-f50.google.com
- Ironport-phdr: 9a23:507xoBAZo5NUFuBqhrcLUyQJP3N1i/DPJgcQr6AfoPdwSPv6r8bcNUDSrc9gkEXOFd2Cra4d0KyM7v+rBzFIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfL1/IA+ooQjRtMQajopvJ6YswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKMSMy/mPKhcxqlK9UrxyhqB5/zYDaY4+bKeRwcb/GcNwAWWZMRNxcWzBdDo6+aYYEEuoPPfxfr4n4v1YAqQGxBRKrBOPp1zRGh2X23aoh0+Q6DArL2w4gEMgVsHTTqtX1O70SUeeuzKnTyTjOdPxW2TLn54jJdhAtu+2DXbV1ccfIz0QkCgDLjk2IpID7Iz+Y0v4Bvmub4uZ6S+6jl20qpxtxrzSzwMonl5PHiZgPyl/e8CV02IY1KsO8SE58edOkFYFftyCeN4dvXMwtXnxktD80yrAGpZK3ZicKyJMgxx7Qb/yIbZKE7Q7kVOaUOTt4hXRld6yjhxuq70Ss1unxWtO33VtKtCZJjMXAu3MX2xHT9sSLUv598V2g2TaL2QDT8OZEIUUsmKrZMZEh2bkwlpwcsUTZGS/2g172gauNe0Ur/+in8eXnYrH8qpCAMI90jxnyMr4ylcynHeQ4Lg8OUnCH9uS7zb3v5FH2QLFXjvItiaTZq5DbJcEDpqGjGQNV04Aj6wy+Dzi8ytgYk2MHfxp5f0eMiJGsMFXTKrisBvCmxl+ojT1DxvbcP7SnDI+bfVbZl7K0X79m7EgU5xA01ssXs5BdEbYHL+j0QVSgnNPdBx49dQezxrC0W51GyooCVDfXUeeiO6TIvArQv759E6y3fIYQ/Q3FBb09/fe31C02nFYcee+i2p5FMCnlTMQjGF2QZD/XuvlEEWoOuVBjHunjiVnHXDIKInjvB+Qz4TY0DI/gBoDGFNj00e6xmRyjF5gTXVhoT1WFEHPmbYKBAq5eZyebI8snmTsBB+Gs
The standard computational uses of Prop are Acc (the inductive type of well-founded accessibility proofs, needed for running well-founded recursion) and eq (which, unlike Acc, one might claim should be erased in classical / anti-univalent settings). Note that Coq is in the process of getting an erasible eq type that can be used in casts, but last I checked, allowing casts across this equality results in non-termination of reduction. (I can dig up the relevant pull request discussion if anyone wants me to.)
I have to mull over Mario's response, but I think there are usages of
Coq's Prop that require it to be constructive (non-LEM). My own work
relies on this - it also rests on the fact that Prop will be erased,
leaving Type as the program, but uses Prop to carry around simple
computation as well as propositions in order to prove more complex
computation in Type. I'd be curious if the same technique is possible
in Lean.
On Tue, 7 Jan 2020 21:20:33 -0500
Mario Carneiro <di.gama AT gmail.com> wrote:
> On Tue, Jan 7, 2020 at 8:51 PM jonikelee AT gmail.com
> <jonikelee AT gmail.com> wrote:
>
> > [decloaking from lurker mode to add my $0.02]
> >
> > Does having LEM built into Lean interfere with the user's ability to
> > exploit the Curry-Howard isomorphism?
> >
> > If so, that seems like a bad trade off: a small convenience for a
> > small group of people (Fields Medal wanabees) that imposes a large
> > inconvenience for a large group of people (software engineers).
> >
>
> I haven't found that Lean's ontology poses any serious issues for
> writing software, and if anything I think it helps. Lean makes a
> sharp distinction between data (in Type) and proofs (in Prop), and
> proofs are erased during code execution. So if you build a sorting
> function of type forall l : list A, { l2 : list A | l2 is a sorted
> permutation of l }, then the "list A" part is data, which can be
> executed assuming it doesn't use the axiom of choice in its
> definition, and the "l2 is a sorted permutation of l" part is a
> proof, so it completely disappears during execution. You can use
> choice if you want to prove this fact, as it is just a conventional
> mathematical assertion; it will not interfere with the computability
> of the overall function.
>
> So it's a half-baked kind of constructivism, that is constructive
> only in the places where it actually matters to producing code. That
> seems like a reasonable compromise to me. In particular, LEM is not
> executable in any case, because it is a Prop; you can't case analyze
> on it unless you are proving another Prop and this too will be
> erased. Whenever you use "if" in Lean it infers decidability of the
> predicate in question, and this proof of decidability lives in Type
> and can be executed.
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", (continued)
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Stefan Monnier, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Bas Spitters, 01/06/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Xuanrui Qi, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Bas Spitters, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Thorsten Altenkirch, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Ramkumar Ramachandra, 01/07/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", jonikelee AT gmail.com, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Mario Carneiro, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", jonikelee AT gmail.com, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Jason Gross, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", jonikelee AT gmail.com, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Sylvain Boulmé, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Ramkumar Ramachandra, 01/08/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Kevin Buzzard, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Florent Hivert, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Timothy Carstens, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Timothy Carstens, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Conor McBride, 01/09/2020
- Re: [Coq-Club] Fwd: "Lean is like Coq but better", Kinan Dak Albab, 01/09/2020
Archive powered by MHonArc 2.6.18.