Function:
(defun svstack-nonempty-fix (x) (declare (xargs :guard (svstack-p x))) (let ((__function__ 'svstack-nonempty-fix)) (declare (ignorable __function__)) (b* ((x (svstack-fix x))) (if (atom x) (list nil) x))))
Theorem:
(defthm svstack-p-of-svstack-nonempty-fix (b* ((new-x (svstack-nonempty-fix x))) (svstack-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm consp-of-svstack-nonempty-fix (b* ((?new-x (svstack-nonempty-fix x))) (consp new-x)))
Theorem:
(defthm svstack-nonempty-fix-when-consp (b* nil (implies (consp x) (equal (svstack-nonempty-fix x) (svstack-fix x)))))
Theorem:
(defthm svstack-nonempty-fix-of-svstack-fix-x (equal (svstack-nonempty-fix (svstack-fix x)) (svstack-nonempty-fix x)))
Theorem:
(defthm svstack-nonempty-fix-svstack-equiv-congruence-on-x (implies (svstack-equiv x x-equiv) (equal (svstack-nonempty-fix x) (svstack-nonempty-fix x-equiv))) :rule-classes :congruence)