coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Solange Coupet-Grimal <Solange.Coupet AT cmi.univ-mrs.fr>
- To: Venanzio Capretta <Venanzio.Capretta AT mathstat.uottawa.ca>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] infinite trees
- Date: Fri, 27 Feb 2004 15:20:37 +0100
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Dear Venanzio,
Your definition CoFixpoint makeTree: label -> Tree:= [a](Node a (map makeTree (children a))). is not correct since the recursive call occurs under "map". The guard condition for the term to be accepted requires the recursive call to occur under the constructor "node". I suggest the following specification (I give it in V8 syntax). __________________________________________________________________ Parameter Label:Set. Definition inf : nat -> Set := fun n:nat => {m:nat| m <n}. CoInductive tree : Set:= Node : Label -> (forall n:nat, (inf n) -> tree) -> tree. CoFixpoint makeTree: Label -> tree:= fun a => (Node a (fun (n:nat) (m: {m:nat| m <n}) => (makeTree a))). _____________________________________________________________________ Best regards, Solange Venanzio Capretta wrote: Dear Coq users,
-- Solange COUPET-GRIMAL _____________________________________________________________ CMI-39, rue Frederic Joliot-Curie - 13453 Marseille Cedex 13 Tel : (33) 04 91 11 36 17 _____________________________________________________________ |
- [Coq-Club] infinite trees, Venanzio Capretta
- Re: [Coq-Club] infinite trees, Solange Coupet-Grimal
- Re: [Coq-Club] infinite trees, Milad Niqui
- Re: [Coq-Club] infinite trees, Solange Coupet-Grimal
Archive powered by MhonArc 2.6.16.