Refine errorp to use the stobj states.
Function:
(defun errorp1 (stat feat) (declare (xargs :non-executable t)) (declare (xargs :guard (non-exec (and (stat1p stat) (statp (stat-from-stat1 stat)) (featp feat) (stat-validp (stat-from-stat1 stat) feat))))) (prog2$ (acl2::throw-nonexec-error 'errorp1 (list stat feat)) (if (acl2::mbt$ (stat1p stat)) (stat->error (stat-from-stat1 stat)) 0)))
Theorem:
(defthm errorp1-to-errorp (implies (stat1p stat) (equal (errorp1 stat feat) (errorp (stat-from-stat1 stat) feat))) :rule-classes :rewrite)
Theorem:
(defthm errorp-to-errorp1 (implies (statp stat) (equal (errorp stat feat) (errorp1 (stat1-from-stat stat) feat))) :rule-classes :rewrite)