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