proposition: Lemma hr_to_NR_correct : ∏ (x : hr_commring), pr1 x (hr_to_NR x).
proof: Proof. intros X. generalize (pr1 (pr2 X)). apply hinhuniv. intros x. pattern X at 2. rewrite <- (setquotl0 _ X x). unfold hr_to_NR. rewrite setquotunivcomm. generalize (pr2 x). apply (pr1 (pr2 (pr2 X))). apply hinhpr. exists 0 ; simpl. change ((pr1 (pr1 x) + (pr2 (pr1 x) - pr1 (pr1 x)) + 0) = ((pr1 (pr1 x) - pr2 (pr1 x)) + pr2 (pr1 x) + 0))%NR. rewrite !isrunit_zero_plusNonnegativeReals. rewrite iscomm_plusNonnegativeReals, <- !maxNonnegativeReals_minus_plus. now apply iscomm_maxNonnegativeReals. Qed.
imports: UniMath.Algebra.Groups UniMath.Foundations.Preamble UniMath.MoreFoundations.Orders UniMath.MoreFoundations.Tactics UniMath.OrderTheory.Lattice.Lattice UniMath.RealNumbers.Prelim UniMath.RealNumbers.Sets UniMath.RealNumbers.NonnegativeRationals UniMath.RealNumbers.NonnegativeReals