(add-af-spec32 dst src) → *
Function:
(defun add-af-spec32$inline (dst src) (declare (type (unsigned-byte 32) dst) (type (unsigned-byte 32) src)) (b* (((the (unsigned-byte 4) dst-3-0) (mbe :logic (part-select dst :low 0 :width 4) :exec (logand 15 dst))) ((the (unsigned-byte 4) src-3-0) (mbe :logic (part-select src :low 0 :width 4) :exec (logand 15 src))) (add (the (unsigned-byte 5) (+ (the (unsigned-byte 4) dst-3-0) (the (unsigned-byte 4) src-3-0)))) (af (the (unsigned-byte 1) (bool->bit (< 15 add))))) af))
Theorem:
(defthm n01p-add-af-spec32 (unsigned-byte-p 1 (add-af-spec32 dst src)) :rule-classes (:rewrite (:type-prescription :corollary (natp (add-af-spec32 dst src)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (add-af-spec32 dst src)) (< (add-af-spec32 dst src) 2)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))