Construct a binary-base range numeric value notation element from a minimum and a maximum.
The name of this function is inspired by
the ABNF notation
Function:
(defun %b- (min max) (declare (xargs :guard (and (natp min) (natp max)))) (element-num-val (num-val-range (num-base-bin) min max)))
Theorem:
(defthm elementp-of-%b- (b* ((element (%b- min max))) (elementp element)) :rule-classes :rewrite)
Theorem:
(defthm %b--of-nfix-min (equal (%b- (nfix min) max) (%b- min max)))
Theorem:
(defthm %b--nat-equiv-congruence-on-min (implies (acl2::nat-equiv min min-equiv) (equal (%b- min max) (%b- min-equiv max))) :rule-classes :congruence)
Theorem:
(defthm %b--of-nfix-max (equal (%b- min (nfix max)) (%b- min max)))
Theorem:
(defthm %b--nat-equiv-congruence-on-max (implies (acl2::nat-equiv max max-equiv) (equal (%b- min max) (%b- min max-equiv))) :rule-classes :congruence)