Construct a hexadecimal-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 %x- (min max) (declare (xargs :guard (and (natp min) (natp max)))) (element-num-val (num-val-range (num-base-hex) min max)))
Theorem:
(defthm elementp-of-%x- (b* ((element (%x- min max))) (elementp element)) :rule-classes :rewrite)
Theorem:
(defthm %x--of-nfix-min (equal (%x- (nfix min) max) (%x- min max)))
Theorem:
(defthm %x--nat-equiv-congruence-on-min (implies (acl2::nat-equiv min min-equiv) (equal (%x- min max) (%x- min-equiv max))) :rule-classes :congruence)
Theorem:
(defthm %x--of-nfix-max (equal (%x- min (nfix max)) (%x- min max)))
Theorem:
(defthm %x--nat-equiv-congruence-on-max (implies (acl2::nat-equiv max max-equiv) (equal (%x- min max) (%x- min max-equiv))) :rule-classes :congruence)