Proof using.
intros l1; elim l1; simpl in |- *; auto.
intros (a2, l2); case l2; auto.
intros l H l0 H0 H1; case (H0 a2); simpl in |- *; auto.
intros b l l0 H l3 H0 H1; apply not_null_cons; auto.
red in |- *; intros H2; discriminate.
apply H; auto.
apply not_null_inv with (1 := H0).
Qed.
Hint Resolve not_null_app : core.

(* Specifications: *)
(* Adding an element in each component of a code makes it non-empty *)
Theorem not_null_map :
forall (l : list (A * list bool)) b,
not_null (map (fun v => match v with
| (a1, b1) => (a1, b :: b1)
end) l).