Fixing function for svar-split structures.
(svar-split-fix x) → new-x
Function:
(defun svar-split-fix$inline (x) (declare (xargs :guard (svar-split-p x))) (let ((__function__ 'svar-split-fix)) (declare (ignorable __function__)) (mbe :logic (case (svar-split-kind x) (:segment (b* ((width (pos-fix (std::da-nth 0 (cdr x)))) (var (svar-fix (std::da-nth 1 (cdr x)))) (rest (svar-split-fix (std::da-nth 2 (cdr x))))) (cons :segment (list width var rest)))) (:remainder (b* ((var (svar-fix (std::da-nth 0 (cdr x))))) (cons :remainder (list var))))) :exec x)))
Theorem:
(defthm svar-split-p-of-svar-split-fix (b* ((new-x (svar-split-fix$inline x))) (svar-split-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svar-split-fix-when-svar-split-p (implies (svar-split-p x) (equal (svar-split-fix x) x)))
Function:
(defun svar-split-equiv$inline (x y) (declare (xargs :guard (and (svar-split-p x) (svar-split-p y)))) (equal (svar-split-fix x) (svar-split-fix y)))
Theorem:
(defthm svar-split-equiv-is-an-equivalence (and (booleanp (svar-split-equiv x y)) (svar-split-equiv x x) (implies (svar-split-equiv x y) (svar-split-equiv y x)) (implies (and (svar-split-equiv x y) (svar-split-equiv y z)) (svar-split-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svar-split-equiv-implies-equal-svar-split-fix-1 (implies (svar-split-equiv x x-equiv) (equal (svar-split-fix x) (svar-split-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svar-split-fix-under-svar-split-equiv (svar-split-equiv (svar-split-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svar-split-fix-1-forward-to-svar-split-equiv (implies (equal (svar-split-fix x) y) (svar-split-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svar-split-fix-2-forward-to-svar-split-equiv (implies (equal x (svar-split-fix y)) (svar-split-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svar-split-equiv-of-svar-split-fix-1-forward (implies (svar-split-equiv (svar-split-fix x) y) (svar-split-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svar-split-equiv-of-svar-split-fix-2-forward (implies (svar-split-equiv x (svar-split-fix y)) (svar-split-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svar-split-kind$inline-of-svar-split-fix-x (equal (svar-split-kind$inline (svar-split-fix x)) (svar-split-kind$inline x)))
Theorem:
(defthm svar-split-kind$inline-svar-split-equiv-congruence-on-x (implies (svar-split-equiv x x-equiv) (equal (svar-split-kind$inline x) (svar-split-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-svar-split-fix (consp (svar-split-fix x)) :rule-classes :type-prescription)