intros work ds ni i b ai ai' a c equiv_ins in_ngamma0.
elim in_ngamma0; clear in_ngamma0 c.
intros n c0 nth; apply In_Work with n; assumption.
intros n i' j' nth; apply In_Disjs with n; assumption.
intros n x nth; apply In_Nested_Imps with n; assumption.
intros i0 b0 n bs lookup nth.
case (equal_dec i0 i).
intro equal_i0_i.
apply In_Atomic_Imps with (S n) (b :: bs).
generalize equiv_ins lookup; clear equiv_ins lookup.
elim ai; clear ai; intros t avl_t.
elim ai'; clear ai'; intros t' avl_t'.
simpl in |- *.
intros equiv_ins lookup.
inversion_clear equiv_ins.
apply H; assumption.
apply My_NthS; assumption.
intros not_equal_i0_i.
apply In_Atomic_Imps with n bs.
generalize equiv_ins lookup; clear equiv_ins lookup.
elim ai; clear ai; intros t avl_t.
elim ai'; clear ai'; intros t' avl_t'.
simpl in |- *.
intros equiv_ins lookup.
inversion_clear equiv_ins.
apply H1; assumption.
assumption.
intros i' lookup; apply In_Atoms; assumption.
Qed.

(* Specifications: *)
Lemma in_ngamma_ins_ai_head_new :
forall (work : nf_list) (ds : disjs) (ni : nested_imps)
(i : Int) (b : normal_form) (ai ai' : atomic_imps)
(a : atoms),
(forall bs : nf_list, LOOKUP nf_list i ai bs -> False) ->
EQUIV_INS nf_list i (cons b) nf_nil ai ai' ->
in_ngamma work ds ni ai' a (AImp i b).