(* Step 5 *)
(* The full condition over p and q *)
(* The (new) set of positive rational coordinates of the unit circle *)
Definition in_ucp_set (x y : R) :=
exists p : Z, exists q : Z,
(x = (fst (ucp p q)) /\ y = (snd (ucp p q)) \/
x = (snd (ucp p q)) /\ y = (fst (ucp p q))) /\ (cond_pq p q).

(* Inclusion of in_ucp_setb in in_ucp_set *)
Lemma nrat_pos_coo2 : forall x y : R, (in_ucp_setb x y) -> (in_ucp_set x y).
Definition pytha_set (a b c : Z) :=
exists p : Z, exists q : Z, exists m : Z,
(a = m * (q * q - p * p) /\ b = 2 * m * (p * q) \/
a = 2 * m * (p * q) /\ b = m * (q * q - p * p)) /\
c = m * (p * p + q * q) /\ m >= 0 /\ (cond_pq p q).