Lemma NonnegativeRationals_to_NonnegativeReals_minus : ∏ x y : NonnegativeRationals, NonnegativeRationals_to_NonnegativeReals (x - y)%NRat = NonnegativeRationals_to_NonnegativeReals x - NonnegativeRationals_to_NonnegativeReals y. Proof. intros x y. generalize (isdecrel_leNonnegativeRationals x y) ; apply sumofmaps ; intros Hxy. - rewrite minusNonnegativeRationals_eq_zero, Dcuts_minus_eq_zero. + reflexivity. + apply NonnegativeRationals_to_NonnegativeReals_le. exact Hxy. + exact Hxy. - apply Dcuts_minus_correct_r. rewrite <- NonnegativeRationals_to_NonnegativeReals_plus, minusNonnegativeRationals_plus_r. + reflexivity. + apply lt_leNonnegativeRationals. apply notge_ltNonnegativeRationals. exact Hxy. Qed.
Require Import UniMath.MoreFoundations.Orders. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.Notations. Require Import UniMath.RealNumbers.Sets. Require Import UniMath.OrderTheory.Lattice.Lattice. Require Import UniMath.RealNumbers.Prelim. Require Import UniMath.RealNumbers.NonnegativeRationals.