See theories WF and WF_Rel of Isabelle/HOL. They are accessible via the theory library page, http://isabelle.in.tum.de/library-Isabelle99/HOL/index.htm l You could probably port them with a bit of effort. -- Larry Paulson