Look up a function in an environment by name.
(fun-env-lookup name fenv) → info?
Function:
(defun fun-env-lookup (name fenv) (declare (xargs :guard (and (identp name) (fun-envp fenv)))) (let ((__function__ 'fun-env-lookup)) (declare (ignorable __function__)) (cdr (omap::assoc (ident-fix name) (fun-env-fix fenv)))))
Theorem:
(defthm fun-info-optionp-of-fun-env-lookup (b* ((info? (fun-env-lookup name fenv))) (fun-info-optionp info?)) :rule-classes :rewrite)
Theorem:
(defthm fun-env-lookup-of-ident-fix-name (equal (fun-env-lookup (ident-fix name) fenv) (fun-env-lookup name fenv)))
Theorem:
(defthm fun-env-lookup-ident-equiv-congruence-on-name (implies (ident-equiv name name-equiv) (equal (fun-env-lookup name fenv) (fun-env-lookup name-equiv fenv))) :rule-classes :congruence)
Theorem:
(defthm fun-env-lookup-of-fun-env-fix-fenv (equal (fun-env-lookup name (fun-env-fix fenv)) (fun-env-lookup name fenv)))
Theorem:
(defthm fun-env-lookup-fun-env-equiv-congruence-on-fenv (implies (fun-env-equiv fenv fenv-equiv) (equal (fun-env-lookup name fenv) (fun-env-lookup name fenv-equiv))) :rule-classes :congruence)