Fixpoint Qpositive_le_bool (w w' : Qpositive) {struct w'} : bool :=
  match w with
  | One => match w' with
           | dL y => false
           | _ => true
           end
  | dL y => match w' with
            | dL y' => Qpositive_le_bool y y'
            | _ => true
            end
  | nR y => match w' with
            | nR y' => Qpositive_le_bool y y'
            | _ => false
            end
  end.Definition Qpositive_le (w w' : Qpositive) := Qpositive_le_bool w w' = true.Definition Qpositive_le' (w w' : Qpositive) :=
  match Qpositive_i w, Qpositive_i w' with
  | (p, q), (p', q') => p * q' <= p' * q
  end.

(* Specifications: *)
Theorem Qpositive_le_to_Qpositive_le' : forall w w' : Qpositive, Qpositive_le w w' -> Qpositive_le' w w'.
Theorem Qpositive_le'_to_Qpositive_le : forall w w' : Qpositive, Qpositive_le' w w' -> Qpositive_le w w'.
Theorem Qpositive_le_trans : forall w w' w'' : Qpositive, Qpositive_le w w' -> Qpositive_le w' w'' -> Qpositive_le w w''.
Theorem Qpositive_le_antisym : forall w w' : Qpositive, Qpositive_le w w' -> Qpositive_le w' w -> w = w'.
Theorem Qpositive_le_refl : forall w : Qpositive, Qpositive_le w w.
Theorem Qpositive_le_total : forall w w' : Qpositive, Qpositive_le w w' \/ Qpositive_le w' w.
Theorem not_Qpositive_le_not_eq : forall n m : Qpositive, ~ Qpositive_le n m -> n <> m.
Theorem not_Qpositive_le_Qpositive_le' : forall n m : Qpositive, ~ Qpositive_le n m -> Qpositive_le m n.
Lemma Qpositive_le_noneq_explicit: forall qp qp', Qpositive_le qp qp' -> ~ qp=qp' -> let (p, q) := Qpositive_i qp in let (p', q') := Qpositive_i qp' in (p * q' < p' * q)%nat.