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