Lemma minusNonnegativeRationals_le : ∏ x y : NonnegativeRationals, x - y <= x. Proof. intros x y. apply_pr2 (plusNonnegativeRationals_lecompat_r y). generalize (isdecrel_leNonnegativeRationals y x) ; apply sumofmaps ; [intros Hle | intros Hlt]. - rewrite minusNonnegativeRationals_plus_r. + now apply plusNonnegativeRationals_le_r. + exact Hle. - rewrite minusNonnegativeRationals_eq_zero. + rewrite islunit_zeroNonnegativeRationals. apply plusNonnegativeRationals_le_l. + apply lt_leNonnegativeRationals. now apply notge_ltNonnegativeRationals. Qed.
Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.PartA. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Orders. Require Import UniMath.RealNumbers.Sets. Require Import UniMath.RealNumbers.Fields. Require Import UniMath.OrderTheory.Lattice.Lattice. Require Import UniMath.RealNumbers.Prelim.