Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] How to prove functions are equal?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] How to prove functions are equal?


chronological Thread 
  • From: "Wan Hai" <wan.whyhigh AT gmail.com>
  • To: "Florian Hatat" <florian.hatat AT ens-lyon.fr>
  • Cc: "Coq Club" <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] How to prove functions are equal?
  • Date: Mon, 2 Jun 2008 15:30:26 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UzYE3xoDckIWWfFMuJWbRLyUQPnfKVUvvvBZVlFEWNXBXovxrFk+ciakggIg++DH2U45CYewL0J3qtQoEszEbAXo781ELYTtI3cXGFNDNmFtxDBGORnv80r6vkIeZs5h8IRVtVQ9O18n8PMedB7+s7jg495zarLOej5eF/ZOtjY=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Hi, Florian

Yes, you are right.

The question I asked is an abstract version of what I want to prove.
In my first try, the "rewrite" step did not work, so I used the
extensionality axiom to do so. At that time, I thought rewriting
inside a function, such as rewrite m1*m2 to m2*m1 in (fun n=>m1*m2*n),
is not allowed in Coq. Now I know it works.

Maybe the solution Bruno Barras gave is more general.

Thanks a lot!

On Mon, Jun 2, 2008 at 3:11 PM, Florian Hatat 
<florian.hatat AT ens-lyon.fr>
 wrote:
> Hi,
>
> Wan Hai a écrit :
>> forall m1 m2 n, fc n (fun x=>m1*m2*x) = fc n (fun x=>m2*m1*x)
>> (...)
>> Is there another way to prove this not using the extensionality axiom
> In this particular case (since you can rewrite using the equality
> m1*m2*x = m2*m1*x, see the mult_comm lemma in Mult), you do not need the
> extensionality axiom.
>
> Theorem th1 : forall m1 m2 n, fc n (fun x=>m1*m2*x) = fc n (fun x=>m2*m1*x).
> Proof.
> intros m1 m2 n.
> rewrite (mult_comm m1 m2).
> reflexivity.
> Qed.
>
> By the way, I would be curious to known whether there exists an
> unprovable (without extensionality) equality between two nat's...
>
> --
> Florian,
> http://openweb.eu.org/
> http://www.linux-france.org/
>
>
>



-- 
Best regards,
Hai Wan





Archive powered by MhonArc 2.6.16.

Top of Page