Lemma minusNonnegativeRationals_ltcompat_l' : ∏ x y z : NonnegativeRationals, x - z < y - z -> x < y. Proof. intros x y z Hlt. assert (Hyz : (z < y)%NRat). { apply_pr2 ispositive_minusNonnegativeRationals. apply istrans_le_lt_ltNonnegativeRationals with (x - z). { now apply isnonnegative_NonnegativeRationals. } exact Hlt. } generalize (isdecrel_leNonnegativeRationals x z) ; apply sumofmaps ; intro Hxz. - apply istrans_le_lt_ltNonnegativeRationals with (1 := Hxz). exact Hyz. - apply notge_ltNonnegativeRationals in Hxz ; apply lt_leNonnegativeRationals in Hxz. apply lt_leNonnegativeRationals in Hyz. rewrite <- (minusNonnegativeRationals_plus_r _ _ Hxz), <- (minusNonnegativeRationals_plus_r _ _ Hyz). apply plusNonnegativeRationals_ltcompat_r. exact Hlt. 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.