(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *   INRIA, CNRS and contributors - Copyright 1999-2019       *)
(* <O___,, *       (see CREDITS file for the list of authors)           *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(************************************************************************)
Local Open Scope ConstructiveReals.
(** Properties of constructive absolute value (defined in ConstructiveReals.CRabs). Definition of minimum, maximum and their properties.  WARNING: this file is experimental and likely to change in future releases. *)
#[global]
Instance CRabs_morph
: forall {R : ConstructiveReals},
CMorphisms.Proper
(CMorphisms.respectful (CReq R) (CReq R)) (CRabs R).
Add Parametric Morphism {R : ConstructiveReals} : (CRabs R)
with signature CReq R ==> CReq R
as CRabs_morph_prop.

Lemma CRabs_triang_inv : forall {R : ConstructiveReals} (x y : CRcarrier R),
CRabs R x - CRabs R y <= CRabs R (x - y).