(* ratInverse only works correctly when the number is positive *)
Definition ratInverse (r : Rat) :=
  match r with
    | RatIntro n d =>
      match n with
        | O => RatIntro d (pos (S O))
        | S n' => RatIntro d (pos (S n'))
      end
  end.Fixpoint expRat r n :=
  match n with
    | O => rat1 
    | S n' => r * (expRat r n')
  end.

Lemma leRat_terms : forall n1 n2 (d1 d2 : posnat), (n1 <= n2)%nat -> (d2 <= d1)%nat -> RatIntro n1 d1 <= RatIntro n2 d2.