Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] can't work with eq

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] can't work with eq


chronological Thread 
  • From: Pierre Casteran <pierre.casteran AT labri.fr>
  • To: Thomas Nelson <thomasharrisonnelson AT gmail.com>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] can't work with eq
  • Date: Tue, 23 Sep 2008 15:42:43 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Thomas Nelson a écrit :
I'm having trouble with a very basic problem, I don't know what to do.
 How can one prove
not (eq Eq Gt)
?
I cannot find any theorems about equality that will help me, although
I'm very new to coq.

Thanks,
Tom

--------------------------------------------------------
Bug reports: http://logical.futurs.inria.fr/coq-bugs
Archives: http://pauillac.inria.fr/pipermail/coq-club
          http://pauillac.inria.fr/bin/wilma/coq-club
Info: http://pauillac.inria.fr/mailman/listinfo/coq-club
If you print for instance Gt.
Coq < Print Gt.
Inductive comparison : Set :=
   Eq : comparison | Lt : comparison | Gt : comparison

You notice that Gt and Eq are distinct constructors of the inductive type
comparison.

Then the tactic discriminate expresses this fact:

Coq < Lemma diff : Eq <> Gt.
1 subgoal

 ============================
  Eq <> Gt

diff < discriminate.
Proof completed.

diff < Qed.

Pierre







Archive powered by MhonArc 2.6.16.

Top of Page