• 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
        • Bip32
        • Bech32
        • Bip39
        • Bip44
        • Base58
        • Bip43
        • Bytes
          • Byte-sequences
          • Base58check
          • Cryptography
          • Bip-350
          • Bip-173
        • Riscv
        • Des
        • Ethereum
        • 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
    • Bytes

    Byte-sequences

    Byte sequences.

    These are finite lists of bytes, which model byte arrays in particular.

    We use the library type byte-list to model byte sequences in our Bitcoin model.

    Definitions and Theorems

    Theorem: nat-listp-when-byte-listp

    (defthm nat-listp-when-byte-listp
      (implies (byte-listp bytes)
               (nat-listp bytes)))

    Theorem: car-of-byte-list-fix

    (defthm car-of-byte-list-fix
      (implies (consp x)
               (equal (car (byte-list-fix x))
                      (byte-fix (car x)))))

    Theorem: cdr-of-byte-list-fix

    (defthm cdr-of-byte-list-fix
      (equal (cdr (byte-list-fix x))
             (byte-list-fix (cdr x))))

    Theorem: byte-list-equiv-implies-byte-list-equiv-append-1

    (defthm byte-list-equiv-implies-byte-list-equiv-append-1
      (implies (byte-list-equiv x x-equiv)
               (byte-list-equiv (append x y)
                                (append x-equiv y)))
      :rule-classes (:congruence))

    Theorem: byte-list-equiv-implies-byte-list-equiv-append-2

    (defthm byte-list-equiv-implies-byte-list-equiv-append-2
      (implies (byte-list-equiv y y-equiv)
               (byte-list-equiv (append x y)
                                (append x y-equiv)))
      :rule-classes (:congruence))