Object encoding the bfr-mode and current node index bound, if using AIGNET mode.
(bfrstate mode bound) → bfrstate
For a bfr object to be well-formed, we need to know, first, whether we're operating in BDD, AIG, or AIGNET mode, and second, if in AIGNET mode, the bound on node indices. This type encodes the bfr-mode in the lower 2 bits and the node index bound in the upper bits of an integer.
Function:
(defun bfrstate (mode bound) (declare (xargs :guard (and (bfr-mode-p mode) (natp bound)))) (let ((__function__ 'bfrstate)) (declare (ignorable __function__)) (logior (ash (lnfix bound) 2) (bfr-mode-fix mode))))
Theorem:
(defthm bfrstate-p-of-bfrstate (b* ((bfrstate (bfrstate mode bound))) (bfrstate-p bfrstate)) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm bfrstate-of-bfr-mode-fix-mode (equal (bfrstate (bfr-mode-fix mode) bound) (bfrstate mode bound)))
Theorem:
(defthm bfrstate-bfr-mode-equiv-congruence-on-mode (implies (bfr-mode-equiv mode mode-equiv) (equal (bfrstate mode bound) (bfrstate mode-equiv bound))) :rule-classes :congruence)
Theorem:
(defthm bfrstate-of-nfix-bound (equal (bfrstate mode (nfix bound)) (bfrstate mode bound)))
Theorem:
(defthm bfrstate-nat-equiv-congruence-on-bound (implies (acl2::nat-equiv bound bound-equiv) (equal (bfrstate mode bound) (bfrstate mode bound-equiv))) :rule-classes :congruence)