Look up a function in a function table.
(fun-table-lookup fun funtab) → info
We return the type of the function, if the function is present.
Otherwise, we return
Function:
(defun fun-table-lookup (fun funtab) (declare (xargs :guard (and (identp fun) (fun-tablep funtab)))) (let ((__function__ 'fun-table-lookup)) (declare (ignorable __function__)) (cdr (omap::assoc (ident-fix fun) (fun-table-fix funtab)))))
Theorem:
(defthm fun-sinfo-optionp-of-fun-table-lookup (b* ((info (fun-table-lookup fun funtab))) (fun-sinfo-optionp info)) :rule-classes :rewrite)
Theorem:
(defthm fun-table-lookup-of-ident-fix-fun (equal (fun-table-lookup (ident-fix fun) funtab) (fun-table-lookup fun funtab)))
Theorem:
(defthm fun-table-lookup-ident-equiv-congruence-on-fun (implies (ident-equiv fun fun-equiv) (equal (fun-table-lookup fun funtab) (fun-table-lookup fun-equiv funtab))) :rule-classes :congruence)
Theorem:
(defthm fun-table-lookup-of-fun-table-fix-funtab (equal (fun-table-lookup fun (fun-table-fix funtab)) (fun-table-lookup fun funtab)))
Theorem:
(defthm fun-table-lookup-fun-table-equiv-congruence-on-funtab (implies (fun-table-equiv funtab funtab-equiv) (equal (fun-table-lookup fun funtab) (fun-table-lookup fun funtab-equiv))) :rule-classes :congruence)