Like logcons for signed bvecs.
(bfr-scons b v) → s
Function:
(defun bfr-scons (b v) (declare (xargs :guard (true-listp v))) (let ((__function__ 'bfr-scons)) (declare (ignorable __function__)) (if (atom v) (if b (list b nil) '(nil)) (if (and (atom (cdr v)) (hons-equal (car v) b)) (llist-fix v) (cons b (llist-fix v))))))
Theorem:
(defthm true-listp-of-bfr-scons (b* ((s (bfr-scons b v))) (true-listp s)) :rule-classes :type-prescription)
Theorem:
(defthm scdr-of-bfr-scons (equal (scdr (bfr-scons b v)) (bfr-snorm v)))
Theorem:
(defthm s-endp-of-bfr-scons (equal (s-endp (bfr-scons b v)) (and (s-endp v) (hqual b (car v)))))
Theorem:
(defthm car-of-bfr-scons (equal (car (bfr-scons b v)) b))
Theorem:
(defthm bfr-list->s-of-bfr-scons (equal (bfr-list->s (bfr-scons b x) env) (logcons (bool->bit (bfr-eval b env)) (bfr-list->s x env))))
Theorem:
(defthm pbfr-list-depends-on-of-scons (implies (and (not (pbfr-depends-on k p b)) (not (pbfr-list-depends-on k p x))) (not (pbfr-list-depends-on k p (bfr-scons b x)))))
Theorem:
(defthm bfr-scons-of-list-fix (equal (bfr-scons b (list-fix v)) (bfr-scons b v)))