coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Alexandre Pilkiewicz <alexandre.pilkiewicz AT polytechnique.org>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] Cannot match on the parameter of an inductive
- Date: Wed, 18 Aug 2010 18:04:29 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=aghqrTdHaALMw8tecUi+PdhApSOV4lv4TNPKFXhoedwJOSz5P+hDAutTVJGpscxU3l fTLsLTZ3LUM18jsua01pG99LQ/vWoSbDPbySvPv53TrDOgSiVHP74AhurD2AEJKL7lhk ZCCF13rW+BFu8I4Wvg6eTNblW6yqKAtSwfUrg=
Dear list
I'm trying to write a inductive in Prop (bigger than the one shown
below), but I can't match on one of the parameter:
<<<<<<
Variables A B: Type.
Variable PA: A -> Prop.
Variable PB : B -> Prop.
Inductive either : Type :=
| EA (a: A)
| EB (b: B).
Inductive P (e: either) : Prop :=
|P_intro:
match e with
| EA a => PA a
| EB b => PB b
end -> P e.
>>>>>>
leads to : Error: A parameter or name of an inductive type e must not
be used as a bound variable in the type of its constructor.
But if I write :
<<<<<<
Inductive P : either -> Prop :=
|P_intro: forall e,
match e with
| EA a => PA a
| EB b => PB b
end -> P e.
>>>>>>
or more strangely
<<<<<<
Inductive P (e: either) : Prop :=
|P_intro:
match id e with
| EA a => PA a
| EB b => PB b
end -> P e.
>>>>>>
where id is the identity function, everything works fine.
Is there a reason for such a limitation ?
Alexandre Pilkiewicz
- [Coq-Club] Cannot match on the parameter of an inductive, Alexandre Pilkiewicz
- Re: [Coq-Club] Cannot match on the parameter of an inductive, Evgeny Makarov
Archive powered by MhonArc 2.6.16.