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