Lemma minusNonnegativeRationals_lecompat_l : ∏ k x y : NonnegativeRationals, x <= y -> x - k <= y - k. Proof. intros k x y Hxy. generalize (isdecrel_leNonnegativeRationals k x) ; apply sumofmaps ; intros Hkx. - apply_pr2 (plusNonnegativeRationals_lecompat_r k). rewrite !minusNonnegativeRationals_plus_r. + exact Hxy. + now apply istrans_leNonnegativeRationals with (2 := Hxy). + exact Hkx. - rewrite minusNonnegativeRationals_eq_zero. + now apply isnonnegative_NonnegativeRationals. + now apply lt_leNonnegativeRationals, 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.