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