coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism
Chronological Thread
- From: Robbert Krebbers <mailinglists AT robbertkrebbers.nl>
- To: David MENTRÉ <dmentre AT linux-france.org>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism
- Date: Tue, 19 Nov 2013 22:03:16 +0100
On 11/19/2013 08:27 PM, David MENTRÉ wrote:
* Curry-Howard isomorphism: a very simple Coq theorem (on Boolean orWhat about something simple like:
integers) with associated proof, from which I could also generate OCaml
code and show the Coq type.
Lemma minus : forall x y : nat, y <= x -> { z | x = y + z }.
Proof.
induction x as [|x IH].
{ exists 0. omega. }
intros [|y] ?.
{ exists (S x). omega. }
destruct (IH y) as [z Hz]. omega. exists z. omega.
Defined.
Extraction minus.
(*
(** val minus : nat -> nat -> nat **)
let rec minus n y =
match n with
| O -> O
| S n0 ->
(match y with
| O -> S n0
| S y0 -> minus n0 y0)
*)
- [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, David MENTRÉ, 11/19/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Daniel Schepler, 11/19/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Robbert Krebbers, 11/19/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, AUGER Cédric, 11/19/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, David MENTRE, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Cedric Auger, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, David MENTRE, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Cedric Auger, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Daniel Schepler, 11/22/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, David MENTRÉ, 11/23/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Kristopher Micinski, 11/23/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Cedric Auger, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, David MENTRE, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, Cedric Auger, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, David MENTRE, 11/20/2013
- Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism, AUGER Cédric, 11/19/2013
Archive powered by MHonArc 2.6.18.