Construct a hexadecimal-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 %x. (&rest numbers) (cons '%x.-fn (cons (cons 'list numbers) 'nil)))
Function:
(defun %x.-fn (nats) (declare (xargs :guard (nat-listp nats))) (element-num-val (num-val-direct (num-base-hex) nats)))
Theorem:
(defthm elementp-of-%x.-fn (b* ((element (%x.-fn nats))) (elementp element)) :rule-classes :rewrite)
Theorem:
(defthm %x.-fn-of-nat-list-fix-nats (equal (%x.-fn (nat-list-fix nats)) (%x.-fn nats)))
Theorem:
(defthm %x.-fn-nat-list-equiv-congruence-on-nats (implies (acl2::nat-list-equiv nats nats-equiv) (equal (%x.-fn nats) (%x.-fn nats-equiv))) :rule-classes :congruence)