proposition: Lemma minusNonnegativeRationals_lecompat_r' : ∏ k x y : NonnegativeRationals, x <= k -> k - y <= k - x -> x <= y.
proof: 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.
imports: UniMath.MoreFoundations.Tactics UniMath.MoreFoundations.PartA UniMath.MoreFoundations.Sets UniMath.MoreFoundations.Orders UniMath.RealNumbers.Sets UniMath.RealNumbers.Fields UniMath.Algebra.DivisionRig UniMath.OrderTheory.Lattice.Lattice UniMath.RealNumbers.Prelim