Basic equivalence relation for bip32-key-tree structures.
Function:
(defun bip32-key-tree-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (bip32-key-treep acl2::x) (bip32-key-treep acl2::y)))) (equal (bip32-key-tree-fix acl2::x) (bip32-key-tree-fix acl2::y)))
Theorem:
(defthm bip32-key-tree-equiv-is-an-equivalence (and (booleanp (bip32-key-tree-equiv x y)) (bip32-key-tree-equiv x x) (implies (bip32-key-tree-equiv x y) (bip32-key-tree-equiv y x)) (implies (and (bip32-key-tree-equiv x y) (bip32-key-tree-equiv y z)) (bip32-key-tree-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm bip32-key-tree-equiv-implies-equal-bip32-key-tree-fix-1 (implies (bip32-key-tree-equiv acl2::x x-equiv) (equal (bip32-key-tree-fix acl2::x) (bip32-key-tree-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm bip32-key-tree-fix-under-bip32-key-tree-equiv (bip32-key-tree-equiv (bip32-key-tree-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-bip32-key-tree-fix-1-forward-to-bip32-key-tree-equiv (implies (equal (bip32-key-tree-fix acl2::x) acl2::y) (bip32-key-tree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-bip32-key-tree-fix-2-forward-to-bip32-key-tree-equiv (implies (equal acl2::x (bip32-key-tree-fix acl2::y)) (bip32-key-tree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm bip32-key-tree-equiv-of-bip32-key-tree-fix-1-forward (implies (bip32-key-tree-equiv (bip32-key-tree-fix acl2::x) acl2::y) (bip32-key-tree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm bip32-key-tree-equiv-of-bip32-key-tree-fix-2-forward (implies (bip32-key-tree-equiv acl2::x (bip32-key-tree-fix acl2::y)) (bip32-key-tree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)