(* File: Search.v  (last edited on 27/10/2000) (c) Klaus Weich  *)
Require Export Rules.
Require Export Weight.
Definition vlist := list (list Int * form).
Fixpoint vlist2list (gamma : vlist) : flist :=
match gamma with
| nil => fnil
| (l, a) :: gamma => vimp l a :: vlist2list gamma
end.
Fixpoint vlist2hlist (gamma : vlist) : flist :=
match gamma with
| nil => fnil
| (l, a) :: gamma => a :: vlist2hlist gamma
end.
Definition search_atom_invariant (n : nat) :=
forall (goal : Int) (gamma : vlist) (work : nf_list)
(context : flist) (j : Int),
weight_gamma (vlist2hlist gamma) < n ->
search_spec (Atom goal) (vlist2list gamma) work context j.

Lemma search_atom_aux : forall n : nat, search_atom_invariant n.