Skip to Content.
Sympa Menu

coq-club - [Coq-Club] coq information

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] coq information


chronological Thread 
  • From: Andrea Poles <evilpuchu AT gmail.com>
  • To: coq-club AT pauillac.inria.fr
  • Cc: davide1812 AT gmail.com, Giovanni Boninsegna <giova.bn AT gmail.com>
  • Subject: [Coq-Club] coq information
  • Date: Mon, 21 Dec 2009 11:54:58 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=C5jq5dooAHYOpeI1UDmMzL/QqnR3PsLwIMiQOID09xn3tnrDhc58dMSe0++ZY/AOaY iCdmwusmTyoaxZGLLp20X8fGYN7NE5Jv/6Nt+oBQ1qODT+5Q5SlyqRhu+f5Kv3U61NCP x76Kr3xEx5SCRP77R37vLs9hdGa3uuq7Mb+Kk=

Hi all, we have modified the coq-implementation of the Euclid's
theorem (for primes).
The following code is supposed to be right:

  1 Require Import Wf_nat.
  2 Require Import Coq.Program.Equality.
  3
  4
  5 Variable Pn1 : nat.
  6 Definition Divides (n m : nat) : Prop := exists q : nat, m = n * q.
  7 Definition Prime (n : nat) : Prop :=
  8   n > 1 /\ (forall q : nat, Divides q n -> q = 1 \/ q = n).
  9
 10 Fixpoint fact (n:nat) : nat :=
 11   match n with
 12     | O => 1
 13     | S n => S n * fact n
 14   end.
 15 Definition Bound := forall (Pn:nat) , Prime(Pn) -> (exists x:nat , (gt x 
Pn)
 16                         /\ x < fact(Pn)+1
 17                         /\ Prime(x)).
 18
 19 Hypothesis  hyp: Prime Pn1.
 20
 21 Theorem Euclide : forall (y:nat) ,
 22        (exists x:nat , Prime(x) /\ (gt x y)).
 23 intros.
 24 elim y.
 25 exists Pn1.
 26 split.
 27 apply hyp.

Now, we have to demonstrate that primes are infinitely, using the
above "rules"... and the Euclid's theorem of course!
Any idea?

Thank you all!




Archive powered by MhonArc 2.6.16.

Top of Page