Evaluation semantics of cdr.
Function:
(defun eval-cdr (x) (declare (xargs :guard (valuep x))) (let ((__function__ 'eval-cdr)) (declare (ignorable __function__)) (cond ((value-case x :cons) (value-cons->cdr x)) (t (value-nil)))))
Theorem:
(defthm valuep-of-eval-cdr (b* ((result (eval-cdr x))) (valuep result)) :rule-classes :rewrite)
Theorem:
(defthm eval-cdr-of-value-fix-x (equal (eval-cdr (value-fix x)) (eval-cdr x)))
Theorem:
(defthm eval-cdr-value-equiv-congruence-on-x (implies (value-equiv x x-equiv) (equal (eval-cdr x) (eval-cdr x-equiv))) :rule-classes :congruence)