(env-fix x) is a usual ACL2::fty list fixing function.
In the logic, we apply env-block-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 env-fix$inline (x) (declare (xargs :guard (envp x))) (let ((__function__ 'env-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (env-block-fix (car x)) (env-fix (cdr x)))) :exec x)))
Theorem:
(defthm envp-of-env-fix (b* ((fty::newx (env-fix$inline x))) (envp fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm env-fix-when-envp (implies (envp x) (equal (env-fix x) x)))
Function:
(defun env-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (envp acl2::x) (envp acl2::y)))) (equal (env-fix acl2::x) (env-fix acl2::y)))
Theorem:
(defthm env-equiv-is-an-equivalence (and (booleanp (env-equiv x y)) (env-equiv x x) (implies (env-equiv x y) (env-equiv y x)) (implies (and (env-equiv x y) (env-equiv y z)) (env-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm env-equiv-implies-equal-env-fix-1 (implies (env-equiv acl2::x x-equiv) (equal (env-fix acl2::x) (env-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm env-fix-under-env-equiv (env-equiv (env-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-env-fix-1-forward-to-env-equiv (implies (equal (env-fix acl2::x) acl2::y) (env-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-env-fix-2-forward-to-env-equiv (implies (equal acl2::x (env-fix acl2::y)) (env-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm env-equiv-of-env-fix-1-forward (implies (env-equiv (env-fix acl2::x) acl2::y) (env-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm env-equiv-of-env-fix-2-forward (implies (env-equiv acl2::x (env-fix acl2::y)) (env-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-env-fix-x-under-env-block-equiv (env-block-equiv (car (env-fix acl2::x)) (car acl2::x)))
Theorem:
(defthm car-env-equiv-congruence-on-x-under-env-block-equiv (implies (env-equiv acl2::x x-equiv) (env-block-equiv (car acl2::x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-env-fix-x-under-env-equiv (env-equiv (cdr (env-fix acl2::x)) (cdr acl2::x)))
Theorem:
(defthm cdr-env-equiv-congruence-on-x-under-env-equiv (implies (env-equiv acl2::x x-equiv) (env-equiv (cdr acl2::x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-env-block-fix-x-under-env-equiv (env-equiv (cons (env-block-fix acl2::x) acl2::y) (cons acl2::x acl2::y)))
Theorem:
(defthm cons-env-block-equiv-congruence-on-x-under-env-equiv (implies (env-block-equiv acl2::x x-equiv) (env-equiv (cons acl2::x acl2::y) (cons x-equiv acl2::y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-env-fix-y-under-env-equiv (env-equiv (cons acl2::x (env-fix acl2::y)) (cons acl2::x acl2::y)))
Theorem:
(defthm cons-env-equiv-congruence-on-y-under-env-equiv (implies (env-equiv acl2::y y-equiv) (env-equiv (cons acl2::x acl2::y) (cons acl2::x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-env-fix (equal (consp (env-fix acl2::x)) (consp acl2::x)))
Theorem:
(defthm env-fix-under-iff (iff (env-fix acl2::x) (consp acl2::x)))
Theorem:
(defthm env-fix-of-cons (equal (env-fix (cons a x)) (cons (env-block-fix a) (env-fix x))))
Theorem:
(defthm len-of-env-fix (equal (len (env-fix acl2::x)) (len acl2::x)))
Theorem:
(defthm env-fix-of-append (equal (env-fix (append std::a std::b)) (append (env-fix std::a) (env-fix std::b))))
Theorem:
(defthm env-fix-of-repeat (equal (env-fix (repeat acl2::n acl2::x)) (repeat acl2::n (env-block-fix acl2::x))))
Theorem:
(defthm list-equiv-refines-env-equiv (implies (list-equiv acl2::x acl2::y) (env-equiv acl2::x acl2::y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-env-fix (equal (nth acl2::n (env-fix acl2::x)) (if (< (nfix acl2::n) (len acl2::x)) (env-block-fix (nth acl2::n acl2::x)) nil)))
Theorem:
(defthm env-equiv-implies-env-equiv-append-1 (implies (env-equiv acl2::x fty::x-equiv) (env-equiv (append acl2::x acl2::y) (append fty::x-equiv acl2::y))) :rule-classes (:congruence))
Theorem:
(defthm env-equiv-implies-env-equiv-append-2 (implies (env-equiv acl2::y fty::y-equiv) (env-equiv (append acl2::x acl2::y) (append acl2::x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm env-equiv-implies-env-equiv-nthcdr-2 (implies (env-equiv acl2::l l-equiv) (env-equiv (nthcdr acl2::n acl2::l) (nthcdr acl2::n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm env-equiv-implies-env-equiv-take-2 (implies (env-equiv acl2::l l-equiv) (env-equiv (take acl2::n acl2::l) (take acl2::n l-equiv))) :rule-classes (:congruence))