intros work ds ni i bs ai ai' a c lookup equiv_del in_ngamma0.
elim in_ngamma0; clear in_ngamma0 c.
intros n c0 nth; left; apply In_Work with n; assumption.
intros n i' j' nth; left; apply In_Disjs with n; assumption.
intros n x' nth; left; apply In_Nested_Imps with n; assumption.
intros i0 b0 n bs0 lookup0 nth.
elim (equal_dec i0 i).
intro equal.
right.
rewrite (equal_eq i0 i equal).
exists b0 n.
generalize equiv_del lookup0 lookup; clear equiv_del lookup0 lookup.
elim ai; clear ai; intros t avl_t.
elim ai'; clear ai'; intros t' avl_t'.
simpl in |- *.
intros.
rewrite <- (lookup_avl_equal nf_list i0 i t' bs0 bs); try assumption.
trivial.
intros notequal.
left.
apply In_Atomic_Imps with n bs0.
generalize lookup equiv_del lookup0; clear lookup equiv_del lookup0.
elim ai; clear ai; intros t avl_t.
elim ai'; clear ai'; intros t' avl_t'.
simpl in |- *; intros.
inversion_clear equiv_del.
apply H0; assumption.
assumption.
intros i' lookup'; left; apply In_Atoms; assumption.
Qed.

(* Specifications: *)
Lemma in_ngamma_ins_a_tail :
forall (work : nf_list) (ds : disjs) (ni : nested_imps)
(ai : atomic_imps) (i : Int) (a a' : atoms) (c : normal_form),
EQUIV_INS unit i (fun _ : unit => tt) tt a a' ->
in_ngamma work ds ni ai a c -> in_ngamma work ds ni ai a' c.