Notation "m %| d" := (dvdn m d) : nat_scope.Definition gcdn := nosimpl gcdn_rec.

(* Specifications: *)
Lemma gcdnn : idempotent gcdn.
Lemma gcdnC : commutative gcdn.
Lemma gcd0n : left_id 0 gcdn.
Lemma gcdn0 : right_id 0 gcdn.
Lemma gcd1n : left_zero 1 gcdn.
Lemma gcdn1 : right_zero 1 gcdn.
Lemma gcdn_gt0 m n : (0 < gcdn m n) = (0 < m) || (0 < n).
Lemma gcdnMDl k m n : gcdn m (k * m + n) = gcdn m n.
Lemma gcdnDl m n : gcdn m (m + n) = gcdn m n.
Lemma gcdnDr m n : gcdn m (n + m) = gcdn m n.
Lemma gcdnMl n m : gcdn n (m * n) = n.
Lemma gcdnMr n m : gcdn n (n * m) = n.
Lemma expn_min e m n : e ^ minn m n = gcdn (e ^ m) (e ^ n).