@@ -4,17 +4,31 @@ From mathcomp Require Import sequences reals interval
44rat all_analysis archimedean ssrint.
55Import Order.OrdinalOrder Num.Theory Order.POrderTheory
66finset GRing.Theory Num.Def.
7+
8+ (**md************************************************************************* *)
9+ (* # The Prime Number Theorem *)
10+ (* *)
11+ (* This file aims at formalizing Daboussi's proof of the prime number theorem. *)
12+ (* The main theorem proved so far is the divergence of the sum of the *)
13+ (* reciprocals of the prime numbers. *)
14+ (* *)
15+ (* ``` *)
16+ (* prime_seq == the sequence of prime numbers *)
17+ (* ``` *)
18+ (* *)
19+ (***************************************************************************** *)
20+
21+ Set Implicit Arguments .
22+ Unset Strict Implicit .
23+ Unset Printing Implicit Defensive.
24+
725Local Open Scope ring_scope.
826Local Open Scope ereal_scope.
927Local Open Scope order_scope.
1028Local Open Scope classical_set_scope.
1129Local Open Scope set_scope.
1230Local Open Scope nat_scope.
1331
14- Set Implicit Arguments .
15- Unset Strict Implicit .
16- Unset Printing Implicit Defensive.
17-
1832Fixpoint prime_search (i j : nat) : nat :=
1933 match j with
2034 | 0 => i`!.+1
@@ -106,19 +120,21 @@ have := (leq_ltn_trans kb2 kb1).
106120by rewrite ltnn.
107121Qed .
108122
109- Definition P (k N : nat) :=
123+ Section DivergenceSumInversePrimeNumbers.
124+
125+ Let P (k N : nat) :=
110126 [set n : 'I_N.+1 |all (fun p => p < prime_seq k) (primes n)]%SET.
111- Definition G (k N : nat) := ~: (P k N).
127+ Let G (k N : nat) := ~: (P k N).
112128
113- Lemma cardPcardG : forall k N, #|G k N| + #|P k N| = N.+1.
129+ Fact cardPcardG : forall k N, #|G k N| + #|P k N| = N.+1.
114130Proof .
115131move=> k N. rewrite addnC.
116132have: (P k N) :|: (G k N) = [set : 'I_N.+1]%SET by rewrite finset.setUCr.
117133rewrite -cardsUI finset.setICr cards0.
118134by rewrite -[X in _ + _ = X]card_ord addn0 -cardsT => ->.
119135Qed .
120136
121- Lemma cardG (R : realType) (k N : nat) :
137+ Fact cardG (R : realType) (k N : nat) :
122138 (\big[+%R/0%R]_(k <= k0 <oo) ((prime_seq k0)%:R^-1 : R)%:E < (2^-1)%:E)%E
123139 -> k <= N.+1 -> ~~ odd N -> N > 0 -> (#|G k N| < (N./2)).
124140Proof .
@@ -281,7 +297,7 @@ rewrite val_insubd x3b3 /= => x2eqx3. move: x3b2.
281297by rewrite ltnS -x2eqx3.
282298Qed .
283299
284- Lemma cardP (R : realType) (k : nat) :
300+ Fact cardP (R : realType) (k : nat) :
285301 #|P k (2 ^ (2 * k + 2))| <= (2 ^ (2 * k + 1)).+1.
286302Proof .
287303set N := 2 ^ (2 * k + 2).
@@ -459,3 +475,5 @@ apply: (@cardG R); first by move: Rklthalf; rewrite /un div1r.
459475- by rewrite /N addn2 expnS mul2n odd_double.
460476- by rewrite /N expn_gt0; apply/orP; left.
461477Qed .
478+
479+ End DivergenceSumInversePrimeNumbers.
0 commit comments