Lower a meta-level value to an ACL2 good value.
(lower-value xval) → x
This is the inverse of lift-value.
Function:
(defun lower-value (xval) (declare (xargs :guard (valuep xval))) (let ((__function__ 'lower-value)) (declare (ignorable __function__)) (value-case xval :number (value-number->get xval) :character (value-character->get xval) :string (value-string->get xval) :symbol (lower-symbol (value-symbol->get xval)) :cons (cons (lower-value (value-cons->car xval)) (lower-value (value-cons->cdr xval))))))
Theorem:
(defthm good-valuep-of-lower-value (b* ((x (lower-value xval))) (good-valuep x)) :rule-classes :rewrite)
Theorem:
(defthm lower-value-of-value-fix-xval (equal (lower-value (value-fix xval)) (lower-value xval)))
Theorem:
(defthm lower-value-value-equiv-congruence-on-xval (implies (value-equiv xval xval-equiv) (equal (lower-value xval) (lower-value xval-equiv))) :rule-classes :congruence)