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