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