Fixing function for svex-context structures.
(svex-context-fix x) → new-x
Function:
(defun svex-context-fix$inline (x) (declare (xargs :guard (svex-context-p x))) (let ((__function__ 'svex-context-fix)) (declare (ignorable __function__)) (mbe :logic (case (svex-context-kind x) (:call (b* ((argnum (nfix (std::prod-car (cdr x)))) (fn (fnsym-fix (std::prod-car (std::prod-cdr (cdr x))))) (args (svexlist-fix (std::prod-cdr (std::prod-cdr (cdr x)))))) (cons :call (std::prod-cons argnum (std::prod-cons fn args))))) (:top (cons :top (list)))) :exec x)))
Theorem:
(defthm svex-context-p-of-svex-context-fix (b* ((new-x (svex-context-fix$inline x))) (svex-context-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svex-context-fix-when-svex-context-p (implies (svex-context-p x) (equal (svex-context-fix x) x)))
Function:
(defun svex-context-equiv$inline (x y) (declare (xargs :guard (and (svex-context-p x) (svex-context-p y)))) (equal (svex-context-fix x) (svex-context-fix y)))
Theorem:
(defthm svex-context-equiv-is-an-equivalence (and (booleanp (svex-context-equiv x y)) (svex-context-equiv x x) (implies (svex-context-equiv x y) (svex-context-equiv y x)) (implies (and (svex-context-equiv x y) (svex-context-equiv y z)) (svex-context-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svex-context-equiv-implies-equal-svex-context-fix-1 (implies (svex-context-equiv x x-equiv) (equal (svex-context-fix x) (svex-context-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svex-context-fix-under-svex-context-equiv (svex-context-equiv (svex-context-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svex-context-fix-1-forward-to-svex-context-equiv (implies (equal (svex-context-fix x) y) (svex-context-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svex-context-fix-2-forward-to-svex-context-equiv (implies (equal x (svex-context-fix y)) (svex-context-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svex-context-equiv-of-svex-context-fix-1-forward (implies (svex-context-equiv (svex-context-fix x) y) (svex-context-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svex-context-equiv-of-svex-context-fix-2-forward (implies (svex-context-equiv x (svex-context-fix y)) (svex-context-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svex-context-kind$inline-of-svex-context-fix-x (equal (svex-context-kind$inline (svex-context-fix x)) (svex-context-kind$inline x)))
Theorem:
(defthm svex-context-kind$inline-svex-context-equiv-congruence-on-x (implies (svex-context-equiv x x-equiv) (equal (svex-context-kind$inline x) (svex-context-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-svex-context-fix (consp (svex-context-fix x)) :rule-classes :type-prescription)