Clean warnings in a vl-udp-p.
Function:
(defun vl-udp-clean-warnings (x) (declare (xargs :guard (vl-udp-p x))) (let ((__function__ 'vl-udp-clean-warnings)) (declare (ignorable __function__)) (mbe :logic (b* (((vl-udp x) x)) (change-vl-udp x :warnings (vl-clean-warnings x.warnings))) :exec (b* (((vl-udp x) x) ((unless x.warnings) x)) (change-vl-udp x :warnings (vl-clean-warnings x.warnings))))))
Theorem:
(defthm vl-udp-p-of-vl-udp-clean-warnings (b* ((new-x (vl-udp-clean-warnings x))) (vl-udp-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-udp-clean-warnings-of-vl-udp-fix-x (equal (vl-udp-clean-warnings (vl-udp-fix x)) (vl-udp-clean-warnings x)))
Theorem:
(defthm vl-udp-clean-warnings-vl-udp-equiv-congruence-on-x (implies (vl-udp-equiv x x-equiv) (equal (vl-udp-clean-warnings x) (vl-udp-clean-warnings x-equiv))) :rule-classes :congruence)