coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Vladimir Voevodsky <vladimir AT ias.edu>
- To: AUGER C�dric <Cedric.Auger AT lri.fr>, Andr� Hirschowitz <ah AT unice.fr>
- Cc: "Coq Club" <coq-club AT pauillac.inria.fr>
- Subject: Re: [Coq-Club] an inductive types question
- Date: Sun, 11 Oct 2009 11:49:28 -0400
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
On Oct 10, 2009, at 9:18 PM, AUGER Cédric wrote:
As said by Adam, I am wondering if don't have confusion between Records and Inductives:
Le Sat, 10 Oct 2009 23:32:28 +0200, Vladimir Voevodsky <vladimir AT ias.edu > a �crit:
Is there a way in Coq to make definitions such as:
what you expect in
Inductive I1 : Type := x0 : I1 | x1 : I1 | i : eq x0 x1 .may be:
Record I1 T := makeI1
{ x0 : T;
x1 : T;
i : x0 = x1
}
In these terms, what I wanted was:
Inductive I1:Type :=
def_el: { x0 : I1; x1 : I1; i : x0 = x1 }
such that, for any T one would have (morally)
(I1 -> T) = { x0 : T ; x1 : T; i : x0 = x1 }
I am not so happy with that example, let me propose a hopefully more enlightening one:
you want to define
Z/2Z. So you would like to write for instance
Inductive Ztwo : Type :=
O :Ztwo
| S : Ztoo ->Ztwo
WITH forall n :Ztwo , SSn =n.
This corresponding Ztwo_rect (or fixpoint) should generate a proof obligation for checking that the recursive formulas are compatible with the relations specified under the WITH banner.
ah
Yes, your Ztwo example is of the same kind as my I1. It seems to be just the question of what is allowed in the inductive definitions. Is there a reason why something like
Inductive I1:Type :=
def_el: { x0 : I1; x1 : I1; i : x0 = x1 }
or
Inductive Ztwo : Type :=
O :Ztwo
| ZtwoS : {S: Ztwo ->Ztwo ; Z2axiom : forall n : Ztwo , SSn =n} .
would be problematic?
V.
- Re: [Coq-Club] an inductive types question, (continued)
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- Re: [Coq-Club] an inductive types question, André Hirschowitz
- Re: [Coq-Club] an inductive types question, Dan Doel
- [Coq-Club] another question (Prop as a subtype of Set), Vladimir Voevodsky
- [Coq-Club] another question (cont.), Vladimir Voevodsky
- Re: [Coq-Club] another question (cont.), Taral
- [Coq-Club] About extraction and mutual recursion, AUGER Cédric
- [Coq-Club] Typo on coq manual, AUGER
- Re: [Coq-Club] Typo on coq manual, Pierre Letouzey
- Re: [Coq-Club] another question (Prop as a subtype of Set), Matthieu Sozeau
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- Re: [Coq-Club] an inductive types question, André Hirschowitz
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- [Coq-Club] another inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] another inductive types question, AUGER Cédric
- Re: [Coq-Club] another inductive types question, Roman Beslik
- Re: [Coq-Club] another inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] Type hierarchy, Randy Pollack
Archive powered by MhonArc 2.6.16.