Evaluate a pair of hex digits to a byte.
(eval-hex-pair hp) → val
The digits are interpreted in big endian form.
Function:
(defun eval-hex-pair (hp) (declare (xargs :guard (hex-pairp hp))) (let ((__function__ 'eval-hex-pair)) (declare (ignorable __function__)) (str::hex-digit-chars-value (list (hex-digit->get (hex-pair->1st hp)) (hex-digit->get (hex-pair->2nd hp))))))
Theorem:
(defthm ubyte8p-of-eval-hex-pair (b* ((val (eval-hex-pair hp))) (acl2::ubyte8p val)) :rule-classes :rewrite)
Theorem:
(defthm eval-hex-pair-of-hex-pair-fix-hp (equal (eval-hex-pair (hex-pair-fix hp)) (eval-hex-pair hp)))
Theorem:
(defthm eval-hex-pair-hex-pair-equiv-congruence-on-hp (implies (hex-pair-equiv hp hp-equiv) (equal (eval-hex-pair hp) (eval-hex-pair hp-equiv))) :rule-classes :congruence)