coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: AUGER Cedric <Cedric.Auger AT lri.fr>
- To: Julien Tesson <julien.tesson AT univ-orleans.fr>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Prop, Set, Type and list
- Date: Mon, 18 Jul 2011 14:37:26 +0200
Le Wed, 13 Jul 2011 10:53:52 +0200,
Julien Tesson
<julien.tesson AT univ-orleans.fr>
a écrit :
> Thank you for your clear answer :)
>
> The only thing I miss is an example of extracted program where a
> structure containing only elements in Prop would be really
> meaningful, but I am sure that such thing exists ....
>
Such programs exist, a great example is one produced by a fixpoint with
a non structurally decreasing argument (for the extracted program),
using the Acc predicate.
For instance a "for" using binary integers would look like:
Lemma wf_succ: forall x, Acc (fun x y => x = Ppred y).
…
Fixpoint for n (H: Acc (fun x y => x = Ppred y) n) … :=
match H with
| Acc_intro H =>
match n with
| xH => …
| _ => … (for (Ppred n) (H (Ppred n) (eq_refl _)) …) …
end
end.
Will give as extracted program:
let rec for n … =
match n with
| Coq_xH => …
| _ => … (for (Ppred n) …) …
I am not sure to have such an example on the cocorico! wiki at the
extraction page.
- [Coq-Club] Prop, Set, Type and list, Julien Tesson
- <Possible follow-ups>
- Re: [Coq-Club] Prop, Set, Type and list,
brandon_m_moore
- Re: [Coq-Club] Prop, Set, Type and list,
Julien Tesson
- Re: [Coq-Club] Prop, Set, Type and list, AUGER Cedric
- Re: [Coq-Club] Prop, Set, Type and list,
Julien Tesson
- Re: [Coq-Club] Prop, Set, Type and list,
AUGER Cedric
- Re: [Coq-Club] Prop, Set, Type and list,
Julien Tesson
- Re: [Coq-Club] Prop, Set, Type and list, Guillaume Melquiond
- Re: [Coq-Club] Prop, Set, Type and list,
Julien Tesson
- Re: [Coq-Club] Prop, Set, Type and list,
AUGER Cedric
- Re: [Coq-Club] Prop, Set, Type and list,
Julien Tesson
- Re: [Coq-Club] Prop, Set, Type and list, AUGER Cedric
- Re: [Coq-Club] Prop, Set, Type and list,
Julien Tesson
Archive powered by MhonArc 2.6.16.