Changed "undefined" to "undef" as the former clashes with Isabelle's own undefined keyword.