Section ordered.
Variable A : Type.
Variable order : A -> A -> Prop.
Variable order_trans : forall a b c : A, order a b -> order b c -> order a c.
(* Ordered list with respect to an order *)
Inductive ordered : list A -> Prop :=
| ordered_nil : ordered nil
| ordered_one : forall a : A, ordered (a :: nil)
| ordered_cons :
forall (a b : A) (l : list A),
order a b -> ordered (b :: l) -> ordered (a :: b :: l).
Hint Constructors ordered : core.

(* Inversion theorem *)
Theorem ordered_inv_order :
forall (a b : A) (l : list A), ordered (a :: b :: l) -> order a b.