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