(maybe-string-fix x) → xx
Function:
(defun maybe-string-fix (x) (declare (xargs :guard (maybe-stringp x))) (let ((__function__ 'maybe-string-fix)) (declare (ignorable __function__)) (mbe :logic (and x (str-fix x)) :exec x)))
Theorem:
(defthm maybe-stringp-of-maybe-string-fix (b* ((xx (maybe-string-fix x))) (maybe-stringp xx)) :rule-classes :rewrite)
Theorem:
(defthm maybe-string-fix-when-maybe-stringp (implies (maybe-stringp x) (equal (maybe-string-fix x) x)))
Theorem:
(defthm maybe-string-fix-under-iff (iff (maybe-string-fix x) x))
Function:
(defun maybe-string-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (maybe-stringp acl2::x) (maybe-stringp acl2::y)))) (equal (maybe-string-fix acl2::x) (maybe-string-fix acl2::y)))
Theorem:
(defthm maybe-string-equiv-is-an-equivalence (and (booleanp (maybe-string-equiv x y)) (maybe-string-equiv x x) (implies (maybe-string-equiv x y) (maybe-string-equiv y x)) (implies (and (maybe-string-equiv x y) (maybe-string-equiv y z)) (maybe-string-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm maybe-string-equiv-implies-equal-maybe-string-fix-1 (implies (maybe-string-equiv acl2::x x-equiv) (equal (maybe-string-fix acl2::x) (maybe-string-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm maybe-string-fix-under-maybe-string-equiv (maybe-string-equiv (maybe-string-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-maybe-string-fix-1-forward-to-maybe-string-equiv (implies (equal (maybe-string-fix acl2::x) acl2::y) (maybe-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-maybe-string-fix-2-forward-to-maybe-string-equiv (implies (equal acl2::x (maybe-string-fix acl2::y)) (maybe-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm maybe-string-equiv-of-maybe-string-fix-1-forward (implies (maybe-string-equiv (maybe-string-fix acl2::x) acl2::y) (maybe-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm maybe-string-equiv-of-maybe-string-fix-2-forward (implies (maybe-string-equiv acl2::x (maybe-string-fix acl2::y)) (maybe-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm maybe-string-equiv-refines-streqv (implies (maybe-string-equiv x y) (streqv x y)) :rule-classes (:refinement))