coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jonathan Leivent <jonikelee AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Lean Theorem Prover
- Date: Thu, 25 Feb 2016 22:47:48 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f172.google.com
- Ironport-phdr: 9a23:WGNZnBSR9S1NCMhMNrVBQ440tdpsv+yvbD5Q0YIujvd0So/mwa64YReN2/xhgRfzUJnB7Loc0qyN4/+mBzZLv8rJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbvipNuNOU4W2HKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGZPTJPtjCOQERHR7ayFmrPHs4BLEVE6E4mYWemQQiBtBRQbfvz/gWZKkkCz8v/Z90S/SGcD3U70yRXz27aBtSRzljCoKHzE8+WDTzMd3ifQI81qauxVjztuMM8muP/1kc/aAJd4=
On 02/25/2016 10:18 PM, roux cody wrote:
...
As for building-in proof irrelevance (while having a separate HoTT mode)I'm confused about this. Could you elaborate? Proof-irrelevance and proof
that might not bother anyone but me: I (ab)use proof *relevance* in Coq as
a way to get really good erasability.
erasure seem to go rather well together, in my mind.
Coq's standard erasures of Prop, type-like things, and the ability to do Extraction Implicit don't erase everything that could be erased. For example, they don't erase non-Prop data (in Set) that is passed around and used only "uninformatively" - meaning only by Props. Consider, for example, the height of a binary tree used in invariants in dependent types defining the tree and its functions, but which one doesn't want to be a field of the extracted binary tree or args in the extracted functions. So, I do this:
Inductive Erasable(A : Set) : Prop :=
erasable: A -> Erasable A.
Arguments erasable [A] _.
...
Axiom Erasable_inj : forall {A : Set}{a b : A}, erasable a= erasable b -> a=b.
Adding this erasable injectivity axiom makes proofs relevant. However, it gives me the ability to pass around and use (in Props) all manner of things wrapped in the erasable constructor that Coq will then end up erasing at extraction time. This trick works great, especially when one is embedding many complex invariants into dependent types. But I still wish I didn't have to use it.
If you're interested in how nicely erased the extracted results are, you can take a look at my github projects:
https://github.com/jonleivent/mindless-coding (stale, slightly bit-rotted)
https://github.com/jonleivent/mindless-coding-phase2 (up-to-date for Coq 8.5)
The best comparison would be in mindless-coding-phase2, between files wavl.v and its extraction wavl.ml - or, if you'd prefer the non-proof-mode version: wavl-noninter.v and wavl-noninter.ml.
-- Jonathan
- Re: [Coq-Club] Lean Theorem Prover, (continued)
- Re: [Coq-Club] Lean Theorem Prover, Bas Spitters, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, roux cody, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, Jonathan Leivent, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, roux cody, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, John Wiegley, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, Daniel Schepler, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, Abhishek Anand, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, Daniel Schepler, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, roux cody, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Jonathan Leivent, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Arnaud Spiwack, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Benjamin C. Pierce, 02/26/2016
- RE: [Coq-Club] Lean Theorem Prover, Soegtrop, Michael, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/26/2016
- RE: [Coq-Club] Lean Theorem Prover, Makarius, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Makarius, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/27/2016
- Re: [Coq-Club] Lean Theorem Prover, Clément Pit--Claudel, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, roux cody, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Daniel Schepler, 02/26/2016
- Re: [Coq-Club] Lean Theorem Prover, Abhishek Anand, 02/25/2016
- Re: [Coq-Club] Lean Theorem Prover, Bas Spitters, 02/25/2016
Archive powered by MHonArc 2.6.18.