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