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