Hint Rewrite intP : core.
Arguments itvP [x i].
Definition itv_intersection (x y : interval R) : interval R :=
let: Interval x x' := x in
let: Interval y y' := y in
Interval
(if le_boundl x y then y else x)
(if le_boundr x' y' then x' else y').
Definition itv_intersection1i : left_id `]-oo, +oo[ itv_intersection.

(* Specifications: *)
Lemma subitvPr (a b1 b2 : itv_bound R) :
le_boundr b1 b2 -> {subset (Interval a b1) <= (Interval a b2)}.
Lemma itv_splitU2 (x : R) a b : x \in Interval a b ->
forall y, y \in Interval a b =
[|| (y \in Interval a (BOpen x)), (y == x)
| (y \in Interval (BOpen x) b)].
Lemma itv_intersectionC : commutative (@itv_intersection R).
Lemma itv_intersectionA : associative (@itv_intersection R).
Canonical itv_intersection_monoid :=
Monoid.Law itv_intersectionA (@itv_intersection1i R) (@itv_intersectioni1 R).