(indnamememo-to-var-decl-map n indnamememo acc) → map
Function:
(defun indnamememo-to-var-decl-map (n indnamememo acc) (declare (xargs :stobjs (indnamememo))) (declare (xargs :guard (and (natp n) (var-decl-map-p acc)))) (declare (xargs :guard (<= n (indnames-length indnamememo)))) (let ((__function__ 'indnamememo-to-var-decl-map)) (declare (ignorable __function__)) (b* (((when (mbe :logic (zp (- (indnames-length indnamememo) (nfix n))) :exec (eql n (indnames-length indnamememo)))) (var-decl-map-fix acc)) (entry (get-indname n indnamememo)) (acc (if entry (b* (((indname-result entry))) (hons-acons entry.varname entry.decl (var-decl-map-fix acc))) (var-decl-map-fix acc)))) (indnamememo-to-var-decl-map (1+ (lnfix n)) indnamememo acc))))
Theorem:
(defthm var-decl-map-p-of-indnamememo-to-var-decl-map (b* ((map (indnamememo-to-var-decl-map n indnamememo acc))) (var-decl-map-p map)) :rule-classes :rewrite)
Theorem:
(defthm indnamememo-to-var-decl-map-of-nfix-n (equal (indnamememo-to-var-decl-map (nfix n) indnamememo acc) (indnamememo-to-var-decl-map n indnamememo acc)))
Theorem:
(defthm indnamememo-to-var-decl-map-nat-equiv-congruence-on-n (implies (nat-equiv n n-equiv) (equal (indnamememo-to-var-decl-map n indnamememo acc) (indnamememo-to-var-decl-map n-equiv indnamememo acc))) :rule-classes :congruence)
Theorem:
(defthm indnamememo-to-var-decl-map-of-var-decl-map-fix-acc (equal (indnamememo-to-var-decl-map n indnamememo (var-decl-map-fix acc)) (indnamememo-to-var-decl-map n indnamememo acc)))
Theorem:
(defthm indnamememo-to-var-decl-map-var-decl-map-equiv-congruence-on-acc (implies (var-decl-map-equiv acc acc-equiv) (equal (indnamememo-to-var-decl-map n indnamememo acc) (indnamememo-to-var-decl-map n indnamememo acc-equiv))) :rule-classes :congruence)