Pretty-print a constant.
We cause an error when we encounter the placeholders for floating, enumeration, and character constants.
Function:
(defun pprint-const (c) (declare (xargs :guard (constp c))) (let ((__function__ 'pprint-const)) (declare (ignorable __function__)) (const-case c :int (pprint-iconst c.get) :float (prog2$ (raise "Internal error: ~ floating constants not supported.") "") :enum (pprint-ident c.get) :char (prog2$ (raise "Internal error: ~ character constants not supported.") ""))))
Theorem:
(defthm msgp-of-pprint-const (b* ((part (pprint-const c))) (msgp part)) :rule-classes :rewrite)
Theorem:
(defthm pprint-const-of-const-fix-c (equal (pprint-const (const-fix c)) (pprint-const c)))
Theorem:
(defthm pprint-const-const-equiv-congruence-on-c (implies (const-equiv c c-equiv) (equal (pprint-const c) (pprint-const c-equiv))) :rule-classes :congruence)