Fixing function for branch-funct structures.
(branch-funct-fix x) → new-x
Function:
(defun branch-funct-fix$inline (x) (declare (xargs :guard (branch-funct-p x))) (let ((__function__ 'branch-funct-fix)) (declare (ignorable __function__)) (mbe :logic (case (branch-funct-kind x) (:beq (cons :beq (list))) (:bne (cons :bne (list))) (:blt (cons :blt (list))) (:bltu (cons :bltu (list))) (:bge (cons :bge (list))) (:bgeu (cons :bgeu (list)))) :exec x)))
Theorem:
(defthm branch-funct-p-of-branch-funct-fix (b* ((new-x (branch-funct-fix$inline x))) (branch-funct-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm branch-funct-fix-when-branch-funct-p (implies (branch-funct-p x) (equal (branch-funct-fix x) x)))
Function:
(defun branch-funct-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (branch-funct-p acl2::x) (branch-funct-p acl2::y)))) (equal (branch-funct-fix acl2::x) (branch-funct-fix acl2::y)))
Theorem:
(defthm branch-funct-equiv-is-an-equivalence (and (booleanp (branch-funct-equiv x y)) (branch-funct-equiv x x) (implies (branch-funct-equiv x y) (branch-funct-equiv y x)) (implies (and (branch-funct-equiv x y) (branch-funct-equiv y z)) (branch-funct-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm branch-funct-equiv-implies-equal-branch-funct-fix-1 (implies (branch-funct-equiv acl2::x x-equiv) (equal (branch-funct-fix acl2::x) (branch-funct-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm branch-funct-fix-under-branch-funct-equiv (branch-funct-equiv (branch-funct-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-branch-funct-fix-1-forward-to-branch-funct-equiv (implies (equal (branch-funct-fix acl2::x) acl2::y) (branch-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-branch-funct-fix-2-forward-to-branch-funct-equiv (implies (equal acl2::x (branch-funct-fix acl2::y)) (branch-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm branch-funct-equiv-of-branch-funct-fix-1-forward (implies (branch-funct-equiv (branch-funct-fix acl2::x) acl2::y) (branch-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm branch-funct-equiv-of-branch-funct-fix-2-forward (implies (branch-funct-equiv acl2::x (branch-funct-fix acl2::y)) (branch-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm branch-funct-kind$inline-of-branch-funct-fix-x (equal (branch-funct-kind$inline (branch-funct-fix x)) (branch-funct-kind$inline x)))
Theorem:
(defthm branch-funct-kind$inline-branch-funct-equiv-congruence-on-x (implies (branch-funct-equiv x x-equiv) (equal (branch-funct-kind$inline x) (branch-funct-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-branch-funct-fix (consp (branch-funct-fix x)) :rule-classes :type-prescription)