Definition nsearch_invariant (n : nat) :=
  forall (goal : Int) (work : nf_list) (ds : disjs) 
    (ni : nested_imps) (ai : atomic_imps) (a : atoms) 
    (context : flist),
  nweight_Sequent work ds ni ai < n ->
  REGULAR normal_form ai ->
  a_ai_disj a ai ->
  a_goal_disj a goal -> nsearch_spec goal work ds ni ai a context.

(* Specifications: *)
Lemma nsearch_aux : forall n : nat, nsearch_invariant n.
Theorem nsearch : forall (goal : Int) (work : nf_list) (context : flist), (forall (n : nat) (a : normal_form), my_nth normal_form n work a -> Derivable context (nf2form a)) -> (forall (a : form) (k : kripke_tree), Is_Monotone_kripke_tree k -> (forall b : normal_form, In b work -> forces_t k (nf2form b)) -> In a context -> forces_t k a) -> nsearch_spec_result_aux goal work DNil NNil AI_Nil ANil context.