Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism

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: David MENTRÉ <dmentre AT linux-france.org>
  • To: Kristopher Micinski <krismicinski AT gmail.com>
  • Cc: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Looking for simple examples of constructive logic and Curry-Howard isomorphism
  • Date: Sun, 01 Dec 2013 19:25:17 +0100

Hello,

Sorry for my late reply.

2013-11-23 17:11, Kristopher Micinski:
`eq` is the constructor for the proposition for (intensional) equality.

So the answer is that `eq` builds a predicate that some x equals some
y (when you give instances for x and y).

Coq < Check eq.
eq
: ?3 -> ?3 -> Prop
Coq < Check eq 1.
eq 1
: nat -> Prop
Coq < Check eq 1 1.
1 = 1
: Prop

Now, those build props. The prop is the theorem, `eq_refl x` builds a
*proof* that proves that x = x.

So `eq` builds the theorem, `eq_refl` builds the proof.

OK. Thank you for the explanations.

This mirrors something like a datatype: list X builds a datatype that
represents lists of things of type X. By contrast cons and nil build
terms of that type. So list constructs the type, and cons/nil build
terms of that type.

This is clear for my for languages like OCaml. But for Coq, I am still have issues linking the types to the corresponding kind of object (theorem, proof).

I am correct in saying that if something like "eq" has type that ends in "-> Prop", it is a theorem and if it has a "formula" in type like "forall (A : Type) (x : A), x = x" for "eq_refl", then it builds a proof?

Best regards,
david




Archive powered by MHonArc 2.6.18.

Top of Page