(** *** Semi-lattice algebraic properties of [max] *)

(* Specifications: *)
Lemma max_id n : max n n == n.
Notation max_idempotent := max_id (only parsing).
Lemma max_assoc m n p : max m (max n p) == max (max m n) p.
Lemma max_comm n m : max n m == max m n.
Ltac solve_max :=
match goal with |- context [max ?n ?m] =>
destruct (max_spec n m); intuition; order
end.