• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
      • Std/lists
      • Omaps
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
        • Maybe-stringp
        • Maybe-natp
        • Two-nats-measure
        • Impossible
        • Bytep
          • Byte
            • Byte-list
              • Byte-listp
              • Byte-list-fix
              • Byte-list20
                • Byte-list20p
                • Byte-list20-fix
                • Byte-list32
                • Byte-list64
                • Byte-list-equiv
              • Byte-fix
              • Bytep-additional-theorems
            • Bytes-as-digits-in-base-256
            • Bytep-additional-theorems
          • Nat-list-measure
          • Maybe-posp
          • Nibblep
          • Organize-symbols-by-pkg
          • Organize-symbols-by-name
          • Lnfix
          • Good-valuep
          • Streqv
          • Chareqv
          • Symbol-package-name-non-cl
          • Arith-equivs
          • Induction-schemes
          • Maybe-integerp
          • Char-fix
          • Pos-fix
          • Symbol-package-name-lst
          • Mbt$
          • Maybe-bitp
          • Good-pseudo-termp
          • Str-fix
          • Maybe-string-fix
          • Nonkeyword-listp
          • Lifix
          • Bfix
          • Std/basic/if*
          • Impliez
          • Tuplep
          • Std/basic/intern-in-package-of-symbol
          • Lbfix
          • Std/basic/symbol-name-lst
          • True
          • Std/basic/rfix
          • Std/basic/realfix
          • Std/basic/member-symbol-name
          • Std/basic/fix
          • False
          • Std/basic/nfix
          • Std/basic/ifix
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Byte-list20

    Byte-list20-fix

    Fixer for byte-list20.

    Signature
    (byte-list20-fix x) → *
    Arguments
    x — Guard (byte-list20p x).

    Definitions and Theorems

    Function: byte-list20-fix

    (defun byte-list20-fix (x)
      (declare (xargs :guard (byte-list20p x)))
      (mbe :logic
           (if (byte-list20p x)
               x
             (byte-list-fix (take 20 x)))
           :exec x))

    Theorem: byte-list20p-of-byte-list20-fix

    (defthm byte-list20p-of-byte-list20-fix
      (byte-list20p (byte-list20-fix x)))

    Theorem: byte-list20-fix-when-byte-list20p

    (defthm byte-list20-fix-when-byte-list20p
      (implies (byte-list20p x)
               (equal (byte-list20-fix x) x)))