Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Stuck on a proof of div2 (n + n) = n.

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Stuck on a proof of div2 (n + n) = n.


chronological Thread 
  • From: frank maltman <frank.maltman AT googlemail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Stuck on a proof of div2 (n + n) = n.
  • Date: Sat, 21 May 2011 19:54:38 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=qTiQiWj6H/6C0vi1pqk5UTyzcoAZixIG//UkzR2WPVKOAnlRbPMKvsoNkFjV2kZhn6 JmKTuASyeHxyIwvTl7y8YDIkOc5dsFM2R1kyeF9nm2pUadAvGEZu5OgpLZwC+kVJuUL6 7dM/bLKIELeAYWtEoumYtklrK59aiT7046ODc=

On Sat, 21 May 2011 21:37:55 +0200
Pierre Casteran 
<pierre.casteran AT labri.fr>
 wrote:

> Hello,
> 
>   You can easily finish you proof with a simple lemma:
> 
> Lemma div2_le : forall n, div2 n <= n.
> destruct n.
>   simpl;auto with arith.
> apply lt_le_weak. apply lt_div2. auto.
> auto with arith.
> Qed.
> 
> Then the last case  of your proof is:
> (* case S (S m) *)
> apply le_lt_trans with (S (S m)).
> apply div2_le.
> auto.
> Qed.
> 

Thanks. The 'with' form for 'apply' was certainly a major
part of what I was missing.

It would be nice to get some of these lemmas back into Coq,
actually. I'm not sure what the policy is for inclusions in
the standard libraries but they do seem generally useful. The
Div2 module seems somewhat underdeveloped (it only has one
lemma *not* concerned with parity or double).



Archive powered by MhonArc 2.6.16.

Top of Page