Section RSA.
Variable p q : nat.
Variable prime_p : prime p.
Variable prime_q : prime q.
Variable neq_pq : p <> q.
Variable e d : nat.
Variable pq : nat.
Hypothesis pqnot_zero : pq <> 0.
Hypothesis pq_div_p : divides (p - 1) pq.
Hypothesis pq_div_q : divides (q - 1) pq.
Variable ed_inv : congruent pq (e * d) 1.
Definition encrypt (w : nat) : nat := power w e.
Definition decrypt (w : nat) : nat := power w d.

Lemma Chinese :
forall a b : nat,
b <= a -> congruent p a b -> congruent q a b -> congruent (p * q) a b.