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