• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
          • Aij
          • Language
            • Syntax
              • Grammar
              • Unicode-escapes
              • Unicode-input-char
              • Escape-sequence
              • Identifiers
              • Primitive-types
              • Reference-types
              • Keywords
              • Unicode-characters
                • Unicode
                  • Unicodep
                    • Unicode-fix
                  • Ascii
                  • String=>unicode
                  • Ascii=>string
                  • Ascii-list
                  • Unicode-list
                • Integer-literals
                • String-literals
                • Octal-digits
                • Hexadecimal-digits
                • Decimal-digits
                • Binary-digits
                • Character-literals
                • Null-literal
                • Floating-point-literals
                • Boolean-literals
                • Package-names
                • Literals
              • Semantics
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Unicode

    Unicodep

    Recognizer for unicode.

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

    Definitions and Theorems

    Function: unicodep

    (defun unicodep (x)
      (declare (xargs :guard t))
      (mbe :logic (unsigned-byte-p 16 x)
           :exec (and (integerp x)
                      (<= 0 x)
                      (< x 65536))))

    Theorem: booleanp-of-unicodep

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

    Theorem: unicodep-forward-unsigned-byte-p

    (defthm unicodep-forward-unsigned-byte-p
      (implies (unicodep x)
               (unsigned-byte-p 16 x))
      :rule-classes :forward-chaining)

    Theorem: unsigned-byte-p-rewrite-unicodep

    (defthm unsigned-byte-p-rewrite-unicodep
      (equal (unsigned-byte-p 16 x)
             (unicodep x)))

    Theorem: natp-when-unicodep

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