Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] blocked in an elementary proof

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] blocked in an elementary proof


chronological Thread 
  • From: Martijn Vermaat <martijn AT vermaat.name>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] blocked in an elementary proof
  • Date: Sun, 12 Dec 2010 19:17:53 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=vermaat.name; h=subject:from :reply-to:to:in-reply-to:references:content-type:date:message-id :mime-version:content-transfer-encoding; q=dns; s=vermaat.name; b=RPq1k4ajQo7PGCvj4aZs8LUJp9A4okkJxDBW7exnzI+1cEE+ZNvuJjnr2mdrh EnzskdvhRbX11KjWlEnk3XCc/0yw3Uq8ZideCBPTqDL8auZEf0IN6UEoGz6h6kfp IDEoT8xJysaPoyzzqihy+Q6ElvFAWSS9hkXqHTCOXIKm7M=

>   Fixpoint sum (a b : nat) : nat :=
>     match b with
>     | 0 => a
>     | S b1 => sum (S a) b1
>     end.
> 
>   Lemma sum_zero : forall a : nat, sum 0 a = a.


I think the most obvious way is by first proving the following fact:

  Lemma sum_S : forall a b : nat, sum a (S b) = S (sum a b).

From this it is actually quite easy to prove sum_zero.

cheers,
Martijn





Archive powered by MhonArc 2.6.16.

Top of Page