Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] a question when defining the inductive type

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] a question when defining the inductive type


Chronological Thread 
  • From: Jacques-Henri Jourdan <jacques-henri.jourdan AT inria.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] a question when defining the inductive type
  • Date: Wed, 05 Dec 2012 13:46:29 +0100

The problem is that the decision procedure is recursive, in a non-trivial way. The following code solves the problem :

Definition test_dec:forall (a1 b1 : test) ,{a1 = b1} + {a1 <> b1}.
fix 1.
repeat decide equality.
Defined.

Le 05/12/2012 13:19, Liang Dou a écrit :
hi,all
I have a question when defining the inductive type:

Inductive test : Set:=
|base : string -> test
|rule : string -> list test -> test.

When i write the following definition for this inductive type:

Definition test_dec:forall (a1 b1 : test) ,{a1 = b1} + {a1 <> b1}.
repeat decide equality.
Defined.

It doesn't work and seems to go into an infinite loop.
Then how can i judge if two elements of type "test" are equal?

Thanks!

Lisa




Archive powered by MHonArc 2.6.18.

Top of Page