Recognizer for string-set.
(string-setp x) → *
Function:
(defun string-setp (x) (declare (xargs :guard t)) (if (atom x) (null x) (and (stringp (car x)) (or (null (cdr x)) (and (consp (cdr x)) (fast-<< (car x) (cadr x)) (string-setp (cdr x)))))))
Theorem:
(defthm booleanp-ofstring-setp (booleanp (string-setp x)))
Theorem:
(defthm setp-when-string-setp (implies (string-setp x) (set::setp x)) :rule-classes (:rewrite))
Theorem:
(defthm stringp-of-head-when-string-setp (implies (string-setp x) (equal (stringp (set::head x)) (not (set::emptyp x)))))
Theorem:
(defthm string-setp-of-tail-when-string-setp (implies (string-setp x) (string-setp (set::tail x))))
Theorem:
(defthm string-setp-of-insert (equal (string-setp (set::insert a x)) (and (stringp a) (string-setp (set::sfix x)))))
Theorem:
(defthm stringp-when-in-string-setp-binds-free-x (implies (and (set::in a x) (string-setp x)) (stringp a)))
Theorem:
(defthm not-in-string-setp-when-not-stringp (implies (and (string-setp x) (not (stringp a))) (not (set::in a x))))
Theorem:
(defthm string-setp-of-union (equal (string-setp (set::union x y)) (and (string-setp (set::sfix x)) (string-setp (set::sfix y)))))
Theorem:
(defthm string-setp-of-intersect (implies (and (string-setp x) (string-setp y)) (string-setp (set::intersect x y))))
Theorem:
(defthm string-setp-of-difference (implies (string-setp x) (string-setp (set::difference x y))))
Theorem:
(defthm string-setp-of-delete (implies (string-setp x) (string-setp (set::delete a x))))