Definition encrypt (w : nat) : nat := power w e.Definition decrypt (w : nat) : nat := power w d.

(* Specifications: *)
Lemma gcd_pq_SO : is_gcd p q 1.
Lemma Chinese : forall a b : nat, b <= a -> congruent p a b -> congruent q a b -> congruent (p * q) a b.
Lemma prime_2_or_more : forall r : nat, prime r -> r = 2 \/ 2 < r.
Lemma phi_gt_SO : 1 < pq.
Theorem rsa_correct : forall w : nat, congruent (p * q) (decrypt (encrypt w)) w.
Theorem rsa_correct' : forall w : nat, congruent (p * q) (decrypt d (encrypt e w)) w.