• 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
                • Ascii
                  • Asciip
                    • Ascii-fix
                  • 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
    • Ascii

    Asciip

    Recognizer for ascii.

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

    Definitions and Theorems

    Function: asciip

    (defun asciip (x)
      (declare (xargs :guard t))
      (mbe :logic (unsigned-byte-p 7 x)
           :exec (and (integerp x) (<= 0 x) (< x 128))))

    Theorem: booleanp-of-asciip

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

    Theorem: asciip-forward-unsigned-byte-p

    (defthm asciip-forward-unsigned-byte-p
      (implies (asciip x)
               (unsigned-byte-p 7 x))
      :rule-classes :forward-chaining)

    Theorem: unsigned-byte-p-rewrite-asciip

    (defthm unsigned-byte-p-rewrite-asciip
      (equal (unsigned-byte-p 7 x)
             (asciip x)))

    Theorem: natp-when-asciip

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