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 (case (amb?-decl/stmt-kind x) (:decl (b* ((unwrap (decl-fix (std::da-nth 0 (cdr x))))) (cons :decl (list unwrap)))) (:stmt (b* ((unwrap (expr-fix (std::da-nth 0 (cdr x))))) (cons :stmt (list unwrap)))) (:ambig (b* ((unwrap (amb-decl/stmt-fix (std::da-nth 0 (cdr x))))) (cons :ambig (list unwrap))))) :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)
Theorem:
(defthm amb?-decl/stmt-kind$inline-of-amb?-decl/stmt-fix-x (equal (amb?-decl/stmt-kind$inline (amb?-decl/stmt-fix x)) (amb?-decl/stmt-kind$inline x)))
Theorem:
(defthm amb?-decl/stmt-kind$inline-amb?-decl/stmt-equiv-congruence-on-x (implies (amb?-decl/stmt-equiv x x-equiv) (equal (amb?-decl/stmt-kind$inline x) (amb?-decl/stmt-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-amb?-decl/stmt-fix (consp (amb?-decl/stmt-fix x)) :rule-classes :type-prescription)