Fixing function for congruence-rule structures.
(congruence-rule-fix x) → new-x
Function:
(defun congruence-rule-fix$inline (x) (declare (xargs :guard (congruence-rule-p x))) (let ((__function__ 'congruence-rule-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((equiv-req (pseudo-fnsym-fix (std::da-nth 0 x))) (fn (pseudo-fnsym-fix (std::da-nth 1 x))) (arg-contexts (equiv-contextslist-fix (std::da-nth 2 x))) (arity (nfix (std::da-nth 3 x)))) (list equiv-req fn arg-contexts arity)) :exec x)))
Theorem:
(defthm congruence-rule-p-of-congruence-rule-fix (b* ((new-x (congruence-rule-fix$inline x))) (congruence-rule-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm congruence-rule-fix-when-congruence-rule-p (implies (congruence-rule-p x) (equal (congruence-rule-fix x) x)))
Function:
(defun congruence-rule-equiv$inline (x y) (declare (xargs :guard (and (congruence-rule-p x) (congruence-rule-p y)))) (equal (congruence-rule-fix x) (congruence-rule-fix y)))
Theorem:
(defthm congruence-rule-equiv-is-an-equivalence (and (booleanp (congruence-rule-equiv x y)) (congruence-rule-equiv x x) (implies (congruence-rule-equiv x y) (congruence-rule-equiv y x)) (implies (and (congruence-rule-equiv x y) (congruence-rule-equiv y z)) (congruence-rule-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm congruence-rule-equiv-implies-equal-congruence-rule-fix-1 (implies (congruence-rule-equiv x x-equiv) (equal (congruence-rule-fix x) (congruence-rule-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm congruence-rule-fix-under-congruence-rule-equiv (congruence-rule-equiv (congruence-rule-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-congruence-rule-fix-1-forward-to-congruence-rule-equiv (implies (equal (congruence-rule-fix x) y) (congruence-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-congruence-rule-fix-2-forward-to-congruence-rule-equiv (implies (equal x (congruence-rule-fix y)) (congruence-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm congruence-rule-equiv-of-congruence-rule-fix-1-forward (implies (congruence-rule-equiv (congruence-rule-fix x) y) (congruence-rule-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm congruence-rule-equiv-of-congruence-rule-fix-2-forward (implies (congruence-rule-equiv x (congruence-rule-fix y)) (congruence-rule-equiv x y)) :rule-classes :forward-chaining)