In his book “The Art of Computer Programming”, Donald Knuth gives an algorithm to compute the first n prime numbers. Surprisingly, proving the correctness of this simple algorithm from basic principles is far from being obvious
and requires a wide range of verification techniques. In this paper, we explain how the verification has been mechanised in
the Coq proof system.