(svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) → (mv outalist next-state)
Function:
(defun svtv-compile-phase (phase ins overrides outs prev-state updates state-updates in-vars) (declare (xargs :guard (and (natp phase) (svtv-lines-p ins) (svtv-overridelines-p overrides) (svtv-lines-p outs) (svex-alist-p prev-state) (svex-alist-p updates) (svex-alist-p state-updates) (svarlist-p in-vars)))) (let ((__function__ 'svtv-compile-phase)) (declare (ignorable __function__)) (b* ((input-alist (append (svtv-phase-inputs phase ins overrides in-vars) prev-state)) ((with-fast input-alist updates)) (outalist (svex-alist-compose (svtv-outputs->outalist outs phase) updates)) (composed-outalist (svex-alist-compose outalist input-alist)) (next-state (svex-alist-compose state-updates input-alist))) (clear-memoize-table 'svex-compose) (mv composed-outalist next-state))))
Theorem:
(defthm svex-alist-p-of-svtv-compile-phase.outalist (b* (((mv ?outalist ?next-state) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars))) (svex-alist-p outalist)) :rule-classes :rewrite)
Theorem:
(defthm svex-alist-p-of-svtv-compile-phase.next-state (b* (((mv ?outalist ?next-state) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars))) (svex-alist-p next-state)) :rule-classes :rewrite)
Theorem:
(defthm svtv-compile-phase-of-nfix-phase (equal (svtv-compile-phase (nfix phase) ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-nat-equiv-congruence-on-phase (implies (nat-equiv phase phase-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase-equiv ins overrides outs prev-state updates state-updates in-vars))) :rule-classes :congruence)
Theorem:
(defthm svtv-compile-phase-of-svtv-lines-fix-ins (equal (svtv-compile-phase phase (svtv-lines-fix ins) overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-svtv-lines-equiv-congruence-on-ins (implies (svtv-lines-equiv ins ins-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins-equiv overrides outs prev-state updates state-updates in-vars))) :rule-classes :congruence)
Theorem:
(defthm svtv-compile-phase-of-svtv-overridelines-fix-overrides (equal (svtv-compile-phase phase ins (svtv-overridelines-fix overrides) outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-svtv-overridelines-equiv-congruence-on-overrides (implies (svtv-overridelines-equiv overrides overrides-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides-equiv outs prev-state updates state-updates in-vars))) :rule-classes :congruence)
Theorem:
(defthm svtv-compile-phase-of-svtv-lines-fix-outs (equal (svtv-compile-phase phase ins overrides (svtv-lines-fix outs) prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-svtv-lines-equiv-congruence-on-outs (implies (svtv-lines-equiv outs outs-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs-equiv prev-state updates state-updates in-vars))) :rule-classes :congruence)
Theorem:
(defthm svtv-compile-phase-of-svex-alist-fix-prev-state (equal (svtv-compile-phase phase ins overrides outs (svex-alist-fix prev-state) updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-svex-alist-equiv-congruence-on-prev-state (implies (svex-alist-equiv prev-state prev-state-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state-equiv updates state-updates in-vars))) :rule-classes :congruence)
Theorem:
(defthm svtv-compile-phase-of-svex-alist-fix-updates (equal (svtv-compile-phase phase ins overrides outs prev-state (svex-alist-fix updates) state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-svex-alist-equiv-congruence-on-updates (implies (svex-alist-equiv updates updates-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates-equiv state-updates in-vars))) :rule-classes :congruence)
Theorem:
(defthm svtv-compile-phase-of-svex-alist-fix-state-updates (equal (svtv-compile-phase phase ins overrides outs prev-state updates (svex-alist-fix state-updates) in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-svex-alist-equiv-congruence-on-state-updates (implies (svex-alist-equiv state-updates state-updates-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates-equiv in-vars))) :rule-classes :congruence)
Theorem:
(defthm svtv-compile-phase-of-svarlist-fix-in-vars (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates (svarlist-fix in-vars)) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars)))
Theorem:
(defthm svtv-compile-phase-svarlist-equiv-congruence-on-in-vars (implies (svarlist-equiv in-vars in-vars-equiv) (equal (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars) (svtv-compile-phase phase ins overrides outs prev-state updates state-updates in-vars-equiv))) :rule-classes :congruence)