coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: AUGER Cédric <Cedric.Auger AT lri.fr>
- To: André Hirschowitz <ah AT unice.fr>, AUGER Cédric <Cedric.Auger AT lri.fr>
- Cc: "Coq Club" <coq-club AT pauillac.inria.fr>
- Subject: Re: [Coq-Club] an inductive types question
- Date: Sun, 11 Oct 2009 16:01:31 +0200
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
- Organization: ProVal
Le Sun, 11 Oct 2009 15:53:27 +0200, André Hirschowitz
<ah AT unice.fr>
a
écrit:
I am not so happy with that example, let me propose a hopefully more enlightening one:Not exactly.
Inductive types are freely generated and have some initial property.
Do you mean the [inductive_type]_rec, [inductive_type]_rect and so on...
You are right, I forgot to mention it, but you can define them manually
with fixpoints.
So the solution using
"Inductive I1 T := makeI1 : forall (x0 x1 : T), x0 = x1 -> I1 T."
will generate them (but are trivial here).
you want to define
Z/2Z. So you would like to write for instance
Inductive Ztwo : Type :=
O :Ztwo
| S : Ztwo ->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.
We quit induction theory in this case; I think, the best choice in this
case is to use a record (or a module if you prefer):
Record F2 :=
{ Z2 : Set;
O : Set;
S : Z2 -> Z2;
HS : forall n, S (S n) = n
}
And you will lose some properties you can also add if required.
You loose pattern matching, but how can we define it?
mach z with
| O => ...
| S n => (any value is matched even O since S (S O)=O)
end
That is non determinism
ah
--
Utilisant le client e-mail révolutionnaire d'Opera :
http://www.opera.com/mail/
- Re: [Coq-Club] an inductive types question, (continued)
- Re: [Coq-Club] an inductive types question, Adam Chlipala
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, Thorsten Altenkirch
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, Adam Chlipala
- 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
- Re: [Coq-Club] an inductive types question, André Hirschowitz
- 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
Archive powered by MhonArc 2.6.16.