(***********************)
(* 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_simp : forall a b c : Z,
b <> 0 -> c <> 0 -> frac (c * a) (c * b) = frac a b.