Fixing function for committee structures.
(committee-fix x) → new-x
Function:
(defun committee-fix$inline (x) (declare (xargs :guard (committeep x))) (let ((__function__ 'committee-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((addresses (address-set-fix (cdr (std::da-nth 0 x))))) (let ((addresses (if (emptyp addresses) (insert (address nil) nil) addresses))) (list (cons 'addresses addresses)))) :exec x)))
Theorem:
(defthm committeep-of-committee-fix (b* ((new-x (committee-fix$inline x))) (committeep new-x)) :rule-classes :rewrite)
Theorem:
(defthm committee-fix-when-committeep (implies (committeep x) (equal (committee-fix x) x)))
Function:
(defun committee-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (committeep acl2::x) (committeep acl2::y)))) (equal (committee-fix acl2::x) (committee-fix acl2::y)))
Theorem:
(defthm committee-equiv-is-an-equivalence (and (booleanp (committee-equiv x y)) (committee-equiv x x) (implies (committee-equiv x y) (committee-equiv y x)) (implies (and (committee-equiv x y) (committee-equiv y z)) (committee-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm committee-equiv-implies-equal-committee-fix-1 (implies (committee-equiv acl2::x x-equiv) (equal (committee-fix acl2::x) (committee-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm committee-fix-under-committee-equiv (committee-equiv (committee-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-committee-fix-1-forward-to-committee-equiv (implies (equal (committee-fix acl2::x) acl2::y) (committee-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-committee-fix-2-forward-to-committee-equiv (implies (equal acl2::x (committee-fix acl2::y)) (committee-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm committee-equiv-of-committee-fix-1-forward (implies (committee-equiv (committee-fix acl2::x) acl2::y) (committee-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm committee-equiv-of-committee-fix-2-forward (implies (committee-equiv acl2::x (committee-fix acl2::y)) (committee-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)