• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
        • Mmp-trees
        • Semaphore
        • Database
        • Cryptography
        • Rlp
        • Transactions
        • Hex-prefix
        • Basics
          • Byte-arrays
          • Bytes
          • Words
            • Word
              • Wordp
                • Word-fix
            • Nibbles
            • Scalars
            • Nibble-arrays
          • Addresses
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Word

    Wordp

    Recognizer for word.

    Signature
    (wordp x) → yes/no
    Returns
    yes/no — Type (booleanp yes/no).

    Definitions and Theorems

    Function: wordp

    (defun wordp (x)
     (declare (xargs :guard t))
     (mbe
      :logic (unsigned-byte-p 256 x)
      :exec
      (and
       (integerp x)
       (<= 0 x)
       (<
        x
        115792089237316195423570985008687907853269984665640564039457584007913129639936))))

    Theorem: booleanp-of-wordp

    (defthm booleanp-of-wordp
      (b* ((yes/no (wordp x)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: wordp-forward-unsigned-byte-p

    (defthm wordp-forward-unsigned-byte-p
      (implies (wordp x)
               (unsigned-byte-p 256 x))
      :rule-classes :forward-chaining)

    Theorem: unsigned-byte-p-rewrite-wordp

    (defthm unsigned-byte-p-rewrite-wordp
      (equal (unsigned-byte-p 256 x)
             (wordp x)))

    Theorem: natp-when-wordp

    (defthm natp-when-wordp
      (implies (wordp x) (natp x))
      :rule-classes :compound-recognizer)