(***********************)
(* Regarding rationals *)
(***********************)

Definition frac (a b : Z) := ((IZR a) / (IZR b))%R.Definition is_rat (r : R) :=
  exists pq : Z * Z, let (p,q) := pq in ~(q = 0) /\ r = (frac p q).Definition is_ratp (c : R * R) := let (x,y) := c in (is_rat x) /\ (is_rat y).

Lemma frac_eq : forall a b c d : Z, b <> 0 -> c <> 0 -> (frac a (b * c)) = (frac d c) -> a = b * d.