Module Import Private_Tac := !MakeOrderTac O O.
(** An alternative characterisation of [max], equivalent to [max_l /\ max_r] *)
(** A more symmetric version of [max_spec], based only on [le]. Beware that left and right alternatives overlap. *)
Instance : Proper (eq==>eq==>iff) le.
(** A function satisfying the same specification is equal to [max]. *)
(** [max] commutes with monotone functions. *)
(** *** Semi-lattice algebraic properties of [max] *)
Notation max_idempotent := max_id (only parsing).
Ltac solve_max :=
match goal with |- context [max ?n ?m] =>
destruct (max_spec n m); intuition; order
end.
(** *** Least-upper bound properties of [max] *)
(** Properties of [min] *)
Instance min_compat : Proper (eq==>eq==>eq) min.
Notation min_idempotent := min_id (only parsing).
Ltac solve_min :=
match goal with |- context [min ?n ?m] =>
destruct (min_spec n m); intuition; order
end.
(** *** Combined properties of min and max *)
(** Distributivity *)
(** Modularity *)
(** Disassociativity *)
(** Anti-monotonicity swaps the role of [min] and [max] *)

Lemma max_min_antimono f :
Proper (eq==>eq) f ->
Proper (le==>flip le) f ->
forall x y, max (f x) (f y) == f (min x y).