Pretty-print a hexadecimal constant.
According to the grammar [C:6.4.4.1],
a `hexadecimal constant' is a sequence of hexadecimal digits
preceded by
Function:
(defun pprint-hex-const (n) (declare (xargs :guard (natp n))) (let ((__function__ 'pprint-hex-const)) (declare (ignorable __function__)) (str::cat "0x" (str::nat-to-hex-string (lnfix n)))))
Theorem:
(defthm msgp-of-pprint-hex-const (b* ((part (pprint-hex-const n))) (msgp part)) :rule-classes :rewrite)
Theorem:
(defthm pprint-hex-const-of-nfix-n (equal (pprint-hex-const (nfix n)) (pprint-hex-const n)))
Theorem:
(defthm pprint-hex-const-nat-equiv-congruence-on-n (implies (acl2::nat-equiv n n-equiv) (equal (pprint-hex-const n) (pprint-hex-const n-equiv))) :rule-classes :congruence)