• 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

    Ascii-fix

    Fixer for ascii.

    Signature
    (ascii-fix x) → fixed-x
    Arguments
    x — Guard (asciip x).
    Returns
    fixed-x — Type (asciip fixed-x).

    Definitions and Theorems

    Function: ascii-fix

    (defun ascii-fix (x)
      (declare (xargs :guard (asciip x)))
      (mbe :logic (if (asciip x) x 0)
           :exec x))

    Theorem: asciip-of-ascii-fix

    (defthm asciip-of-ascii-fix
      (b* ((fixed-x (ascii-fix x)))
        (asciip fixed-x))
      :rule-classes :rewrite)

    Theorem: ascii-fix-when-asciip

    (defthm ascii-fix-when-asciip
      (implies (asciip x)
               (equal (ascii-fix x) x)))