(* step 2 *)

(* Intersection between the unit circle and D_r *)
Definition interCDr (r x y : R) := (in_ucirc x y) /\ (D_r r x y).(* Points of the intersection *)
Definition p1 := (-1,0)%R.Definition p2 (r : R) :=
  let den := (1 + r * r)%R in
  ((1 - r * r) / den, 2 * r / den)%R.(* Equality over points *)
Definition eqp (p1 p2 : R * R) := (fst p1) = (fst p2) /\ (snd p1)= (snd p2).

(* Specifications: *)
Lemma ordp : forall p1 p2 : R * R, (eqp p1 p2) \/ ~(eqp p1 p2).
Lemma interCDr_sol : forall r x y : R, (interCDr r x y) -> (eqp (x,y) p1) \/ (eqp (x,y) (p2 r)).
Lemma rat_coo1 : forall x y : R, (in_ucirc x y) /\ (exists r : R, (is_rat r) /\ (interCDr r x y)) -> (is_ratp (x,y)).
Lemma rat_coo2 : forall x y : R, (in_ucirc x y) /\ (is_ratp (x,y)) -> exists r : R, (is_rat r) /\ (interCDr r x y).