• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
          • Name-database
          • Vl-gc
          • Symbol-list-names
          • Ints-from
          • Nats-from
            • Nats-from-exec
            • Make-lookup-alist
            • Redundant-mergesort
            • Longest-common-prefix
            • Vl-plural-p
            • Vl-remove-keys
            • Vl-merge-contiguous-indices
            • Vl-edition-p
            • Sum-nats
            • Vl-maybe-integer-listp
            • Fast-memberp
            • Nat-listp
            • Max-nats
            • Longest-common-prefix-list
            • Character-list-listp
            • Vl-character-list-list-values-p
            • Remove-from-alist
            • Prefix-of-eachp
            • Vl-string-keys-p
            • Vl-maybe-nat-listp
            • Vl-string-list-values-p
            • String-list-listp
            • Vl-string-values-p
            • True-list-listp
            • Symbol-list-listp
            • Explode-list
            • All-have-len
            • Pos-listp
            • Min-nats
            • Debuggable-and
            • Vl-starname
            • Remove-equal-without-guard
            • Vl-maybe-string-list
            • String-fix
            • Longer-than-p
            • Anyp
            • Fast-alist-free-each-alist-val
            • Not*
            • Free-list-of-fast-alists
            • *nls*
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Nats-from

    Nats-from-exec

    Signature
    (nats-from-exec a b nrev) → nrev
    Arguments
    a — Guard (natp a).
    b — Guard (natp b).

    Definitions and Theorems

    Function: nats-from-exec

    (defun nats-from-exec (a b nrev)
      (declare (xargs :stobjs (nrev)))
      (declare (xargs :guard (and (natp a) (natp b))))
      (declare (xargs :guard (<= a b)))
      (let ((__function__ 'nats-from-exec))
        (declare (ignorable __function__))
        (let ((a (lnfix a)) (b (lnfix b)))
          (if (mbe :logic (zp (- b a)) :exec (= a b))
              (nrev-fix nrev)
            (let ((nrev (nrev-push a nrev)))
              (nats-from-exec (+ 1 a) b nrev))))))