(svtv-extend-entrylist x len lastval lastent width) → xx
Function:
(defun svtv-extend-entrylist (x len lastval lastent width) (declare (xargs :guard (and (svtv-entrylist-p x) (natp len) (svtv-entry-p lastval) (svtv-entry-p lastent) (natp width)))) (let ((__function__ 'svtv-extend-entrylist)) (declare (ignorable __function__)) (b* (((when (zp len)) nil) (lastval (svtv-entry-fix lastval)) (lastent (svtv-entry-fix lastent)) (ent (if (consp x) (svtv-entry-fix (car x)) lastent)) (val (if (and (symbolp ent) (equal (symbol-name ent) "~")) (if (4vec-p lastval) (4vec-bitnot lastval) (prog2$ (raise "Toggle entries (~) must be preceded by a constant value") '_)) ent)) (val (if (4vec-p val) (4vec-zero-ext (2vec (lnfix width)) val) val))) (cons val (svtv-extend-entrylist (cdr x) (1- len) val ent width)))))
Theorem:
(defthm svtv-entrylist-p-of-svtv-extend-entrylist (b* ((xx (svtv-extend-entrylist x len lastval lastent width))) (svtv-entrylist-p xx)) :rule-classes :rewrite)
Theorem:
(defthm len-of-svtv-extend-entrylist (equal (len (svtv-extend-entrylist x len lastval lastent width)) (nfix len)))
Theorem:
(defthm svtv-extend-entrylist-of-svtv-entrylist-fix-x (equal (svtv-extend-entrylist (svtv-entrylist-fix x) len lastval lastent width) (svtv-extend-entrylist x len lastval lastent width)))
Theorem:
(defthm svtv-extend-entrylist-svtv-entrylist-equiv-congruence-on-x (implies (svtv-entrylist-equiv x x-equiv) (equal (svtv-extend-entrylist x len lastval lastent width) (svtv-extend-entrylist x-equiv len lastval lastent width))) :rule-classes :congruence)
Theorem:
(defthm svtv-extend-entrylist-of-nfix-len (equal (svtv-extend-entrylist x (nfix len) lastval lastent width) (svtv-extend-entrylist x len lastval lastent width)))
Theorem:
(defthm svtv-extend-entrylist-nat-equiv-congruence-on-len (implies (nat-equiv len len-equiv) (equal (svtv-extend-entrylist x len lastval lastent width) (svtv-extend-entrylist x len-equiv lastval lastent width))) :rule-classes :congruence)
Theorem:
(defthm svtv-extend-entrylist-of-svtv-entry-fix-lastval (equal (svtv-extend-entrylist x len (svtv-entry-fix lastval) lastent width) (svtv-extend-entrylist x len lastval lastent width)))
Theorem:
(defthm svtv-extend-entrylist-svtv-entry-equiv-congruence-on-lastval (implies (svtv-entry-equiv lastval lastval-equiv) (equal (svtv-extend-entrylist x len lastval lastent width) (svtv-extend-entrylist x len lastval-equiv lastent width))) :rule-classes :congruence)
Theorem:
(defthm svtv-extend-entrylist-of-svtv-entry-fix-lastent (equal (svtv-extend-entrylist x len lastval (svtv-entry-fix lastent) width) (svtv-extend-entrylist x len lastval lastent width)))
Theorem:
(defthm svtv-extend-entrylist-svtv-entry-equiv-congruence-on-lastent (implies (svtv-entry-equiv lastent lastent-equiv) (equal (svtv-extend-entrylist x len lastval lastent width) (svtv-extend-entrylist x len lastval lastent-equiv width))) :rule-classes :congruence)
Theorem:
(defthm svtv-extend-entrylist-of-nfix-width (equal (svtv-extend-entrylist x len lastval lastent (nfix width)) (svtv-extend-entrylist x len lastval lastent width)))
Theorem:
(defthm svtv-extend-entrylist-nat-equiv-congruence-on-width (implies (nat-equiv width width-equiv) (equal (svtv-extend-entrylist x len lastval lastent width) (svtv-extend-entrylist x len lastval lastent width-equiv))) :rule-classes :congruence)