intros goal i work ds ni ai a a' context notlookup_bs notlookup_i equiv_ins
premiss.
unfold nsearch_spec in |- *; intros complete sound mon.
elim premiss; clear premiss.
intros ni1 less1 complete1 spec1.
apply NSearch_Res with ni1.
assumption.
apply deco_sound_shift_a_work with a'; assumption.
elim spec1; clear spec1.
intros derivable_goal; apply NDerivable; assumption.
intros k k_is_mon k_forces_ngamma k_nonforces_goal.
apply NRefutable with k; try assumption.
apply forces_ngamma_shift_a_work with a'; assumption.
(* side premisses: Elim premiss.  *)
apply deco_sound_shift_work_a with i a; assumption.
apply nsound_shift_work_a with i a; assumption.
apply nminimal_shift_work_a with i a; assumption.
Qed.

Lemma shift_ni_dni :
forall (goal : Int) (work : nf_list) (ds : disjs)
(x : nimp) (k : kripke_tree) (ni : nested_imps)
(dni : decorated_nested_imps) (ai : atomic_imps)
(a : atoms) (context : flist),
nsearch_spec goal work ds (rev_app ((x, k) :: dni) ni) ai a context ->
nsearch_spec goal work ds (rev_app dni (Decorated x k :: ni)) ai a context.