• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
          • Mmp-trees
          • Semaphore
          • Database
          • Cryptography
          • Rlp
            • Rlp-tree
            • Rlp-decoding-executable
              • Rlp-error
                • Rlp-error-fix
                • Rlp-error-p
                • Rlp-error-case
                • Rlp-error-equiv
                • Rlp-error-count
                • Rlp-error-fewer-bytes-than-short-length
                • Rlp-error-fewer-bytes-than-long-length
                • Rlp-error-fewer-bytes-than-length-of-length
                • Rlp-error-kind
                • Rlp-error-subtree
                • Rlp-error-non-optimal-short-length
                  • Rlp-error-non-optimal-short-length->fragment
                    • Make-rlp-error-non-optimal-short-length
                    • Change-rlp-error-non-optimal-short-length
                  • Rlp-error-non-optimal-long-length
                  • Rlp-error-leading-zeros-in-scalar
                  • Rlp-error-leading-zeros-in-long-length
                  • Rlp-error-extra-bytes
                  • Rlp-error-branch-tree
                  • Rlp-error-no-bytes
                • Rlp-parse-tree
                • Rlp-decodex-tree
                • Maybe-rlp-error
                • Rlp-decodex-bytes
                • Rlp-decodex-scalar
              • Rlp-decodability
              • Rlp-encoding
              • Rlp-decoding-declarative
              • Rlp-big-endian-representations
            • Transactions
            • Hex-prefix
            • Basics
            • Addresses
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Rlp-error-non-optimal-short-length

    Rlp-error-non-optimal-short-length->fragment

    Get the fragment field from a rlp-error-non-optimal-short-length.

    Signature
    (rlp-error-non-optimal-short-length->fragment x) → fragment
    Arguments
    x — Guard (rlp-error-p x).
    Returns
    fragment — Type (byte-listp fragment).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: rlp-error-non-optimal-short-length->fragment$inline

    (defun rlp-error-non-optimal-short-length->fragment$inline (x)
     (declare (xargs :guard (rlp-error-p x)))
     (declare (xargs :guard (equal (rlp-error-kind x)
                                   :non-optimal-short-length)))
     (let ((__function__ 'rlp-error-non-optimal-short-length->fragment))
       (declare (ignorable __function__))
       (mbe :logic
            (b* ((x (and (equal (rlp-error-kind x)
                                :non-optimal-short-length)
                         x)))
              (byte-list-fix (std::da-nth 0 (cdr x))))
            :exec (std::da-nth 0 (cdr x)))))

    Theorem: byte-listp-of-rlp-error-non-optimal-short-length->fragment

    (defthm byte-listp-of-rlp-error-non-optimal-short-length->fragment
     (b* ((fragment
               (rlp-error-non-optimal-short-length->fragment$inline x)))
       (byte-listp fragment))
     :rule-classes :rewrite)

    Theorem: rlp-error-non-optimal-short-length->fragment$inline-of-rlp-error-fix-x

    (defthm
     rlp-error-non-optimal-short-length->fragment$inline-of-rlp-error-fix-x
     (equal (rlp-error-non-optimal-short-length->fragment$inline
                 (rlp-error-fix x))
            (rlp-error-non-optimal-short-length->fragment$inline x)))

    Theorem: rlp-error-non-optimal-short-length->fragment$inline-rlp-error-equiv-congruence-on-x

    (defthm
     rlp-error-non-optimal-short-length->fragment$inline-rlp-error-equiv-congruence-on-x
     (implies
      (rlp-error-equiv x x-equiv)
      (equal
         (rlp-error-non-optimal-short-length->fragment$inline x)
         (rlp-error-non-optimal-short-length->fragment$inline x-equiv)))
     :rule-classes :congruence)

    Theorem: rlp-error-non-optimal-short-length->fragment-when-wrong-kind

    (defthm rlp-error-non-optimal-short-length->fragment-when-wrong-kind
      (implies (not (equal (rlp-error-kind x)
                           :non-optimal-short-length))
               (equal (rlp-error-non-optimal-short-length->fragment x)
                      (byte-list-fix nil))))