Lemma minusNonnegativeRationals_ltcompat_l: ∏ x y z : NonnegativeRationals, x < y -> z < y -> x - z < y - z. Proof. intros x y z Hxy Hyz. generalize (isdecrel_leNonnegativeRationals x z) ; apply sumofmaps ; intros Hxz. - rewrite minusNonnegativeRationals_eq_zero. + apply ispositive_minusNonnegativeRationals. exact Hyz. + exact Hxz. - apply (notge_ltNonnegativeRationals z x) in Hxz. apply_pr2 (plusNonnegativeRationals_ltcompat_r z) ; rewrite !minusNonnegativeRationals_plus_r. + exact Hxy. + now apply lt_leNonnegativeRationals, Hyz. + now apply lt_leNonnegativeRationals, Hxz. 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.