Generate the formula of the theorem that expresses the old function in terms of the new function.
(isodata-gen-old-to-new-thm-formula old$ arg-isomaps res-isomaps new$ wrld) → old-to-new-formula
Function:
(defun isodata-gen-old-to-new-thm-formula (old$ arg-isomaps res-isomaps new$ wrld) (declare (xargs :guard (and (symbolp old$) (isodata-symbol-isomap-alistp arg-isomaps) (isodata-pos-isomap-alistp res-isomaps) (symbolp new$) (plist-worldp wrld)))) (let ((__function__ 'isodata-gen-old-to-new-thm-formula)) (declare (ignorable __function__)) (b* ((x1...xn (formals old$ wrld)) (oldp-of-x1...xn (isodata-gen-oldp-of-terms x1...xn arg-isomaps)) (forth-of-x1...xn (isodata-gen-forth-of-terms x1...xn arg-isomaps)) (new-call (fcons-term new$ forth-of-x1...xn)) (old-call (fcons-term old$ x1...xn)) (consequent (case (len res-isomaps) (0 (cons 'equal (cons old-call (cons new-call 'nil)))) (1 (b* ((back-res (isodata-isomap->back (cdar res-isomaps))) (back-of-new-call (apply-term* back-res new-call))) (cons 'equal (cons old-call (cons back-of-new-call 'nil))))) (t (b* ((mv-nths-of-old-call (make-mv-nth-calls old-call (len res-isomaps))) (mv-nths-of-new-call (make-mv-nth-calls new-call (len res-isomaps))) (back-of-mv-nths-of-new-call (isodata-gen-back-of-terms mv-nths-of-new-call res-isomaps))) (conjoin-equalities mv-nths-of-old-call back-of-mv-nths-of-new-call)))))) (implicate (conjoin oldp-of-x1...xn) consequent))))