induction l1;intros;
(destruct l3;[destruct l4|];discriminate||(injection H;intros;subst)).
right;exists [];split;reflexivity.
left;temp1.
right;temp1.
destruct (IHl1 _ H0) as [(?&?&?)|(?&?&?)];subst.
left;temp1.
right;temp1.
Qed.

(* Specifications: *)
Lemma in_in_split_app : forall A (a:A) b l2 l4 l1 l3, l1++a::l2=l3++b::l4 -> (exists l,l3=l1++a::l/\l2=l++b::l4)\/
(exists l,l4=l++a::l2/\l1=l3++b::l)\/
(a=b/\l1=l3/\l2=l4).