Section list_embeding.
Variable A : Set.
Variable leA : A -> A -> Prop.
Hypothesis eqA_dec : forall a a' : A, {a = a'} + {a <> a'}.
Hypothesis leA_dec : forall a a', {leA a a'} + {~ leA a a'}.
Hypothesis leA_trans : forall a a' a'', leA a a' -> leA a' a'' -> leA a a''.
Definition embeds : list A -> list A -> Prop := Embeds leA.
Definition sublist : list (list A) -> list (list A) -> Prop := Embeds (eq (A:= list A)).
Fact nil_embeds : forall w, embeds nil w.
Fact sublist_refl : forall l, sublist l l.
Fact good_sublist : forall l l', sublist l l' -> good embeds l -> good embeds l'.
Fact bad_sublist :  forall l l', sublist l' l -> bad embeds l -> bad embeds l'.
Fact greater_add_letter : forall a w ws, greater embeds w ws ->
greater embeds (a :: w) ws.
Fact greater_remove_letter : forall a w ws,
greater embeds w ws -> greater embeds (a :: w) ws.
Fact sorted_remove_head : forall a l, sorted leA (a::l) -> sorted leA l.

Lemma sorted_remove_inner : forall a a' l, sorted leA (a::a'::l) -> sorted leA (a::l).