Arguments primePns {n}.

(* Specifications: *)
Lemma pdivP n : n > 1 -> {p | prime p & p %| n}.
Lemma primes_exp m n : n > 0 -> primes (m ^ n) = primes m.
Lemma primes_prime p : prime p -> primes p = [::p].
Lemma coprime_has_primes m n : m > 0 -> n > 0 ->
coprime m n = ~~ has (mem (primes m)) (primes n).
Lemma pdiv_id p : prime p -> pdiv p = p.
Fixpoint logn_rec d m r :=
match r, edivn m d with
| r'.+1, (_.+1 as m', 0) => (logn_rec d m' r').+1
| _, _ => 0
end.