Construct a binary-base direct numeric value notation element from a variable number of numbers.
The name of this macro is inspired by
the ABNF notation
Macro:
(defmacro %b. (&rest numbers) (cons '%b.-fn (cons (cons 'list numbers) 'nil)))
Function:
(defun %b.-fn (nats) (declare (xargs :guard (nat-listp nats))) (element-num-val (num-val-direct (num-base-bin) nats)))
Theorem:
(defthm elementp-of-%b.-fn (b* ((element (%b.-fn nats))) (elementp element)) :rule-classes :rewrite)
Theorem:
(defthm %b.-fn-of-nat-list-fix-nats (equal (%b.-fn (nat-list-fix nats)) (%b.-fn nats)))
Theorem:
(defthm %b.-fn-nat-list-equiv-congruence-on-nats (implies (acl2::nat-list-equiv nats nats-equiv) (equal (%b.-fn nats) (%b.-fn nats-equiv))) :rule-classes :congruence)