Add a definition to the defines list.
(vl-add-define name a x) → new-x
Function:
(defun vl-add-define (name a x) (declare (xargs :guard (and (stringp name) (vl-define-p a) (vl-defines-p x)))) (let ((__function__ 'vl-add-define)) (declare (ignorable __function__)) (hons-acons (string-fix name) (vl-define-fix a) (vl-defines-fix x))))
Theorem:
(defthm vl-defines-p-of-vl-add-define (b* ((new-x (vl-add-define name a x))) (vl-defines-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-add-define-of-str-fix-name (equal (vl-add-define (str-fix name) a x) (vl-add-define name a x)))
Theorem:
(defthm vl-add-define-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-add-define name a x) (vl-add-define name-equiv a x))) :rule-classes :congruence)
Theorem:
(defthm vl-add-define-of-vl-define-fix-a (equal (vl-add-define name (vl-define-fix a) x) (vl-add-define name a x)))
Theorem:
(defthm vl-add-define-vl-define-equiv-congruence-on-a (implies (vl-define-equiv a a-equiv) (equal (vl-add-define name a x) (vl-add-define name a-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-add-define-of-vl-defines-fix-x (equal (vl-add-define name a (vl-defines-fix x)) (vl-add-define name a x)))
Theorem:
(defthm vl-add-define-vl-defines-equiv-congruence-on-x (implies (vl-defines-equiv x x-equiv) (equal (vl-add-define name a x) (vl-add-define name a x-equiv))) :rule-classes :congruence)