Rewrite an ordinary
(vl-casestmt-elim check test caselist default atts ctx warnings) → (mv warnings new-stmt)
Function:
(defun vl-casestmt-elim (check test caselist default atts ctx warnings) (declare (xargs :guard (and (vl-casecheck-p check) (vl-expr-p test) (vl-caselist-p caselist) (vl-stmt-p default) (vl-atts-p atts) (vl-modelement-p ctx) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-casestmt-elim)) (declare (ignorable __function__)) (b* ((warnings (vl-warninglist-fix warnings)) (new-warnings (vl-casestmt-size-warnings test caselist ctx)) (check (vl-casecheck-fix check)) ((when new-warnings) (mv (append new-warnings warnings) (make-vl-casestmt :casetype nil :check check :test test :caselist caselist :default default :atts atts))) (warnings (if check (warn :type :vl-case-check :msg "~a0: we don't yet implement priority, unique, or ~ unique0 checking for case statements. We will ~ treat this as an ordinary case statement." :args (list (vl-modelement-fix ctx))) (ok)))) (mv warnings (vl-casestmt-elim-aux test caselist default)))))
Theorem:
(defthm vl-warninglist-p-of-vl-casestmt-elim.warnings (b* (((mv ?warnings ?new-stmt) (vl-casestmt-elim check test caselist default atts ctx warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-stmt-p-of-vl-casestmt-elim.new-stmt (b* (((mv ?warnings ?new-stmt) (vl-casestmt-elim check test caselist default atts ctx warnings))) (vl-stmt-p new-stmt)) :rule-classes :rewrite)
Theorem:
(defthm vl-casestmt-elim-of-vl-casecheck-fix-check (equal (vl-casestmt-elim (vl-casecheck-fix check) test caselist default atts ctx warnings) (vl-casestmt-elim check test caselist default atts ctx warnings)))
Theorem:
(defthm vl-casestmt-elim-vl-casecheck-equiv-congruence-on-check (implies (vl-casecheck-equiv check check-equiv) (equal (vl-casestmt-elim check test caselist default atts ctx warnings) (vl-casestmt-elim check-equiv test caselist default atts ctx warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-casestmt-elim-of-vl-expr-fix-test (equal (vl-casestmt-elim check (vl-expr-fix test) caselist default atts ctx warnings) (vl-casestmt-elim check test caselist default atts ctx warnings)))
Theorem:
(defthm vl-casestmt-elim-vl-expr-equiv-congruence-on-test (implies (vl-expr-equiv test test-equiv) (equal (vl-casestmt-elim check test caselist default atts ctx warnings) (vl-casestmt-elim check test-equiv caselist default atts ctx warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-casestmt-elim-of-vl-caselist-fix-caselist (equal (vl-casestmt-elim check test (vl-caselist-fix caselist) default atts ctx warnings) (vl-casestmt-elim check test caselist default atts ctx warnings)))
Theorem:
(defthm vl-casestmt-elim-vl-caselist-equiv-congruence-on-caselist (implies (vl-caselist-equiv caselist caselist-equiv) (equal (vl-casestmt-elim check test caselist default atts ctx warnings) (vl-casestmt-elim check test caselist-equiv default atts ctx warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-casestmt-elim-of-vl-stmt-fix-default (equal (vl-casestmt-elim check test caselist (vl-stmt-fix default) atts ctx warnings) (vl-casestmt-elim check test caselist default atts ctx warnings)))
Theorem:
(defthm vl-casestmt-elim-vl-stmt-equiv-congruence-on-default (implies (vl-stmt-equiv default default-equiv) (equal (vl-casestmt-elim check test caselist default atts ctx warnings) (vl-casestmt-elim check test caselist default-equiv atts ctx warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-casestmt-elim-of-vl-atts-fix-atts (equal (vl-casestmt-elim check test caselist default (vl-atts-fix atts) ctx warnings) (vl-casestmt-elim check test caselist default atts ctx warnings)))
Theorem:
(defthm vl-casestmt-elim-vl-atts-equiv-congruence-on-atts (implies (vl-atts-equiv atts atts-equiv) (equal (vl-casestmt-elim check test caselist default atts ctx warnings) (vl-casestmt-elim check test caselist default atts-equiv ctx warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-casestmt-elim-of-vl-modelement-fix-ctx (equal (vl-casestmt-elim check test caselist default atts (vl-modelement-fix ctx) warnings) (vl-casestmt-elim check test caselist default atts ctx warnings)))
Theorem:
(defthm vl-casestmt-elim-vl-modelement-equiv-congruence-on-ctx (implies (vl-modelement-equiv ctx ctx-equiv) (equal (vl-casestmt-elim check test caselist default atts ctx warnings) (vl-casestmt-elim check test caselist default atts ctx-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-casestmt-elim-of-vl-warninglist-fix-warnings (equal (vl-casestmt-elim check test caselist default atts ctx (vl-warninglist-fix warnings)) (vl-casestmt-elim check test caselist default atts ctx warnings)))
Theorem:
(defthm vl-casestmt-elim-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-casestmt-elim check test caselist default atts ctx warnings) (vl-casestmt-elim check test caselist default atts ctx warnings-equiv))) :rule-classes :congruence)