Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Problem with rewriting

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Problem with rewriting


chronological Thread 
  • From: Pierre Casteran <pierre.casteran AT labri.fr>
  • To: muad <muad.dib.space AT gmail.com>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Problem with rewriting
  • Date: Thu, 04 Jun 2009 07:39:38 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

muad a écrit :
Hello to everyone.

This is my context (x: Type)(K: nat -> Type).
I would like to know how to rewrite (exists n, K n = x) as (exists m, x =
K m).

Thanks in advance.

What is your actual goal and why do you want to do the rewrite.
Hi,


I don't know whether it answers your initial questions, but if you consider two logically equivalent
propositions, you can replace one by another in a correct context (see documentation on setoids):


Require Import Setoid.
Variables (x: Type)(K: nat -> Type).

Lemma L : (exists m, K m =x) <-> (exists n, x = K n).
split;intros [m H];exists m;auto.
Qed.

Variable P:Prop.
Goal (exists m, K m =x) -> P.
rewrite L.


Admitted.









Archive powered by MhonArc 2.6.16.

Top of Page