Section Uniq.
Variable A: Type.
Inductive uniq: list A -> Prop :=
uniq_nil: uniq nil
| uniq_cons: forall a l, ~ In a l -> uniq l -> uniq (a::l).
End Uniq.

Lemma list_app_inj (A: Type) (l1 l2 l3 l4: list A):
length l1 = length l3 -> l1 ++ l2 = l3 ++ l4 -> l1 = l3 /\ l2 = l4.