coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- 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
- [Coq-Club] Nth & dependent types., dimitrisg7
- Re: [Coq-Club] Nth & dependent types., Adam Koprowski
- Re: [Coq-Club] Nth & dependent types., Guillaume Melquiond
- Re: [Coq-Club] Nth & dependent types., dimitrisg7
Archive powered by MhonArc 2.6.16.