Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Dependent rewrite question (probably simple answer! :)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Dependent rewrite question (probably simple answer! :)


chronological Thread 
  • From: Adam Chlipala <adamc AT hcoop.net>
  • To: Edsko de Vries <devriese AT cs.tcd.ie>
  • Cc: coq-club <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Dependent rewrite question (probably simple answer! :)
  • Date: Fri, 20 Feb 2009 09:48:06 -0500
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Edsko de Vries wrote:
I am stuck in a proof that involves a dependent rewrite (I think) -- I need to rewrite two variables simulatenously in order to complete the proof.

The standard trick for that is to use [generalize].


Lemma singleton : forall n (x y : T n), x = y.
destruct x; dependent inversion y; reflexivity.
Qed.

Hint Resolve singleton.

Lemma singleton_cong : forall n (x y : T n), X n x = X n y.
intros; f_equal; auto.
Qed.

Hint Resolve singleton_cong.

Lemma bar : X (U + 1 - 1) b = X U a.
generalize b; rewrite foo; auto.
Qed.





Archive powered by MhonArc 2.6.16.

Top of Page