Get the name field from a lhatom-var.
This is an ordinary field accessor created by defprod.
Function:
(defun lhatom-var->name$inline (x) (declare (xargs :guard (lhatom-p x))) (declare (xargs :guard (equal (lhatom-kind x) :var))) (let ((__function__ 'lhatom-var->name)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (lhatom-kind x) :var) x))) (svar-fix (if (or (atom x) (and (eq (car x) :var) (consp (cdr x)))) x (car x)))) :exec (if (or (atom x) (and (eq (car x) :var) (consp (cdr x)))) x (car x)))))
Theorem:
(defthm svar-p-of-lhatom-var->name (b* ((name (lhatom-var->name$inline x))) (svar-p name)) :rule-classes :rewrite)
Theorem:
(defthm lhatom-var->name$inline-of-lhatom-fix-x (equal (lhatom-var->name$inline (lhatom-fix x)) (lhatom-var->name$inline x)))
Theorem:
(defthm lhatom-var->name$inline-lhatom-equiv-congruence-on-x (implies (lhatom-equiv x x-equiv) (equal (lhatom-var->name$inline x) (lhatom-var->name$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm lhatom-var->name-when-wrong-kind (implies (not (equal (lhatom-kind x) :var)) (equal (lhatom-var->name x) (svar-fix nil))))