Recognizer for alists whose values are strings.
Function:
(defun vl-string-values-p (x) (declare (xargs :guard t)) (if (consp x) (and (consp (car x)) (stringp (cdar x)) (vl-string-values-p (cdr x))) (not x)))
Theorem:
(defthm vl-string-values-p-when-not-consp (implies (not (consp x)) (equal (vl-string-values-p x) (not x))))
Theorem:
(defthm vl-string-values-p-of-cons (equal (vl-string-values-p (cons a x)) (and (consp a) (stringp (cdr a)) (vl-string-values-p x))))
Theorem:
(defthm vl-string-values-p-of-hons-shrink-alist (implies (and (vl-string-values-p x) (vl-string-values-p ans)) (vl-string-values-p (hons-shrink-alist x ans))))
Theorem:
(defthm stringp-of-cdr-of-hons-assoc-equal-when-vl-string-values-p (implies (vl-string-values-p x) (equal (stringp (cdr (hons-assoc-equal a x))) (if (hons-assoc-equal a x) t nil))))