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