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