Included Books
other
(in-package "ACL2")
include-book
(include-book "get-well-founded-relation")
include-book
(include-book "std/testing/assert-equal" :dir :system)
include-book
(include-book "std/testing/must-succeed-star" :dir :system)
other
(must-succeed* (defun f (x) (declare (xargs :measure (nfix (- 10 x)))) (if (and (natp x) (< x 10)) (f (1+ x)) nil)) (assert-equal (get-well-founded-relation 'f (w state)) 'o<))
other
(must-succeed* (defun o-p$ (x) (o-p x)) (defun o<$ (x y) (o< x y)) (defun id (x) x) (defthm o<$-is-well-founded-relation (and (implies (o-p$ x) (o-p (id x))) (implies (and (o-p$ x) (o-p$ y) (o<$ x y)) (o< (id x) (id y)))) :rule-classes :well-founded-relation) (defun f (x) (declare (xargs :well-founded-relation o<$)) (if (zp x) nil (f (1- x)))) (assert-equal (get-well-founded-relation 'f (w state)) 'o<$))