Lemma NR_to_hr_abs : ∏ x : NonnegativeReals × NonnegativeReals, hr_abs (NR_to_hr x) <= maxNonnegativeReals (pr1 x) (pr2 x). Proof. intros x. unfold hr_abs. rewrite hr_to_NRpos_NR_to_hr, hr_to_NRneg_NR_to_hr. apply maxNonnegativeReals_le. - eapply istrans_leNonnegativeReals, maxNonnegativeReals_le_l. now apply minusNonnegativeReals_le. - eapply istrans_leNonnegativeReals, maxNonnegativeReals_le_r. now apply minusNonnegativeReals_le. Qed.
Require Import UniMath.Foundations.Preamble. Require Import UniMath.MoreFoundations.Orders. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.OrderTheory.Lattice.Lattice. Require Import UniMath.RealNumbers.Prelim. Require Import UniMath.RealNumbers.Sets. Require Import UniMath.RealNumbers.NonnegativeRationals.