Get the car field from a value-cons.
This is an ordinary field accessor created by fty::defprod.
Function:
(defun value-cons->car$inline (x) (declare (xargs :guard (valuep x))) (declare (xargs :guard (equal (value-kind x) :cons))) (let ((__function__ 'value-cons->car)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (value-kind x) :cons) x))) (value-fix (std::da-nth 0 (cdr x)))) :exec (std::da-nth 0 (cdr x)))))
Theorem:
(defthm valuep-of-value-cons->car (b* ((car (value-cons->car$inline x))) (valuep car)) :rule-classes :rewrite)
Theorem:
(defthm value-cons->car$inline-of-value-fix-x (equal (value-cons->car$inline (value-fix x)) (value-cons->car$inline x)))
Theorem:
(defthm value-cons->car$inline-value-equiv-congruence-on-x (implies (value-equiv x x-equiv) (equal (value-cons->car$inline x) (value-cons->car$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm value-cons->car-when-wrong-kind (implies (not (equal (value-kind x) :cons)) (equal (value-cons->car x) (value-fix nil))))