Section RSAI.
Variable p q : nat.
Variable prime_p : prime p.
Variable prime_q : prime q.
Variable neq_pq : p <> q.
Variable e d : nat.
Variable ed_inv : congruent ((p - 1) * (q - 1)) (e * d) 1.

Theorem rsa_correct' :
forall w : nat, congruent (p * q) (decrypt d (encrypt e w)) w.