Check if the
(defbyte-check-size size wrld) → (mv valid value)
The first result is
If the input is valid and is not a call of a unary function,
the second result is the value of the input,
which is known in this case.
Otherwise, the second result is
Function:
(defun defbyte-check-size (size wrld) (declare (xargs :guard (plist-worldp wrld))) (let ((__function__ 'defbyte-check-size)) (declare (ignorable __function__)) (b* (((when (posp size)) (mv t size)) (const? (acl2::defined-constant size wrld)) ((when const?) (b* ((value (unquote const?))) (if (posp value) (mv t value) (mv nil nil)))) ((unless (acl2::tuplep 1 size)) (mv nil nil)) (fn (car size))) (if (and (function-symbolp fn wrld) (= 0 (arity fn wrld))) (mv t nil) (mv nil nil)))))