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