Fixpoint Prefix {A} (l1 : list A) l2 : Prop :=
  match l1, l2 with
    | a :: l1', b :: l2' => a = b /\ Prefix l1' l2'
    | [], _ => True
    | _, _ => False
  end.

Lemma Prefix_exists_rest : forall (l1 l2 : list A), Prefix l1 l2 -> exists rest, l2 = l1 ++ rest.