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

(* Specifications: *)
Lemma Prefix_refl : forall (l : list A), Prefix l l.
Lemma Prefix_nil : forall (l : list A), Prefix l [] -> l = [].
Lemma Prefix_cons : forall (l l' : list A) a, Prefix l' l -> Prefix (a :: l') (a :: l).
Lemma Prefix_in : forall (l l' : list A), Prefix l' l -> forall x, In x l' -> In x l.
Lemma app_Prefix : forall (xs ys zs : list A), xs ++ ys = zs -> Prefix xs zs.
Lemma Prefix_In : forall (l : list A) l' x, Prefix l l' -> In x l -> In x l'.
Lemma Prefix_exists_rest : forall (l1 l2 : list A), Prefix l1 l2 -> exists rest, l2 = l1 ++ rest.