Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] How to prove two constructors are different

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] How to prove two constructors are different


chronological Thread 
  • From: Pierre Casteran <casteran AT labri.fr>
  • To: GANGCHEN5 AT aol.com
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] How to prove two constructors are different
  • Date: Sat, 20 Sep 2003 08:44:29 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
  • Organization: LaBRI

GANGCHEN5 AT aol.com
 wrote:
Hello,

Given an inductive definition:

Inductive A : Set := a : A | b : A | c : A.

I want to prove that each pair of two constructors are
different. Here is a proof following the method proposed in the book CoqArt:

Lemma ineq : ~a=b.
Proof.
Unfold not; Intros H; Change ([o:A]Cases o of a => True | _ => False end b);Rewrite <- H; Trivial.
Qed.

Question:
Are there simpler or general proofs for this problem ?

With the above method, each lemma ~x=y needs a slightly different proof.


Thanks.

gang chen

It's better to use the "discriminate" tactic.

Lemma ineq : a <> b.
Proof.
  Unfold not ; Discriminate 1.
Qed.

Then all lemmas have the same proof.

Pierre

--
Pierre Casteran,
LaBRI, Universite Bordeaux-I      |
351 Cours de la Liberation        |
F-33405 TALENCE Cedex             |
France                            |
tel : (+ 33) 5 40 00 69 31
fax : (+ 33) 5 40 00 66 69
email: Pierre . Casteran @ labri .  fr  (but whithout white space)
www: http://www.labri.fr/Perso/~casteran









Archive powered by MhonArc 2.6.16.

Top of Page