#[global]
Instance min_compat : Proper (eq==>eq==>eq) min.

(* Specifications: *)
Lemma min_unicity n m p :
((n < m /\ p == n) \/ (m <= n /\ p == m)) ->  p == min n m.
Lemma min_unicity_ext f :
(forall n m, (n < m /\ f n m == n)  \/ (m <= n /\ f n m == m)) ->
(forall n m, f n m == min n m).
Lemma min_mono f :
(Proper (eq ==> eq) f) ->
(Proper (le ==> le) f) ->
forall x y, min (f x) (f y) == f (min x y).
Lemma min_id n : min n n == n.
Notation min_idempotent := min_id (only parsing).
Lemma min_assoc m n p : min m (min n p) == min (min m n) p.
Lemma min_comm n m : min n m == min m n.
Ltac solve_min :=
match goal with |- context [min ?n ?m] =>
destruct (min_spec n m); intuition; order
end.
Lemma le_min_r n m : min n m <= m.
Lemma min_le_iff n m p : min n m <= p <-> n <= p \/ m <= p.
Lemma min_lt_iff n m p : min n m < p <-> n < p \/ m < p.
Lemma min_glb_l n m p : p <= min n m -> p <= n.
(** *** Combined properties of min and max *)
Lemma min_max_absorption n m : max n (min n m) == n.
Lemma max_min_absorption n m : min n (max n m) == n.
(** Distributivity *)
Lemma max_min_distr n m p :
max n (min m p) == min (max n m) (max n p).
Lemma min_max_distr n m p :
min n (max m p) == max (min n m) (min n p).