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