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