Fixing function for quantifier structures.
(quantifier-fix x) → new-x
Function:
(defun quantifier-fix$inline (x) (declare (xargs :guard (quantifierp x))) (let ((__function__ 'quantifier-fix)) (declare (ignorable __function__)) (mbe :logic (case (quantifier-kind x) (:forall (cons :forall (list))) (:exists (cons :exists (list)))) :exec x)))
Theorem:
(defthm quantifierp-of-quantifier-fix (b* ((new-x (quantifier-fix$inline x))) (quantifierp new-x)) :rule-classes :rewrite)
Theorem:
(defthm quantifier-fix-when-quantifierp (implies (quantifierp x) (equal (quantifier-fix x) x)))
Function:
(defun quantifier-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (quantifierp acl2::x) (quantifierp acl2::y)))) (equal (quantifier-fix acl2::x) (quantifier-fix acl2::y)))
Theorem:
(defthm quantifier-equiv-is-an-equivalence (and (booleanp (quantifier-equiv x y)) (quantifier-equiv x x) (implies (quantifier-equiv x y) (quantifier-equiv y x)) (implies (and (quantifier-equiv x y) (quantifier-equiv y z)) (quantifier-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm quantifier-equiv-implies-equal-quantifier-fix-1 (implies (quantifier-equiv acl2::x x-equiv) (equal (quantifier-fix acl2::x) (quantifier-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm quantifier-fix-under-quantifier-equiv (quantifier-equiv (quantifier-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-quantifier-fix-1-forward-to-quantifier-equiv (implies (equal (quantifier-fix acl2::x) acl2::y) (quantifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-quantifier-fix-2-forward-to-quantifier-equiv (implies (equal acl2::x (quantifier-fix acl2::y)) (quantifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm quantifier-equiv-of-quantifier-fix-1-forward (implies (quantifier-equiv (quantifier-fix acl2::x) acl2::y) (quantifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm quantifier-equiv-of-quantifier-fix-2-forward (implies (quantifier-equiv acl2::x (quantifier-fix acl2::y)) (quantifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm quantifier-kind$inline-of-quantifier-fix-x (equal (quantifier-kind$inline (quantifier-fix x)) (quantifier-kind$inline x)))
Theorem:
(defthm quantifier-kind$inline-quantifier-equiv-congruence-on-x (implies (quantifier-equiv x x-equiv) (equal (quantifier-kind$inline x) (quantifier-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-quantifier-fix (consp (quantifier-fix x)) :rule-classes :type-prescription)