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