Skip to Content.
Sympa Menu

coq-club - RE: [Coq-Club] how to run this program to verify a simple function?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

RE: [Coq-Club] how to run this program to verify a simple function?


Chronological Thread 
  • From: Mandy Martino <tesleft AT hotmail.com>
  • To: John Wiegley <johnw AT newartisans.com>
  • Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: RE: [Coq-Club] how to run this program to verify a simple function?
  • Date: Sat, 23 Jan 2016 09:50:24 +0800
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=tesleft AT hotmail.com; spf=Pass smtp.mailfrom=tesleft AT hotmail.com; spf=None smtp.helo=postmaster AT BLU004-OMC4S31.hotmail.com
  • Importance: Normal
  • Ironport-phdr: 9a23:pFelAhX6pIDBVjiAw8r5Rj4ad2/V8LGtZVwlr6E/grcLSJyIuqrYZhOOt8tkgFKBZ4jH8fUM07OQ6PC+HzVYv93a4DgrS99laVwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oM2NJVwQ2nHmMftbF1afk0b4joEum4xsK6I8mFPig0BjXKBo/15uPk+ZhB3m5829r9ZJ+iVUvO89pYYbCf2pN4xxd7FTDSwnPmYp/4Wr8ECbFUrcrkcbB0cRkhwAPAnI4xX3T9+lsCz6sPVV3iSFNNfqTKs9Xy/k5KBuHkzGkiACYhsw9m3Gwul5lr5aphXp8wBy2IrZbp29NP1ie6rceZURQm8XDZUZbDBIHo7pN9hHNOEGJ+sN6tCl/1Y=

Hi  ,

when i continue to run,  got  some  error


[Loading ML file quote_plugin.cmxs ... done]
[Loading ML file newring_plugin.cmxs ... done]
[Loading ML file omega_plugin.cmxs ... done]

Coq < Coq < Coq < Coq < Error: tree already exists.

Coq < Inductive In (x:Z) : tree -> Prop :=
| In_left : forall l r y, (In x l) -> (In x (Node l y r))
| In_right : forall l r y, (In x r) -> (In x (Node l y r))
| Is_root : forall l r, (In x (Node l x r)).

Definition is_empty (s:tree) : bool := match s with
| Empty => true
| _ => false end.Coq < Coq < Coq < Toplevel input, characters 192-193:
> | Is_root : forall l r, (In x (Node l x r)).
>                                       ^
Error: In environment
In : Z -> tree -> Prop
x : Z
l : tree
r : ?8
The term "x" has type "Z" while it is expected to have type 
"tree".



Regards,

Martin 


> From: johnw AT newartisans.com
> To: tesleft AT hotmail.com
> CC: coq-club AT inria.fr
> Subject: Re: [Coq-Club] how to run this program to verify a simple function?
> Date: Fri, 22 Jan 2016 17:48:17 -0800
>
> >>>>> Mandy Martino <tesleft AT hotmail.com> writes:
>
> > Error: The reference Z was not found in the current environment.
>
> I'm not sure whether the course defines Z some place, but otherwise you should
> just need:
>
> Require Import ZArith.
>
> --
> John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
> http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2



Archive powered by MHonArc 2.6.18.

Top of Page