coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Elimination Rules
- Date: Thu, 7 Aug 2014 11:16:27 +0200
Well, technically [and_rect] and all other the [*_rect]-s are defined (using pattern-matching). You may want to [Print and_rect] to see what it looks like. You can, of course, define modus ponens like this:
And, more generally, for forall (in Coq, [P->Q] is just a notation for [forall _:P,Q]):
The fundamental rules of Coq (it's an arbitrary choice if you will, but it's technically motivated) are: "forall" is a type, inductive types are types, values of type "forall" are contructed with "fun" and eliminated with application, values of inductive types are constructed with constructors and eliminated with "match".
Definition modus_ponens {P Q:Prop} (L:P->Q) (h:P) : Q := L h.
And, more generally, for forall (in Coq, [P->Q] is just a notation for [forall _:P,Q]):
Definition forall_rect {A:Type} {Q:A->Prop} (L:forall y, Q y) (x:A) : Q x := L x.
The fundamental rules of Coq (it's an arbitrary choice if you will, but it's technically motivated) are: "forall" is a type, inductive types are types, values of type "forall" are contructed with "fun" and eliminated with application, values of inductive types are constructed with constructors and eliminated with "match".
On 7 August 2014 07:25, Terrell, Jeffrey <jeffrey.terrell AT kcl.ac.uk> wrote:
In some texts, -> is treated in the same way as any other connective; and given that e.g. /\ has an elimination rule, i.e. and_rect, I was wondering whether -> has an elimination rule too. The same applies to forall x : A, P.
It's clear that there's something fundamental about type P -> Q, because attempting to define it in the normal way is problematic.
Inductive imply (P Q : Prop) : Prop :=imp : (P -> Q) -> imply P Q.
Regarding forall x : A, P, I'm aware that you can build a proof f a of P[a/x], but what is it that says you can?
Regards,Jeff.
On 6 Aug 2014, at 22:09, Maxime Dénès wrote:
Well, given a proof a of A and a proof f of forall x : A, P, you can build the proof f a of P[a/x].
Not sure if this answer your question, though.
Are you familiar with the Curry-Howard isomorphism? If not, I would advise to read about it.
Best,
Maxime.
On 08/06/2014 04:59 PM, Terrell, Jeffrey wrote:
From a proof of A and a proof of A -> B, we can infer B. This is the -> elimination rule.
Similarly, from a proof a of A and a proof of forall x : A, P, we can infer P[a/x]. This is the forall elimination rule.
How are these elimination rules manifest in Coq?
Regards,
Jeff.
- [Coq-Club] Elimination Rules, Terrell, Jeffrey, 08/06/2014
- Re: [Coq-Club] Elimination Rules, Maxime Dénès, 08/06/2014
- Re: [Coq-Club] Elimination Rules, Terrell, Jeffrey, 08/07/2014
- Re: [Coq-Club] Elimination Rules, Arnaud Spiwack, 08/07/2014
- Re: [Coq-Club] Elimination Rules, Terrell, Jeffrey, 08/08/2014
- Re: [Coq-Club] Elimination Rules, Abhishek Anand, 08/08/2014
- Re: [Coq-Club] Elimination Rules, Vladimir Voevodsky, 08/09/2014
- Message not available
- Re: [Coq-Club] Elimination Rules, Abhishek Anand, 08/10/2014
- Re: [Coq-Club] Elimination Rules, Andrej Bauer, 08/11/2014
- Re: [Coq-Club] Elimination Rules, Andrej Bauer, 08/11/2014
- Re: [Coq-Club] Elimination Rules, Abhishek Anand, 08/11/2014
- Re: [Coq-Club] Elimination Rules, Neel Krishnaswami, 08/12/2014
- Re: [Coq-Club] Elimination Rules, Andrej Bauer, 08/12/2014
- Re: [Coq-Club] Elimination Rules, Abhishek Anand, 08/12/2014
- Re: [Coq-Club] Elimination Rules, Vladimir Voevodsky, 08/09/2014
- Re: [Coq-Club] Elimination Rules, Abhishek Anand, 08/08/2014
- Re: [Coq-Club] Elimination Rules, Terrell, Jeffrey, 08/08/2014
- Re: [Coq-Club] Elimination Rules, Arnaud Spiwack, 08/07/2014
- Re: [Coq-Club] Elimination Rules, Terrell, Jeffrey, 08/07/2014
- Re: [Coq-Club] Elimination Rules, Maxime Dénès, 08/06/2014
Archive powered by MHonArc 2.6.18.