Basic equivalence relation for string-set structures.
Function:
(defun string-sequiv$inline (x y) (declare (xargs :guard (and (string-setp x) (string-setp y)))) (equal (string-sfix x) (string-sfix y)))
Theorem:
(defthm string-sequiv-is-an-equivalence (and (booleanp (string-sequiv x y)) (string-sequiv x x) (implies (string-sequiv x y) (string-sequiv y x)) (implies (and (string-sequiv x y) (string-sequiv y z)) (string-sequiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm string-sequiv-implies-equal-string-sfix-1 (implies (string-sequiv x x-equiv) (equal (string-sfix x) (string-sfix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm string-sfix-under-string-sequiv (string-sequiv (string-sfix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-string-sfix-1-forward-to-string-sequiv (implies (equal (string-sfix x) y) (string-sequiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-string-sfix-2-forward-to-string-sequiv (implies (equal x (string-sfix y)) (string-sequiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm string-sequiv-of-string-sfix-1-forward (implies (string-sequiv (string-sfix x) y) (string-sequiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm string-sequiv-of-string-sfix-2-forward (implies (string-sequiv x (string-sfix y)) (string-sequiv x y)) :rule-classes :forward-chaining)