• 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
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
          • Jubjub
          • Verify-zcash-r1cs
          • Lift-zcash-r1cs
          • Pedersen-hash
          • Zcash-gadgets
          • Bit/byte/integer-conversions
            • Leos2ip
            • Lebs2osp
            • Lebs2ip
            • Leos2bsp
              • I2lebsp
              • I2bebsp
            • Constants
            • Blake2-hash
            • Randomness-beacon
          • 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
    • Bit/byte/integer-conversions

    Leos2bsp

    The function \mathsf{LEOS2BSP} in [ZPS:5.1].

    Signature
    (leos2bsp bytes) → bits
    Arguments
    bytes — Guard (byte-listp bytes).
    Returns
    bits — Type (bit-listp bits).

    The \ell argumnent can be determined from the other argument: it is the length of the other argument times 8. Thus, in our formalization we just have one argument.

    Definitions and Theorems

    Function: leos2bsp

    (defun leos2bsp (bytes)
      (declare (xargs :guard (byte-listp bytes)))
      (let ((__function__ 'leos2bsp))
        (declare (ignorable __function__))
        (acl2::lebytes=>bits bytes)))

    Theorem: bit-listp-of-leos2bsp

    (defthm bit-listp-of-leos2bsp
      (b* ((bits (leos2bsp bytes)))
        (bit-listp bits))
      :rule-classes :rewrite)

    Theorem: len-of-leos2bsp

    (defthm len-of-leos2bsp
      (b* ((?bits (leos2bsp bytes)))
        (equal (len bits) (* 8 (len bytes)))))