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 left_nimp : forall (goal : Int) (work : nf_list) (ds : disjs) (a0 a1 : Int) (b : normal_form) (ni : nested_imps) (dni : decorated_nested_imps) (ai : atomic_imps) (a : atoms) (context : flist), (forall ni1 : nested_imps, le_ni (rev_app dni ni) ni1 -> nsearch_spec a1 (AImp a1 b :: NAtom a0 :: work) ds ni1 ai a (Atom a0 :: context)) -> (forall ni1 : nested_imps, le_ni ni1 (rev_app dni ni) -> nsearch_spec goal (b :: work) ds ni1 ai a context) -> (forall (ni1 : nested_imps) (k : kripke_tree), le_ni ni1 (rev_app ((NImp a0 a1 b, k) :: dni) ni) -> nsearch_spec goal work ds ni1 ai a context) -> nsearch_spec goal work ds (rev_app dni (Undecorated (NImp a0 a1 b) :: ni)) ai a context.