Variable renaming relation over function environments.
The two environments must have the same number of scopes, and the corresponding scopes must be related.
Function:
(defun funenv-renamevarp (old new) (declare (xargs :guard (and (funenvp old) (funenvp new)))) (let ((__function__ 'funenv-renamevarp)) (declare (ignorable __function__)) (or (and (endp old) (endp new)) (and (consp old) (consp new) (funscope-renamevarp (car old) (car new)) (funenv-renamevarp (cdr old) (cdr new))))))
Theorem:
(defthm booleanp-of-funenv-renamevarp (b* ((yes/no (funenv-renamevarp old new))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm funenv-renamevarp-of-funenv-fix-old (equal (funenv-renamevarp (funenv-fix old) new) (funenv-renamevarp old new)))
Theorem:
(defthm funenv-renamevarp-funenv-equiv-congruence-on-old (implies (funenv-equiv old old-equiv) (equal (funenv-renamevarp old new) (funenv-renamevarp old-equiv new))) :rule-classes :congruence)
Theorem:
(defthm funenv-renamevarp-of-funenv-fix-new (equal (funenv-renamevarp old (funenv-fix new)) (funenv-renamevarp old new)))
Theorem:
(defthm funenv-renamevarp-funenv-equiv-congruence-on-new (implies (funenv-equiv new new-equiv) (equal (funenv-renamevarp old new) (funenv-renamevarp old new-equiv))) :rule-classes :congruence)