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.

Lemma itv_intersectionA : associative (@itv_intersection R).
Canonical itv_intersection_monoid :=
Monoid.Law itv_intersectionA (@itv_intersection1i R) (@itv_intersectioni1 R).