(ident-ident-subst ident alist) → new-ident
Function:
(defun ident-ident-subst (ident alist) (declare (xargs :guard (and (identp ident) (ident-ident-alistp alist)))) (let ((__function__ 'ident-ident-subst)) (declare (ignorable __function__)) (b* ((lookup (assoc-equal (ident-fix ident) (ident-ident-alist-fix alist)))) (ident-fix (if lookup (cdr lookup) ident)))))
Theorem:
(defthm identp-of-ident-ident-subst (b* ((new-ident (ident-ident-subst ident alist))) (identp new-ident)) :rule-classes :rewrite)
Theorem:
(defthm ident-ident-subst-of-ident-fix-ident (equal (ident-ident-subst (ident-fix ident) alist) (ident-ident-subst ident alist)))
Theorem:
(defthm ident-ident-subst-ident-equiv-congruence-on-ident (implies (c$::ident-equiv ident ident-equiv) (equal (ident-ident-subst ident alist) (ident-ident-subst ident-equiv alist))) :rule-classes :congruence)
Theorem:
(defthm ident-ident-subst-of-ident-ident-alist-fix-alist (equal (ident-ident-subst ident (ident-ident-alist-fix alist)) (ident-ident-subst ident alist)))
Theorem:
(defthm ident-ident-subst-ident-ident-alist-equiv-congruence-on-alist (implies (ident-ident-alist-equiv alist alist-equiv) (equal (ident-ident-subst ident alist) (ident-ident-subst ident alist-equiv))) :rule-classes :congruence)