Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Nth & dependent types.

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Nth & dependent types.


chronological Thread 
  • From: Guillaume Melquiond <guillaume.melquiond AT inria.fr>
  • To: dimitrisg7 <dvekris AT hotmail.com>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Nth & dependent types.
  • Date: Sun, 26 Apr 2009 13:45:19 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Le dimanche 26 avril 2009 à 04:24 -0700, dimitrisg7 a écrit :

> Is it possible to get the nth object (of type rel (nth ...) (nth ...)) in
> the following inductive definition (I do not think that I can) or should I
> make some changes in my definitions?

You are missing a hypothesis on default values:

Variable rel_d : rel dA dB.

(or a hypothesis stating that n is bounded by the length of al).

Other than that, there should be no difficulty, it's just a
straightforward induction on n.

Proof.
induction n.
now intros al bl [|H].
intros al bl [|H].
easy.
intros.
now apply IHn.
Qed.

Best regards,

Guillaume





Archive powered by MhonArc 2.6.16.

Top of Page