(* This file is distributed under the terms of the MIT License, also known as the X11 Licence.  A copy of this license is in the README file that accompanied the original distribution of this file.  Based on code written by: Brian Aydemir *)
(** Assorted facts about lists. *)
Open Scope list_scope.
(* ********************************************************************** *)
(** * List structure *)

Lemma cons_eq_app : forall (A : Type) (z : A) (xs ys zs : list A),
z :: zs = xs ++ ys ->
(exists qs, xs = z :: qs /\ zs = qs ++ ys) \/
(xs = nil /\ ys = z :: zs).