Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] moving around let ... in

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] moving around let ... in


chronological Thread 
  • From: Guillaume Melquiond <guillaume.melquiond AT inria.fr>
  • To: Keiko Nakata <keiko AT kurims.kyoto-u.ac.jp>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] moving around let ... in
  • Date: Mon, 09 Feb 2009 14:23:56 +0100
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Le lundi 09 février 2009 à 22:12 +0900, Keiko Nakata a écrit :

> How can I prove the following goal? 
> It looked so obvious that I thought auto would handle.

While obvious, the proof that both expressions compute the same result
requires to decompose inductive objects, so as to get convertible
expressions. The auto tactic does not perform such transformations, as
far as I know.

> Goal forall (p : nat -> Prop) (f : nat -> nat) (n : nat * nat),
> (let (n1, _) := n in p (f n1)) -> p (f (let (n1, _) := n in n1)).
> intros p f n h. apply h.

intros p f n h. destruct n. apply h.

Or shorter:

intros p f (n1,n2) h. apply h.

Best regards,

Guillaume





Archive powered by MhonArc 2.6.16.

Top of Page