A formalized proof of Dirichlet`s theorem on primes in arithmetic