coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Benjamin Werner <benjamin.werner AT inria.fr>
- To: "Param Jyothi Reddy" <paramr AT gmail.com>
- Cc: types AT cis.upenn.edu, coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] Proof term for proof by exhaustion
- Date: Tue, 10 Jul 2007 23:33:07 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=FnLQ/XR0XF4KQW+gU3FVr1IxgKSvRXx2Du+kbSu7Kox3HFXXKszrhT5bm/Ge73RS2Q5GJ8sKEr4r6ac3NrDPQK83+ABdIStlwJRMNjbKohQw14T33WptkBzpuKlBCPwu4f+ynsJTwy8964oaqXBWPGigdO8O6csgS94+jwlxem8=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
You need to generalize your statement, so that it makes sense for
vectors of any length.
For instance:
Parameter P : (Vector bool 2) -> Prop.
Definition PP (n : nat) : Vector bool n -> Prop :=
match n as n return Vector bool n -> Prop with
| (S (S O)) => fun p => (P p)
| _ => fun _ => True
end.
Goal forall n p, PP n p.
intros n p; case p; simpl; trivial;
clear n p; intros n v [|]; case v; trivial;
clear n v; intros n v [|]; case v; trivial.
...
Cheers,
B
Le 10 juil. 07 à 20:26, Param Jyothi Reddy a écrit :
Hi,
Lets define vector in usual way with constructors:
nil : Vector T 0
cons : Vector T n -> T -> Vector T (S n)
along with its inductive elimination rule. Let BD be type of Binary
Digits (enumeration with elements 0 and 1).
Also lets say i have proofs of some predicate P for all elements of
Vector's over BD of length 2, i.e.
p_0 : P(00), p_1 : P(01), p_2 : P(10), p_3 : P(11), where bd is cons
(cons nil d) b.
using these How will the proof term for
(forall v : Vector BD (S S 0) ). P(v) look like?
I can use or elimination if i could build proof for:
(forall v : Vector BD (S S 0)). v == 00 or v == 01 or v == 10 or v ==
11. However i am not sure how the proof term for this looks either.
Can someone help me understand this?
Thanks,
Param
--------------------------------------------------------
Bug reports: http://coq.inria.fr/bin/coq-bugs
Archives: http://pauillac.inria.fr/pipermail/coq-club
http://pauillac.inria.fr/bin/wilma/coq-club
Info: http://pauillac.inria.fr/mailman/listinfo/coq-club
- [Coq-Club] Proof term for proof by exhaustion, Param Jyothi Reddy
- Re: [Coq-Club] Proof term for proof by exhaustion, Benjamin Werner
- Re: [Coq-Club] Proof term for proof by exhaustion, Param Jyothi Reddy
- Re: [Coq-Club] Proof term for proof by exhaustion, roconnor
- Re: [Coq-Club] Proof term for proof by exhaustion, Benjamin Werner
Archive powered by MhonArc 2.6.16.