Converts a vl-hidindex-p into a string like
(vl-flatten-hidindex x) → flat-string
Function:
(defun vl-flatten-hidindex (x) (declare (xargs :guard (vl-hidindex-p x))) (declare (xargs :guard (vl-hidindex-resolved-p x))) (let ((__function__ 'vl-flatten-hidindex)) (declare (ignorable __function__)) (b* ((name (vl-hidindex->name x)) (name (if (eq name :vl-$root) "$root" name)) (indices (vl-hidindex->indices x)) ((when (atom indices)) name) (acc nil) (acc (str::revappend-chars name acc)) (acc (vl-flatten-hidindex-aux indices acc))) (str::rchars-to-string acc))))
Theorem:
(defthm stringp-of-vl-flatten-hidindex (b* ((flat-string (vl-flatten-hidindex x))) (stringp flat-string)) :rule-classes :type-prescription)
Theorem:
(defthm vl-flatten-hidindex-of-vl-hidindex-fix-x (equal (vl-flatten-hidindex (vl-hidindex-fix x)) (vl-flatten-hidindex x)))
Theorem:
(defthm vl-flatten-hidindex-vl-hidindex-equiv-congruence-on-x (implies (vl-hidindex-equiv x x-equiv) (equal (vl-flatten-hidindex x) (vl-flatten-hidindex x-equiv))) :rule-classes :congruence)