Fixing function for maybe-byte-list20 structures.

- Signature
(maybe-byte-list20-fix x) → new-x

- Arguments
`x`—Guard (maybe-byte-list20p x) .- Returns
`new-x`—Type (maybe-byte-list20p new-x) .

**Function: **

(defun maybe-byte-list20-fix$inline (x) (declare (xargs :guard (maybe-byte-list20p x))) (let ((__function__ 'maybe-byte-list20-fix)) (declare (ignorable __function__)) (mbe :logic (cond ((not x) nil) (t (b* ((fty::val (acl2::byte-list20-fix x))) fty::val))) :exec x)))

**Theorem: **

(defthm maybe-byte-list20p-of-maybe-byte-list20-fix (b* ((new-x (maybe-byte-list20-fix$inline x))) (maybe-byte-list20p new-x)) :rule-classes :rewrite)

**Theorem: **

(defthm maybe-byte-list20-fix-when-maybe-byte-list20p (implies (maybe-byte-list20p x) (equal (maybe-byte-list20-fix x) x)))

**Function: **

(defun maybe-byte-list20-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (maybe-byte-list20p acl2::x) (maybe-byte-list20p acl2::y)))) (equal (maybe-byte-list20-fix acl2::x) (maybe-byte-list20-fix acl2::y)))

**Theorem: **

(defthm maybe-byte-list20-equiv-is-an-equivalence (and (booleanp (maybe-byte-list20-equiv x y)) (maybe-byte-list20-equiv x x) (implies (maybe-byte-list20-equiv x y) (maybe-byte-list20-equiv y x)) (implies (and (maybe-byte-list20-equiv x y) (maybe-byte-list20-equiv y z)) (maybe-byte-list20-equiv x z))) :rule-classes (:equivalence))

**Theorem: **

(defthm maybe-byte-list20-equiv-implies-equal-maybe-byte-list20-fix-1 (implies (maybe-byte-list20-equiv acl2::x x-equiv) (equal (maybe-byte-list20-fix acl2::x) (maybe-byte-list20-fix x-equiv))) :rule-classes (:congruence))

**Theorem: **

(defthm maybe-byte-list20-fix-under-maybe-byte-list20-equiv (maybe-byte-list20-equiv (maybe-byte-list20-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))

**Theorem: **

(defthm equal-of-maybe-byte-list20-fix-1-forward-to-maybe-byte-list20-equiv (implies (equal (maybe-byte-list20-fix acl2::x) acl2::y) (maybe-byte-list20-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)

**Theorem: **

(defthm equal-of-maybe-byte-list20-fix-2-forward-to-maybe-byte-list20-equiv (implies (equal acl2::x (maybe-byte-list20-fix acl2::y)) (maybe-byte-list20-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)

**Theorem: **

(defthm maybe-byte-list20-equiv-of-maybe-byte-list20-fix-1-forward (implies (maybe-byte-list20-equiv (maybe-byte-list20-fix acl2::x) acl2::y) (maybe-byte-list20-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)

**Theorem: **

(defthm maybe-byte-list20-equiv-of-maybe-byte-list20-fix-2-forward (implies (maybe-byte-list20-equiv acl2::x (maybe-byte-list20-fix acl2::y)) (maybe-byte-list20-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)