• 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
          • Bip43-purpose
            • Bip43-purpose-fix
              • Bip43-purposep
            • Bip43-export-key
            • Bip43-key-tree-has-purpose-p
            • Bip43-import-key
          • 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
    • Bip43-purpose

    Bip43-purpose-fix

    Fixer for bip43-purpose.

    Signature
    (bip43-purpose-fix x) → fixed-x
    Arguments
    x — Guard (bip43-purposep x).
    Returns
    fixed-x — Type (bip43-purposep fixed-x).

    Definitions and Theorems

    Function: bip43-purpose-fix

    (defun bip43-purpose-fix (x)
      (declare (xargs :guard (bip43-purposep x)))
      (mbe :logic (if (bip43-purposep x) x 1)
           :exec x))

    Theorem: bip43-purposep-of-bip43-purpose-fix

    (defthm bip43-purposep-of-bip43-purpose-fix
      (b* ((fixed-x (bip43-purpose-fix x)))
        (bip43-purposep fixed-x))
      :rule-classes :rewrite)

    Theorem: bip43-purpose-fix-when-bip43-purposep

    (defthm bip43-purpose-fix-when-bip43-purposep
      (implies (bip43-purposep x)
               (equal (bip43-purpose-fix x) x)))