• 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
      • Riscv
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • 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
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)))))