Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] an inductive types question

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] an inductive types question


chronological Thread 
  • From: André Hirschowitz <ah AT unice.fr>
  • To: 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 15:53:27 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
  • Organization: UNS

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).
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





Archive powered by MhonArc 2.6.16.

Top of Page