Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Proof term for proof by exhaustion

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Proof term for proof by exhaustion


chronological Thread 
  • From: "Param Jyothi Reddy" <paramr AT gmail.com>
  • To: "Benjamin Werner" <benjamin.werner AT inria.fr>
  • 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 15:55:14 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iU+DBf38J4+qGXhTuM7GgY4/iFg9o4Z51zSn4TPib2X1XN/wZJVIAOYQHPd33e0bd3tUCMgIoitt4Td85XO+vQwQ9XfwJ+I4PsdOnbItylrKN/ThHtVVi2tBSX4NgBDlJ83ihhjfkGRx/YtkhwloKSfvVDpzTI+EVfBafHiQbTE=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Hi Benjamin,
I wanted to look at how the actual proof term (in terms of raw CIC/PTS
type system) looks like rather than using tactics. More from
perspective of understanding type system.

The essential point is how can we express the fact that vector of
length 2 are just 00,01,10 and 11 (nothing more/nothing less)?

Param

On 7/10/07, Benjamin Werner 
<benjamin.werner AT inria.fr>
 wrote:
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







Archive powered by MhonArc 2.6.16.

Top of Page