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

    Hp-encoding-p

    Check if a byte array is a hex-prefix encoding.

    This is a declarative, non-executable definition, which essentially characterizes the image of hp-encode.

    Definitions and Theorems

    Theorem: hp-encoding-p-suff

    (defthm hp-encoding-p-suff
      (implies (and (nibble-listp nibbles)
                    (booleanp flag)
                    (equal (hp-encode nibbles flag)
                           (byte-list-fix encoding)))
               (hp-encoding-p encoding)))

    Theorem: booleanp-of-hp-encoding-p

    (defthm booleanp-of-hp-encoding-p
      (b* ((yes/no (hp-encoding-p encoding)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: hp-encoding-p-of-byte-list-fix-encoding

    (defthm hp-encoding-p-of-byte-list-fix-encoding
      (equal (hp-encoding-p (byte-list-fix encoding))
             (hp-encoding-p encoding)))

    Theorem: hp-encoding-p-byte-list-equiv-congruence-on-encoding

    (defthm hp-encoding-p-byte-list-equiv-congruence-on-encoding
      (implies (byte-list-equiv encoding encoding-equiv)
               (equal (hp-encoding-p encoding)
                      (hp-encoding-p encoding-equiv)))
      :rule-classes :congruence)