About the formalization of some results by The Chebyshev in number - - PowerPoint PPT Presentation

about the formalization of some results by
SMART_READER_LITE
LIVE PREVIEW

About the formalization of some results by The Chebyshev in number - - PowerPoint PPT Presentation

Introduction About the formalization of some results by The Chebyshev in number theory factorization of n ! Upper and lower via the Matita ITP bounds for B Chebishevs function Bertrands Dipartimento di Scienze dellInformazione


slide-1
SLIDE 1

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

About the formalization of some results by Chebyshev in number theory via the Matita ITP

Dipartimento di Scienze dell’Informazione Mura Anteo Zamboni 7, Bologna asperti@cs.unibo.it January 19, 2009

slide-2
SLIDE 2

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Outline

1

Introduction

2

The factorization of n! Upper and lower bounds for B

3

Chebishev’s Ψ function

4

Bertrand’s postulate Erd¨

  • s approach (1932)

Automatic check

slide-3
SLIDE 3

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Matita in a nutshell

slide-4
SLIDE 4

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Matita in a nutshell

A light version of Coq.

slide-5
SLIDE 5

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Matita in a nutshell

A light version of Coq. Some distinctive features: a primitive notion of metavariable a sophisticated disambiguation mechanism a powerful coercion system tynicals a mathml compliant goal window semantic selection, cut & paste

slide-6
SLIDE 6

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Style of the talk

slide-7
SLIDE 7

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Style of the talk

I will describe the subject in a way suited to formalization but not the formal details.

slide-8
SLIDE 8

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Style of the talk

I will describe the subject in a way suited to formalization but not the formal details. At a few points I will point out some tricky aspects of the formal encoding.

slide-9
SLIDE 9

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

The Prime Number Theorem

Let π(n) denote the number of primes not exceeding n. Theorem (Hadamard and La Vall´ e Poussin, 1896) π(n) ∼ n/log(n)

slide-10
SLIDE 10

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

The Prime Number Theorem

Let π(n) denote the number of primes not exceeding n. Theorem (Hadamard and La Vall´ e Poussin, 1896) π(n) ∼ n/log(n) Formalized by Avigad et al. in Isabelle (ACM-TOCL 9(1), 2007), following Selberg’s “elementary” proof (1949).

slide-11
SLIDE 11

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Chebyshev’s Theorem

Theorem (Chebyshev, 1850) There are two constants c1 and c2 such that, for any n c1 n log(n) ≤ π(n) ≤ c2 n log(n)

slide-12
SLIDE 12

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Chebyshev’s Theorem

Theorem (Chebyshev, 1850) There are two constants c1 and c2 such that, for any n c1 n log(n) ≤ π(n) ≤ c2 n log(n) Motivations for the formalization:

slide-13
SLIDE 13

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Chebyshev’s Theorem

Theorem (Chebyshev, 1850) There are two constants c1 and c2 such that, for any n c1 n log(n) ≤ π(n) ≤ c2 n log(n) Motivations for the formalization: important machinery for number theory: ψ, θ, . . .

slide-14
SLIDE 14

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Chebyshev’s Theorem

Theorem (Chebyshev, 1850) There are two constants c1 and c2 such that, for any n c1 n log(n) ≤ π(n) ≤ c2 n log(n) Motivations for the formalization: important machinery for number theory: ψ, θ, . . . methodology: provide a purely arithmetical (and constructive) formalization

slide-15
SLIDE 15

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Chebyshev’s Theorem

Theorem (Chebyshev, 1850) There are two constants c1 and c2 such that, for any n c1 n log(n) ≤ π(n) ≤ c2 n log(n) Motivations for the formalization: important machinery for number theory: ψ, θ, . . . methodology: provide a purely arithmetical (and constructive) formalization To spare logs: 2c1n ≤ nπ(n) ≤ 2c2n

slide-16
SLIDE 16

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Outline

1

Introduction

2

The factorization of n! Upper and lower bounds for B

3

Chebishev’s Ψ function

4

Bertrand’s postulate Erd¨

  • s approach (1932)

Automatic check

slide-17
SLIDE 17

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

The factorization of n!

Chebyshev’s approach: exploit the decomposition of the number n! as a product of prime numbers.

slide-18
SLIDE 18

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

The factorization of n!

Chebyshev’s approach: exploit the decomposition of the number n! as a product of prime numbers. For any prime p, the numbers 1, 2, . . . , n include just n

p

multiples of p, n

p2 multiples of p2, an so on. Hence

n! =

  • p≤n
  • i<logp(n)

pn/pi+1 (1) (see e.g. Hardy & Wright’s, pag. 342).

slide-19
SLIDE 19

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

A formal proof:(1) the factorization of n

Every integer n may be uniquely decomposed as the product of all its prime factors. Le us write ordp(n) for the multiplicity of p in n; then n =

  • p≤n

pordp(n) =

  • p≤n
  • i < logp(n)

pi+1|n

p (2) for p prime.

slide-20
SLIDE 20

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

A formal proof:(2) the factorization of n

A direct proof by induction on the upper bound of the product.

slide-21
SLIDE 21

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

A formal proof:(2) the factorization of n

A direct proof by induction on the upper bound of the

  • product. We have to rephrase the statement in the form

∀m > c(n), n =

  • p≤m

pordp(n)

slide-22
SLIDE 22

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

A formal proof:(2) the factorization of n

A direct proof by induction on the upper bound of the

  • product. We have to rephrase the statement in the form

∀m > c(n), n =

  • p≤m

pordp(n) To make induction work c(n) must be miminal: in this case, the largest prime factor of n (mpf(n)) ∀m > mpf(n), n =

  • p≤m

pordp(n)

slide-23
SLIDE 23

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

A formal proof:(3) the factorization of n in matita

✞ ☎ definition mpf n := max n (λ i .primeb i ∧ i | n). theorem lt max to pi p primeb: ∀ m,n. O < n → mpf n < m → n = pi p m (λ i .primeb i ∧ i | n) (λ p.pˆ(ord n p)). ✝ ✆

slide-24
SLIDE 24

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

A formal proof:(4) the factorization of n!

n! = Y

1≤m≤n

m = Y

1≤m≤n

Y

p≤m

Y

i < logp(m) pi+1|m

p = Y

p≤n

Y

p≤m≤n

Y

i < logp(m) pi+1|m

p = Y

p≤n

Y

i<logp(n)

Y

m ≤ n pi+1|m

p = Y

p≤n

Y

i<logp(n)

pn/pi+1

slide-25
SLIDE 25

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

The binomial coefficient B(2n) = ( 2n n )

For 2n we have: 2n! = Y

p≤2n

Y

i<logp(2n)

p2n/pi+1 (3) But 2n pi+1 = 2 n pi+1 + ( 2n pi+1 mod 2) Moreover, if n ≤ p or logp(n) ≤ i we have n pi+1 = O Hence, if we define B(n) = Y

p≤n

Y

i<logp(n)

p(n/pi+1 mod 2) equation (3) becomes 2n! = n!2B(2n) (4)

slide-26
SLIDE 26

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Upper and lower bounds for B

By induction on n we easily prove: 22n 2n ≤ B(2n) = 2n! n!2 ≤ 22n−1

slide-27
SLIDE 27

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Upper and lower bounds for B

By induction on n we easily prove: 22n 2n ≤ B(2n) = 2n! n!2 ≤ 22n−1

For technical reasons, we need a slightly stronger results, namely, B(2n) = 2n! n!2 ≤ 22n−2 that holds for any n larger than 4.

slide-28
SLIDE 28

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Outline

1

Introduction

2

The factorization of n! Upper and lower bounds for B

3

Chebishev’s Ψ function

4

Bertrand’s postulate Erd¨

  • s approach (1932)

Automatic check

slide-29
SLIDE 29

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Chebishev’s Ψ function

Ψ(n) =

  • p≤n

plogp(n)

slide-30
SLIDE 30

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Chebishev’s Ψ function

Ψ(n) =

  • p≤n

plogp(n) Chebyshev’s ψ is the naperian logarithm of Ψ: ψ =

  • p≤n

log n log p log p

slide-31
SLIDE 31

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Relation between Ψ and π

Ψ(n) =

  • p≤n

plogp(n) ≤

  • p≤n

n = nπ(n) (5) nπ(n) ≤

  • p≤n

plogp(n)+1 ≤

  • p≤n

p2logp(n) = Ψ(n)2 (6)

slide-32
SLIDE 32

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Relation between Ψ and π

Ψ(n) =

  • p≤n

plogp(n) ≤

  • p≤n

n = nπ(n) (5) nπ(n) ≤

  • p≤n

plogp(n)+1 ≤

  • p≤n

p2logp(n) = Ψ(n)2 (6) Next: provide lower and upper bounds for Ψ.

slide-33
SLIDE 33

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ lower bound

We have: Ψ(n) =

  • p≤n

plogp(n) =

  • p≤n
  • i<logp(n)

p ≥ B(n)

slide-34
SLIDE 34

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ lower bound

We have: Ψ(n) =

  • p≤n

plogp(n) =

  • p≤n
  • i<logp(n)

p ≥ B(n) Hence, the lower bound for B gives a lower bound for Ψ: 22n/2n ≤ B(2n) ≤ Ψ(2n) (7)

slide-35
SLIDE 35

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ lower bound

We have: Ψ(n) =

  • p≤n

plogp(n) =

  • p≤n
  • i<logp(n)

p ≥ B(n) Hence, the lower bound for B gives a lower bound for Ψ: 22n/2n ≤ B(2n) ≤ Ψ(2n) (7) In particular, since Ψ is monotonic 2n/2 ≤ Ψ(n) (8)

slide-36
SLIDE 36

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ upper bound (1)

For the upper bound, let us first observe that Ψ(2n) = (

  • p≤2n
  • i<logp(2n)

pj(n,p,i))Ψ(n) (9) where j(n, p, i) is 1 if n < pi+1 and 0 otherwise.

slide-37
SLIDE 37

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ upper bound (1)

For the upper bound, let us first observe that Ψ(2n) = (

  • p≤2n
  • i<logp(2n)

pj(n,p,i))Ψ(n) (9) where j(n, p, i) is 1 if n < pi+1 and 0 otherwise.

Indeed Ψ(2n) = Y

p≤2n

Y

i<logp(2n)

p = ( Y

p≤2n

Y

i<logp(2n)

pj(n,p,i))( Y

p≤2n

Y

i<logp(2n)

p1−j(n,p,i)) = ( Y

p≤2n

Y

i<logp(2n)

pj(n,p,i))Ψ(n)

slide-38
SLIDE 38

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ upper bound (2)

Then observe that

  • p≤2n
  • i<logp(2n)

pj(n,p,i) ≤ B(2n) =

  • p≤2n
  • i<logp(2n)

p(2n/pi+1 mod 2) since if n < pi+1 then 2n/pi+1 mod 2 = 1.

slide-39
SLIDE 39

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ upper bound (2)

Then observe that

  • p≤2n
  • i<logp(2n)

pj(n,p,i) ≤ B(2n) =

  • p≤2n
  • i<logp(2n)

p(2n/pi+1 mod 2) since if n < pi+1 then 2n/pi+1 mod 2 = 1. Hence: Ψ(2n) ≤ B(2n)Ψ(n) (10)

slide-40
SLIDE 40

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ upper bound (2)

Using B upper estimates, we have, for any n Ψ(2n) ≤ 22n−1Ψ(n) (11) and for 4 < n Ψ(2n) ≤ 22n−2Ψ(n) (12)

slide-41
SLIDE 41

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Ψ upper bound (2)

Using B upper estimates, we have, for any n Ψ(2n) ≤ 22n−1Ψ(n) (11) and for 4 < n Ψ(2n) ≤ 22n−2Ψ(n) (12) We may now use inductively these extimates to prove Ψ(n) ≤ 22n−3 (13)

slide-42
SLIDE 42

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Summary

In conclusion, 22n 2n ≤ B(2n) ≤ 22n−1 2n n ≤ Ψ(n) ≤ 22n−3 2n/2 ≤ 2n n ≤ Ψ(n) ≤ nπ(n) ≤ Ψ(n)2 ≤ 24n−6 ≤ 24n (14)

slide-43
SLIDE 43

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Outline

1

Introduction

2

The factorization of n! Upper and lower bounds for B

3

Chebishev’s Ψ function

4

Bertrand’s postulate Erd¨

  • s approach (1932)

Automatic check

slide-44
SLIDE 44

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Bertrand’s postulate

Chebyshev’s approach was similar but more precise: (c1+o(1)) n logn ≤ π(n) ≤ (c2+o(1)) n logn (n → ∞) with c1 = log(21/231/351/530−1/30) ≈ 0.92129 c2 = 6/5c1 ≈ 1.10555

slide-45
SLIDE 45

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Bertrand’s postulate

Chebyshev’s approach was similar but more precise: (c1+o(1)) n logn ≤ π(n) ≤ (c2+o(1)) n logn (n → ∞) with c1 = log(21/231/351/530−1/30) ≈ 0.92129 c2 = 6/5c1 ≈ 1.10555 In particular, since c2 < 2c1 π(2n) > π(n) for all large n (Bertrand’s postulate).

slide-46
SLIDE 46

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Erd¨

  • s approach (1932)

Let k(n, p) =

  • i<logpn

(n/pi+1 mod 2) Then, B(n) =

  • p≤n

pk(n,p) We now split this product in two parts B1 and B2, according to k(n, p) = 1 or k(n, p) > 1.

slide-47
SLIDE 47

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

case k(n, p) = 1

Suppose that Bertrand postulate is false: there is no prime between n and 2n. Morevoer, if 2n

3 < p ≤ n, then

k(2n, p) =

  • i<logpn

(n/pi+1 mod 2) = 0

slide-48
SLIDE 48

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

case k(n, p) = 1

Suppose that Bertrand postulate is false: there is no prime between n and 2n. Morevoer, if 2n

3 < p ≤ n, then

k(2n, p) =

  • i<logpn

(n/pi+1 mod 2) = 0 Indeed 2n/p = 2 for i > 1, and n ≥ 6, 2n/pi = 0, since 2n ≤ (2n 3 )2 ≤ pi

slide-49
SLIDE 49

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

case k(n, p) = 1

Summing up, assuming Bertrand’s postulate is false, B1(2n) =

  • p ≤ 2n

k(2n, p) = 1

p =

  • p≤2n/3

p ≤ Ψ(2n/3) ≤ 22∗(2n/3)

slide-50
SLIDE 50

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

case k(n, p) > 1

k(n, p) =

  • i<logpn

(n/pi+1 mod 2) ≤ logpn

slide-51
SLIDE 51

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

case k(n, p) > 1

k(n, p) =

  • i<logpn

(n/pi+1 mod 2) ≤ logpn k(2n, p) ≥ 2 ⇒ logp2n ≥ 2 ⇒ p ≤ √ 2n

slide-52
SLIDE 52

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

case k(n, p) > 1

k(n, p) =

  • i<logpn

(n/pi+1 mod 2) ≤ logpn k(2n, p) ≥ 2 ⇒ logp2n ≥ 2 ⇒ p ≤ √ 2n B2(2n) =

  • p ≤ 2n

2 ≤ k(2n, p)

pk(2n,p) ≤

  • p≤

√ 2n

2n = (2n)π(

√ 2n)

≤ (2n)

√ 2n/2−1

slide-53
SLIDE 53

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

A contradictory upper bound

Putting everything together, assuming Bertrand’s postulate is false, we would have, for any n ≥ 27 22n ≤ 2nB(2n) = 2nB1(2n)B2(2n) ≤ 22(2n/3)(2n)

√ 2n/2

that, by algebraic manipulations and taking logarithms, gives 2n 3 ≤ √ 2n 2 (log2n + 1)

slide-54
SLIDE 54

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Make the contradiction explicit

slide-55
SLIDE 55

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Make the contradiction explicit

find an integer m such that for all values larger than m the equation 2n 3 ≤ √ 2n 2 (log2n + 1) is false

slide-56
SLIDE 56

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Make the contradiction explicit

find an integer m such that for all values larger than m the equation 2n 3 ≤ √ 2n 2 (log2n + 1) is false

  • nly use arithmetical means
slide-57
SLIDE 57

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Make the contradiction explicit

find an integer m such that for all values larger than m the equation 2n 3 ≤ √ 2n 2 (log2n + 1) is false

  • nly use arithmetical means

m must be sufficiently small to allow to check the remaining cases automatically in a feasible time.

slide-58
SLIDE 58

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Reduce √ 2n 2 (log2n + 1) < 2n 3 to (∗) √ 2n 2 (log2n + 1) ≤ 2n 4 using the fact that n m + 1 < n m for any n ≥ m2 (in our case, n ≥ 8). Then transform (∗) to 2(log n + 2)2 ≤ n

slide-59
SLIDE 59

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Use the fact that for any a > 0 and any n ≥ 4a 2an2 ≤ 2n to get, for any n ≥ 28 2(log n + 2)2 ≤ 4(log n)2 = 22(log n)2 ≤ 2log n n

slide-60
SLIDE 60

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Automatic check

To complete the proof, we have to check that Bertrand’s postulate is true for all integers less then 28. To this aim, we

slide-61
SLIDE 61

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Automatic check

To complete the proof, we have to check that Bertrand’s postulate is true for all integers less then 28. To this aim, we

1 generate the list of all primes up to the first prime larger

than 28 (in reverse order)

slide-62
SLIDE 62

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Automatic check

To complete the proof, we have to check that Bertrand’s postulate is true for all integers less then 28. To this aim, we

1 generate the list of all primes up to the first prime larger

than 28 (in reverse order)

2 check that for any pair pi, pi+1 of consecutive primes in

such list, pi < 2pi+1

slide-63
SLIDE 63

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Automatic check

To complete the proof, we have to check that Bertrand’s postulate is true for all integers less then 28. To this aim, we

1 generate the list of all primes up to the first prime larger

than 28 (in reverse order)

2 check that for any pair pi, pi+1 of consecutive primes in

such list, pi < 2pi+1 Both the generation of the list and its check are performed automatically (takes few seconds). Using reflection, prove that our algorithm for generating primes is correct and complete, and that the previous check is equivalent to Bertrand’s postulate, on the given interval.

slide-64
SLIDE 64

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Eratosthene’s sieve

To generate primes we use the following sieve of Eratosthene

✞ ☎ let rec sieve aux l1 l2 t on t := match t with [ O ⇒ l1 (∗ this case is vacuous ∗) | S t1 ⇒ match l2 with [ nil ⇒ l1 | cons n tl ⇒ sieve aux (n:: l1) ( filter nat tl (λ x.notb (x | n))) t1 ]]. definition sieve m := sieve aux [] ( list n m) m. ✝ ✆

slide-65
SLIDE 65

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Checking Bertrand’s condition

To check that each element of the list is less than twice its successor:

✞ ☎ let rec check list l \def match l with [ nil ⇒ true | cons hd tl ⇒ match tl with [ nil ⇒ hd = 2 | cons hd1 tl1 ⇒ hd1 < hd ∧ hd ≤2∗hd1 ∧ check list tl ] ] . ✝ ✆

slide-66
SLIDE 66

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Resources - library integrations

Prerequisites and integrations to the library logarithms, square root (632 lines) inequalities involving integer division (339 lines) magnitude of functions (255 lines) decomposition of a number n as a product of its primes (250 lines) binomial coefficients (260 lines) properties of the factorial function, lower and upper bounds of the binomial coefficient ( 2n n ) (303 lines) integrations to the library for and (148 lines)

  • perations over lists (224 lines)
slide-67
SLIDE 67

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Resources - other

Selection from the garbage collector Chebyshev’s Θ function (500 lines) Abel summation (209 lines) Upper and lower bounds for Euler’s e constant (1154 lines)

slide-68
SLIDE 68

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Resources - other

prereq. chebys. bertrand check

  • ther

total ln. 2411 2073 743 526 1863 7616 h. 54 51 21 16 48 190 1.5 min per script line in Hardy’s book [6], the proof of Bertrand’s postulate takes 42 lines, while Chebyshev’s theorem takes precisely three pages (90 lines): De Brujin factor ≈ 20-25 1.5 hours/source mathematical line.

slide-69
SLIDE 69

Introduction The factorization of n!

Upper and lower bounds for B

Chebishev’s Ψ function Bertrand’s postulate

Erd¨

  • s approach

(1932) Automatic check

Bibliography

T.M.Apostol. Introduction to Analytic Number Theory. Springer Verlag, 1976. A.Asperti, C.Armentano. A Page In Number Theory. Journal of Formalized

  • Reasoning. Vol.1, 2008.

J.Avigad, K.Donnelly, D.Gray, P .Raff. A formally verified proof of the prime number theorem. ACM Transactions on Computational Logic, 9(1), 2007. To appear in the ACM Transactions on Computational Logic. P .Erd¨

  • s. Beweis eines Satzes von Tschebyschef. In Acta Scientifica

Mathematica, volume 5, pages 194-198, 1932. G.J.O.Jameson. The Prime Number Theorem. London Mathematical Society Student Texts 53, Cambridge University Press, 2003. G.H.Hardy, E.M.Wright. An introduction to the theory of numbers, Oxford University Press, 1938. Fourth edition 1975. G.Tenenbaum, M.Mendes France. The Prime Numbers and Their

  • Distribution. Student Mathematical Library, American Mathematical

Society,2000. L.Th´

  • ery. Proving Pearl: Knuth’s Algorithm for Prime Numbers. Proceeedings
  • f TPHOLs’03, LNCS 2758, pp.304-318, 2003.