• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
        • Mmp-trees
        • Semaphore
        • Database
        • Cryptography
        • Rlp
          • Rlp-tree
          • Rlp-decoding-executable
          • Rlp-decodability
            • Rlp-encode-trees-injectivity-proof
            • Rlp-encode-bytes-injectivity-proof
            • Rlp-encode-bytes-prefix-unambiguity-proof
            • Rlp-encode-tree-prefix-unambiguity-proof
            • Rlp-encode-scalar-injectivity-proof
            • Rlp-encode-scalar-prefix-unambiguity-proof
            • Rlp-encoding
            • Rlp-decoding-declarative
            • Rlp-big-endian-representations
          • Transactions
          • Hex-prefix
          • Basics
          • Addresses
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Rlp-decodability

    Rlp-encode-scalar-prefix-unambiguity-proof

    Property that no valid RLP scalar encoding is a strict prefix of another one.

    This easily follows from the analogous property for byte arrays.

    Definitions and Theorems

    Theorem: rlp-encode-scalar-unamb-prefix

    (defthm rlp-encode-scalar-unamb-prefix
      (implies (and (not (mv-nth 0 (rlp-encode-scalar x)))
                    (not (mv-nth 0 (rlp-encode-scalar y))))
               (equal (prefixp (mv-nth 1 (rlp-encode-scalar x))
                               (mv-nth 1 (rlp-encode-scalar y)))
                      (equal (mv-nth 1 (rlp-encode-scalar x))
                             (mv-nth 1 (rlp-encode-scalar y))))))