Lemma minusNonnegativeRationals_lecompat_r' : ∏ k x y : NonnegativeRationals, x <= k -> k - y <= k - x -> x <= y. Proof. intros k x y Hkx H. generalize (isdecrel_leNonnegativeRationals y k) ; apply sumofmaps ; intros Hky. - apply (plusNonnegativeRationals_lecompat_r y) in H. rewrite minusNonnegativeRationals_plus_r, iscomm_plusNonnegativeRationals in H. + apply (plusNonnegativeRationals_lecompat_r x) in H ; rewrite isassoc_plusNonnegativeRationals, minusNonnegativeRationals_plus_r, iscomm_plusNonnegativeRationals in H. * now apply_pr2 (plusNonnegativeRationals_lecompat_r k). * exact Hkx. + exact Hky. - apply istrans_leNonnegativeRationals with k. + exact Hkx. + 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.