Fixpoint subseq {A} (xs ys : list A) : Prop :=
  match xs, ys with
    | [], _ => True
    | x :: xs', y :: ys' => (x = y /\ subseq xs' ys') \/ subseq xs ys'
    | _, _ => False
  end.

Lemma subseq_app_head : forall xs ys zs, subseq (A:=A) ys zs -> subseq (A:=A) (xs ++ ys) (xs ++ zs).