Print a decimal fractional constant.
(print-dec-frac-const dfconst pstate) → new-pstate
We ensure that there is at least one digit, before or after the fractional point.
Function:
(defun print-dec-frac-const (dfconst pstate) (declare (xargs :guard (and (dec-frac-constp dfconst) (pristatep pstate)))) (let ((__function__ 'print-dec-frac-const)) (declare (ignorable __function__)) (b* (((dec-frac-const dfconst) dfconst) ((unless (or dfconst.before dfconst.after)) (raise "Misusage error: ~ the decimal fractional constant has no digits.") (pristate-fix pstate)) (pstate (print-dec-digit-achars dfconst.before pstate)) (pstate (print-astring "." pstate)) (pstate (print-dec-digit-achars dfconst.after pstate))) pstate)))
Theorem:
(defthm pristatep-of-print-dec-frac-const (b* ((new-pstate (print-dec-frac-const dfconst pstate))) (pristatep new-pstate)) :rule-classes :rewrite)
Theorem:
(defthm print-dec-frac-const-of-dec-frac-const-fix-dfconst (equal (print-dec-frac-const (dec-frac-const-fix dfconst) pstate) (print-dec-frac-const dfconst pstate)))
Theorem:
(defthm print-dec-frac-const-dec-frac-const-equiv-congruence-on-dfconst (implies (dec-frac-const-equiv dfconst dfconst-equiv) (equal (print-dec-frac-const dfconst pstate) (print-dec-frac-const dfconst-equiv pstate))) :rule-classes :congruence)
Theorem:
(defthm print-dec-frac-const-of-pristate-fix-pstate (equal (print-dec-frac-const dfconst (pristate-fix pstate)) (print-dec-frac-const dfconst pstate)))
Theorem:
(defthm print-dec-frac-const-pristate-equiv-congruence-on-pstate (implies (pristate-equiv pstate pstate-equiv) (equal (print-dec-frac-const dfconst pstate) (print-dec-frac-const dfconst pstate-equiv))) :rule-classes :congruence)