(svtv-lines->overrides x index) → (mv svtv-ovs lhs-ovs)
Function:
(defun svtv-lines->overrides (x index) (declare (xargs :guard (and (svtv-lines-p x) (natp index)))) (let ((__function__ 'svtv-lines->overrides)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv nil nil)) ((svtv-line xf) (car x)) (testvar (make-svar :name (cons ':svtv-override-test (lnfix index)))) (valvar (make-svar :name (cons ':svtv-override-val (lnfix index)))) (ov (make-lhs-override :lhs xf.lhs :test (svex-var testvar) :val (svex-var valvar))) ((mv svtv-ovs lhs-ovs) (svtv-lines->overrides (cdr x) (1+ (lnfix index))))) (mv (cons (make-svtv-overrideline :lhs xf.lhs :test testvar :val valvar :entries xf.entries) svtv-ovs) (cons ov lhs-ovs)))))
Theorem:
(defthm svtv-overridelines-p-of-svtv-lines->overrides.svtv-ovs (b* (((mv ?svtv-ovs ?lhs-ovs) (svtv-lines->overrides x index))) (svtv-overridelines-p svtv-ovs)) :rule-classes :rewrite)
Theorem:
(defthm lhs-overridelist-p-of-svtv-lines->overrides.lhs-ovs (b* (((mv ?svtv-ovs ?lhs-ovs) (svtv-lines->overrides x index))) (lhs-overridelist-p lhs-ovs)) :rule-classes :rewrite)
Theorem:
(defthm svtv-lines->overrides-of-svtv-lines-fix-x (equal (svtv-lines->overrides (svtv-lines-fix x) index) (svtv-lines->overrides x index)))
Theorem:
(defthm svtv-lines->overrides-svtv-lines-equiv-congruence-on-x (implies (svtv-lines-equiv x x-equiv) (equal (svtv-lines->overrides x index) (svtv-lines->overrides x-equiv index))) :rule-classes :congruence)
Theorem:
(defthm svtv-lines->overrides-of-nfix-index (equal (svtv-lines->overrides x (nfix index)) (svtv-lines->overrides x index)))
Theorem:
(defthm svtv-lines->overrides-nat-equiv-congruence-on-index (implies (nat-equiv index index-equiv) (equal (svtv-lines->overrides x index) (svtv-lines->overrides x index-equiv))) :rule-classes :congruence)