Inductive nsearch_spec_result_aux (goal : Int) (work : nf_list) 
(ds : disjs) (ni : nested_imps) (ai : atomic_imps) 
(a : atoms) (context : flist) : Set :=
  | NDerivable :
      Derivable context (Atom goal) ->
      nsearch_spec_result_aux goal work ds ni ai a context
  | NRefutable :
      forall k : kripke_tree,
      Is_Monotone_kripke_tree k ->
      forces_ngamma work ds ni ai a k ->
      (forces_t k (Atom goal) -> False) ->
      nsearch_spec_result_aux goal work ds ni ai a context.Inductive nsearch_spec_result_aux (goal : Int) (work : nf_list) 
(ds : disjs) (ni : nested_imps) (ai : atomic_imps) 
(a : atoms) (context : flist) : Set :=
  | NDerivable :
      Derivable context (Atom goal) ->
      nsearch_spec_result_aux goal work ds ni ai a context
  | NRefutable :
      forall k : kripke_tree,
      Is_Monotone_kripke_tree k ->
      forces_ngamma work ds ni ai a k ->
      (forces_t k (Atom goal) -> False) ->
      nsearch_spec_result_aux goal work ds ni ai a context.Inductive nsearch_spec_result_aux (goal : Int) (work : nf_list) 
(ds : disjs) (ni : nested_imps) (ai : atomic_imps) 
(a : atoms) (context : flist) : Set :=
  | NDerivable :
      Derivable context (Atom goal) ->
      nsearch_spec_result_aux goal work ds ni ai a context
  | NRefutable :
      forall k : kripke_tree,
      Is_Monotone_kripke_tree k ->
      forces_ngamma work ds ni ai a k ->
      (forces_t k (Atom goal) -> False) ->
      nsearch_spec_result_aux goal work ds ni ai a context.Inductive nsearch_spec_result (goal : Int) (work : nf_list) 
(ds : disjs) (ni : nested_imps) (ai : atomic_imps) 
(a : atoms) (context : flist) : Set :=
    NSearch_Res :
      forall ni1 : nested_imps,
      le_ni ni1 ni ->
      deco_sound work ds ni1 ai a ->
      nsearch_spec_result_aux goal work ds ni1 ai a context ->
      nsearch_spec_result goal work ds ni ai a context.Inductive nsearch_spec_result (goal : Int) (work : nf_list) 
(ds : disjs) (ni : nested_imps) (ai : atomic_imps) 
(a : atoms) (context : flist) : Set :=
    NSearch_Res :
      forall ni1 : nested_imps,
      le_ni ni1 ni ->
      deco_sound work ds ni1 ai a ->
      nsearch_spec_result_aux goal work ds ni1 ai a context ->
      nsearch_spec_result goal work ds ni ai a context.Definition nsearch_spec (goal : Int) (work : nf_list) 
  (ds : disjs) (ni : nested_imps) (ai : atomic_imps) 
  (a : atoms) (context : flist) :=
  deco_sound work ds ni ai a ->
  nsound work ds ni ai a context ->
  nminimal work ds ni ai a context ->
  nsearch_spec_result goal work ds ni ai a context.

Lemma rule_shift_work_ai_new : forall (goal i : Int) (b : normal_form) (work : nf_list) (ds : disjs) (ni : nested_imps) (ai ai' : atomic_imps) (a : atoms) (context : flist), (forall x : unit, LOOKUP unit i a x -> False) -> (forall bs : nf_list, LOOKUP nf_list i ai bs -> False) -> EQUIV_INS nf_list i (cons b) nf_nil ai ai' -> nsearch_spec goal work ds ni ai' a context -> nsearch_spec goal (AImp i b :: work) ds ni ai a context.