(boolean-list-fix x) is a usual fty list fixing function.
(boolean-list-fix x) → fty::newx
In the logic, we apply bool-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.
Function:
(defun boolean-list-fix$inline (x) (declare (xargs :guard (boolean-listp x))) (let ((__function__ 'boolean-list-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (bool-fix (car x)) (boolean-list-fix (cdr x)))) :exec x)))
Theorem:
(defthm boolean-listp-of-boolean-list-fix (b* ((fty::newx (boolean-list-fix$inline x))) (boolean-listp fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm boolean-list-fix-when-boolean-listp (implies (boolean-listp x) (equal (boolean-list-fix x) x)))
Function:
(defun boolean-list-equiv$inline (x y) (declare (xargs :guard (and (boolean-listp x) (boolean-listp y)))) (equal (boolean-list-fix x) (boolean-list-fix y)))
Theorem:
(defthm boolean-list-equiv-is-an-equivalence (and (booleanp (boolean-list-equiv x y)) (boolean-list-equiv x x) (implies (boolean-list-equiv x y) (boolean-list-equiv y x)) (implies (and (boolean-list-equiv x y) (boolean-list-equiv y z)) (boolean-list-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm boolean-list-equiv-implies-equal-boolean-list-fix-1 (implies (boolean-list-equiv x x-equiv) (equal (boolean-list-fix x) (boolean-list-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm boolean-list-fix-under-boolean-list-equiv (boolean-list-equiv (boolean-list-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-boolean-list-fix-1-forward-to-boolean-list-equiv (implies (equal (boolean-list-fix x) y) (boolean-list-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-boolean-list-fix-2-forward-to-boolean-list-equiv (implies (equal x (boolean-list-fix y)) (boolean-list-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm boolean-list-equiv-of-boolean-list-fix-1-forward (implies (boolean-list-equiv (boolean-list-fix x) y) (boolean-list-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm boolean-list-equiv-of-boolean-list-fix-2-forward (implies (boolean-list-equiv x (boolean-list-fix y)) (boolean-list-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-boolean-list-fix-x-under-iff (iff (car (boolean-list-fix x)) (car x)))
Theorem:
(defthm car-boolean-list-equiv-congruence-on-x-under-iff (implies (boolean-list-equiv x x-equiv) (iff (car x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-boolean-list-fix-x-under-boolean-list-equiv (boolean-list-equiv (cdr (boolean-list-fix x)) (cdr x)))
Theorem:
(defthm cdr-boolean-list-equiv-congruence-on-x-under-boolean-list-equiv (implies (boolean-list-equiv x x-equiv) (boolean-list-equiv (cdr x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-bool-fix-x-under-boolean-list-equiv (boolean-list-equiv (cons (bool-fix x) y) (cons x y)))
Theorem:
(defthm cons-iff-congruence-on-x-under-boolean-list-equiv (implies (iff x x-equiv) (boolean-list-equiv (cons x y) (cons x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-boolean-list-fix-y-under-boolean-list-equiv (boolean-list-equiv (cons x (boolean-list-fix y)) (cons x y)))
Theorem:
(defthm cons-boolean-list-equiv-congruence-on-y-under-boolean-list-equiv (implies (boolean-list-equiv y y-equiv) (boolean-list-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-boolean-list-fix (equal (consp (boolean-list-fix x)) (consp x)))
Theorem:
(defthm boolean-list-fix-under-iff (iff (boolean-list-fix x) (consp x)))
Theorem:
(defthm boolean-list-fix-of-cons (equal (boolean-list-fix (cons a x)) (cons (bool-fix a) (boolean-list-fix x))))
Theorem:
(defthm len-of-boolean-list-fix (equal (len (boolean-list-fix x)) (len x)))
Theorem:
(defthm boolean-list-fix-of-append (equal (boolean-list-fix (append std::a std::b)) (append (boolean-list-fix std::a) (boolean-list-fix std::b))))
Theorem:
(defthm boolean-list-fix-of-repeat (equal (boolean-list-fix (repeat n x)) (repeat n (bool-fix x))))
Theorem:
(defthm list-equiv-refines-boolean-list-equiv (implies (list-equiv x y) (boolean-list-equiv x y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-boolean-list-fix (equal (nth n (boolean-list-fix x)) (if (< (nfix n) (len x)) (bool-fix (nth n x)) nil)))
Theorem:
(defthm boolean-list-equiv-implies-boolean-list-equiv-append-1 (implies (boolean-list-equiv x fty::x-equiv) (boolean-list-equiv (append x y) (append fty::x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm boolean-list-equiv-implies-boolean-list-equiv-append-2 (implies (boolean-list-equiv y fty::y-equiv) (boolean-list-equiv (append x y) (append x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm boolean-list-equiv-implies-boolean-list-equiv-nthcdr-2 (implies (boolean-list-equiv l l-equiv) (boolean-list-equiv (nthcdr n l) (nthcdr n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm boolean-list-equiv-implies-boolean-list-equiv-take-2 (implies (boolean-list-equiv l l-equiv) (boolean-list-equiv (take n l) (take n l-equiv))) :rule-classes (:congruence))