Fixing function for sd-problem structures.
(sd-problem-fix x) → new-x
Function:
(defun sd-problem-fix$inline (x) (declare (xargs :guard (sd-problem-p x))) (let ((__function__ 'sd-problem-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((type (acl2::symbol-fix (car (car (cdr x))))) (priority (nfix (cdr (car (cdr x))))) (groupsize (nfix (car (cdr (cdr x))))) (key (sd-key-fix (car (cdr (cdr (cdr x)))))) (ctx (vl-context1-fix (cdr (cdr (cdr (cdr x))))))) (cons :sd-problem (cons (cons type priority) (cons groupsize (cons key ctx))))) :exec x)))
Theorem:
(defthm sd-problem-p-of-sd-problem-fix (b* ((new-x (sd-problem-fix$inline x))) (sd-problem-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm sd-problem-fix-when-sd-problem-p (implies (sd-problem-p x) (equal (sd-problem-fix x) x)))
Function:
(defun sd-problem-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (sd-problem-p acl2::x) (sd-problem-p acl2::y)))) (equal (sd-problem-fix acl2::x) (sd-problem-fix acl2::y)))
Theorem:
(defthm sd-problem-equiv-is-an-equivalence (and (booleanp (sd-problem-equiv x y)) (sd-problem-equiv x x) (implies (sd-problem-equiv x y) (sd-problem-equiv y x)) (implies (and (sd-problem-equiv x y) (sd-problem-equiv y z)) (sd-problem-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm sd-problem-equiv-implies-equal-sd-problem-fix-1 (implies (sd-problem-equiv acl2::x x-equiv) (equal (sd-problem-fix acl2::x) (sd-problem-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm sd-problem-fix-under-sd-problem-equiv (sd-problem-equiv (sd-problem-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-sd-problem-fix-1-forward-to-sd-problem-equiv (implies (equal (sd-problem-fix acl2::x) acl2::y) (sd-problem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-sd-problem-fix-2-forward-to-sd-problem-equiv (implies (equal acl2::x (sd-problem-fix acl2::y)) (sd-problem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm sd-problem-equiv-of-sd-problem-fix-1-forward (implies (sd-problem-equiv (sd-problem-fix acl2::x) acl2::y) (sd-problem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm sd-problem-equiv-of-sd-problem-fix-2-forward (implies (sd-problem-equiv acl2::x (sd-problem-fix acl2::y)) (sd-problem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)