Definition ratHalf(r : Rat) :=
  r * (1 / 2).

(* Specifications: *)
Lemma ratDistance_0_r_le : forall r d, r <= d -> ratDistance r 0 <= d.
Lemma ratSubtract_le_sum : forall r1 r2 d, r2 <= r1 -> ratSubtract r1 r2 <= d -> r1 <= r2 + d.
Lemma ratDistance_le_sum : forall r1 r2 d, ratDistance r1 r2 <= d -> r1 <= r2 + d.
Lemma ratSubtract_ratDistance_le : forall r1 r2, ratSubtract r1 r2 <= ratDistance r1 r2.
Lemma minRat_le_r : forall r1 r2, minRat r1 r2 <= r2.
Lemma minRat_le_l : forall r1 r2, minRat r1 r2 <= r1.
Lemma ratDistance_ge_difference: forall r1 r2 d, ratDistance r1 r2 <= d -> ratSubtract r1 d <= r2.
Lemma ratSubtract_ratAdd_assoc_le : forall r1 r2 r3, ratSubtract (r1 + r2) r3 <= r1 + (ratSubtract r2 r3).
Lemma ratSubtract_assoc_le : forall r1 r2 r3, ratSubtract r1 (ratSubtract r2 r3) <= (ratSubtract r1 r2) + r3.
Lemma ratDistance_leRat_both : forall r1 r2 d, ratSubtract r1 r2 <= d -> ratSubtract r2 r1 <= d -> ratDistance r1 r2 <= d.
Lemma rat_distance_of_difference : forall r1 r2 r3 r4 d1 d2, r2 <= r1 -> r4 <= r3 -> ratDistance r1 r3 <= d1 -> ratDistance r2 r4 <= d2 -> ratDistance (ratSubtract r1 r2) (ratSubtract r3 r4) <= (d1 + d2).