(bip32-path-sfix x) is a usual ACL2::fty set fixing function.
(bip32-path-sfix x) → *
In the logic, we apply ubyte32-list-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.
Function:
(defun bip32-path-sfix (x) (declare (xargs :guard (bip32-path-setp x))) (mbe :logic (if (bip32-path-setp x) x nil) :exec x))
Theorem:
(defthm bip32-path-setp-of-bip32-path-sfix (bip32-path-setp (bip32-path-sfix x)))
Theorem:
(defthm bip32-path-sfix-when-bip32-path-setp (implies (bip32-path-setp x) (equal (bip32-path-sfix x) x)))
Theorem:
(defthm emptyp-bip32-path-sfix (implies (or (emptyp x) (not (bip32-path-setp x))) (emptyp (bip32-path-sfix x))))
Theorem:
(defthm emptyp-of-bip32-path-sfix (equal (emptyp (bip32-path-sfix x)) (or (not (bip32-path-setp x)) (emptyp x))))
Function:
(defun bip32-path-set-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (bip32-path-setp acl2::x) (bip32-path-setp acl2::y)))) (equal (bip32-path-sfix acl2::x) (bip32-path-sfix acl2::y)))
Theorem:
(defthm bip32-path-set-equiv-is-an-equivalence (and (booleanp (bip32-path-set-equiv x y)) (bip32-path-set-equiv x x) (implies (bip32-path-set-equiv x y) (bip32-path-set-equiv y x)) (implies (and (bip32-path-set-equiv x y) (bip32-path-set-equiv y z)) (bip32-path-set-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm bip32-path-set-equiv-implies-equal-bip32-path-sfix-1 (implies (bip32-path-set-equiv acl2::x x-equiv) (equal (bip32-path-sfix acl2::x) (bip32-path-sfix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm bip32-path-sfix-under-bip32-path-set-equiv (bip32-path-set-equiv (bip32-path-sfix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-bip32-path-sfix-1-forward-to-bip32-path-set-equiv (implies (equal (bip32-path-sfix acl2::x) acl2::y) (bip32-path-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-bip32-path-sfix-2-forward-to-bip32-path-set-equiv (implies (equal acl2::x (bip32-path-sfix acl2::y)) (bip32-path-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm bip32-path-set-equiv-of-bip32-path-sfix-1-forward (implies (bip32-path-set-equiv (bip32-path-sfix acl2::x) acl2::y) (bip32-path-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm bip32-path-set-equiv-of-bip32-path-sfix-2-forward (implies (bip32-path-set-equiv acl2::x (bip32-path-sfix acl2::y)) (bip32-path-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)