intros w w' w''; make_fraction w ipattern:(p) ipattern:(q) ipattern:(Heq);
make_fraction w' ipattern:(p') ipattern:(q') ipattern:(Heq');
make_fraction w'' ipattern:(p'') ipattern:(q'') ipattern:(Heq'').
intros H; apply Qpositive_le'_to_Qpositive_le;
generalize (Qpositive_le_to_Qpositive_le' _ _ H);
clear H.
unfold Qpositive_le' in |- *; simpl in |- *.
unfold Qpositive_le', Qpositive_plus in |- *; simpl in |- *; rewrite Heq;
rewrite Heq'; rewrite Heq''.
expand (S p * S q'' + S p'' * S q) (S q * S q'')
(S p * S q'' + S p'' * S q + S q * S q'') ipattern:(d) ipattern:(p3) ipattern:(q3)
ipattern:(Heq3) ipattern:(Heq1) ipattern:(Heq2).
expand (S p' * S q'' + S p'' * S q') (S q' * S q'')
(S p' * S q'' + S p'' * S q' + S q' * S q'') ipattern:(d') ipattern:(p4)
ipattern:(q4) ipattern:(Heq4) ipattern:(Heq5) ipattern:(Heq6).
intros Hle; apply mult_S_le_reg_l with d; rewrite (mult_comm (S p3));
repeat rewrite (mult_comm (S d)); repeat rewrite <- mult_assoc.
rewrite <- Heq1; rewrite <- Heq2.
apply mult_S_le_reg_l with d'; repeat rewrite mult_assoc;
repeat rewrite (mult_comm (S d')).
rewrite <- Heq5; rewrite <- Heq6.
rewrite mult_plus_distr_l; repeat rewrite mult_plus_distr_r.
match goal with
|  |- (_ + ?X1 <= _ + ?X2) =>
replace X1 with X2; [ try apply plus_le_compat_r | ring ]
end.
repeat rewrite <- (mult_comm (S q'')); repeat rewrite <- mult_assoc.
apply (fun m n p : nat => mult_le_compat_l p n m).
rewrite mult_assoc; rewrite <- (mult_comm (S q'')); rewrite <- mult_assoc;
apply (fun m n p : nat => mult_le_compat_l p n m).
rewrite (mult_comm (S q')); exact Hle.
Qed.

(* Specifications: *)
Theorem Qpositive_le_mult :
forall w w' w'' : Qpositive,
Qpositive_le w w' ->
Qpositive_le (Qpositive_mult w w'') (Qpositive_mult w' w'').