(4v-nsexpr-p x) recognizes an alist where every value is an 4v-nsexpr-p.
Function:
(defun 4v-nsexpr-alist-p (x) "Alist whose values are sexprs with natp variables." (declare (xargs :guard t)) (or (atom x) (and (consp (car x)) (4v-nsexpr-p (cdar x)) (4v-nsexpr-alist-p (cdr x)))))
Theorem:
(defthm 4v-nsexpr-p-sexpr-fix-lookup-in-sexpr-alistp (implies (and (4v-nsexpr-alist-p x) (hons-assoc-equal k x)) (nat-listp (4v-sexpr-vars (cdr (hons-assoc-equal k x))))))
Theorem:
(defthm 4v-nsexpr-alist-p-fal-extract (implies (4v-nsexpr-alist-p x) (4v-nsexpr-alist-p (fal-extract keys x))))