• 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
          • *bip39-english-words*
          • Bip39-mnemonic-to-seed
          • Bip39-entropy-to-word-indexes
          • Bip39-entropy
            • Bip39-entropyp
            • Bip39-entropy-fix
            • Bip39-word-indexes-to-words
            • Bip39-words-to-mnemonic
            • Bip39-entropy-to-seed
            • Bip39-entropy-to-mnemonic
            • Bip39-english-words-bound-p
            • Bip39-entropy-size-p
          • Bip44
          • Base58
          • Bip43
          • Bytes
          • 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
    • Bip39-entropy

    Bip39-entropy-fix

    Fixer for bip39-entropy.

    Signature
    (bip39-entropy-fix x) → fixed-x
    Arguments
    x — Guard (bip39-entropyp x).
    Returns
    fixed-x — Type (bip39-entropyp fixed-x).

    Definitions and Theorems

    Function: bip39-entropy-fix

    (defun bip39-entropy-fix (x)
      (declare (xargs :guard (bip39-entropyp x)))
      (mbe :logic (if (bip39-entropyp x) x (repeat 128 0))
           :exec x))

    Theorem: bip39-entropyp-of-bip39-entropy-fix

    (defthm bip39-entropyp-of-bip39-entropy-fix
      (b* ((fixed-x (bip39-entropy-fix x)))
        (bip39-entropyp fixed-x))
      :rule-classes :rewrite)

    Theorem: bip39-entropy-fix-when-bip39-entropyp

    (defthm bip39-entropy-fix-when-bip39-entropyp
      (implies (bip39-entropyp x)
               (equal (bip39-entropy-fix x) x)))