Fixing function for svexl structures.
Function:
(defun svexl-fix$inline (x) (declare (xargs :guard (svexl-p x))) (let ((acl2::__function__ 'svexl-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((top-node (svexl-node-fix (cdr (std::da-nth 0 x)))) (node-array (svexl-node-array-fix (cdr (std::da-nth 1 x))))) (list (cons 'top-node top-node) (cons 'node-array node-array))) :exec x)))
Theorem:
(defthm svexl-p-of-svexl-fix (b* ((new-x (svexl-fix$inline x))) (svexl-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svexl-fix-when-svexl-p (implies (svexl-p x) (equal (svexl-fix x) x)))
Function:
(defun svexl-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (svexl-p acl2::x) (svexl-p acl2::y)))) (equal (svexl-fix acl2::x) (svexl-fix acl2::y)))
Theorem:
(defthm svexl-equiv-is-an-equivalence (and (booleanp (svexl-equiv x y)) (svexl-equiv x x) (implies (svexl-equiv x y) (svexl-equiv y x)) (implies (and (svexl-equiv x y) (svexl-equiv y z)) (svexl-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svexl-equiv-implies-equal-svexl-fix-1 (implies (svexl-equiv acl2::x x-equiv) (equal (svexl-fix acl2::x) (svexl-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svexl-fix-under-svexl-equiv (svexl-equiv (svexl-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svexl-fix-1-forward-to-svexl-equiv (implies (equal (svexl-fix acl2::x) acl2::y) (svexl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svexl-fix-2-forward-to-svexl-equiv (implies (equal acl2::x (svexl-fix acl2::y)) (svexl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm svexl-equiv-of-svexl-fix-1-forward (implies (svexl-equiv (svexl-fix acl2::x) acl2::y) (svexl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm svexl-equiv-of-svexl-fix-2-forward (implies (svexl-equiv acl2::x (svexl-fix acl2::y)) (svexl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)