• 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
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Riscv
          • Specification
          • Executable
            • Decoding-left-inverse
              • Decodex-of-encode-of-instr
              • Get-opcode-of-encode-of-instr
              • Get-funct3-of-encode-of-instr
              • Get-rd-of-encode-of-instr
              • Get-rs1-of-encode-of-instr
              • Get-fields-itype-of-encode-of-instr
              • Get-imm-itype-of-encode-of-instr
              • Get-rs2-of-encode-of-instr
              • Encode-injective
              • Get-fields-rtype-of-encode-of-instr
              • Get-funct7-of-encode-of-instr
              • Get-fields-utype-of-encode-of-instr
              • Decodex-of-encode
                • Get-imm-utype-of-encode-of-instr
                • Get-fields-stype-of-encode-of-instr
                • Get-fields-btype-of-encode-of-instr
                • Get-imm-stype-of-encode-of-instr
                • Get-imm-jtype-of-encode-of-instr
                • Get-imm-btype-of-encode-of-instr
                • Get-fields-jtype-of-encode-of-instr
              • Decoding-executable
              • Decoding-right-inverse
              • Execution-executable
              • Decoding-correct
            • Specialized
            • Optimized
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Decoding-left-inverse

    Decodex-of-encode

    Decoding the encoding of a valid instruction yields the original instruction.

    That is, decoding is left inverse of encoding, over valid instructions.

    Definitions and Theorems

    Theorem: decodex-of-encode

    (defthm decodex-of-encode
      (implies (instr-validp instr feat)
               (equal (decodex (encode instr feat) feat)
                      (instr-fix instr))))