• 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
      • Riscv
        • Semantics
        • Features
        • States
        • Decoding
        • Instructions
        • Encoding
          • Encode
          • Decoding-of-encoding
          • Encode-load-funct
          • Encode-store-funct
          • Encode-op-imms-32-funct
          • Encode-op-funct
          • Encode-op-32-funct
          • Encode-op-imms64-funct
          • Encode-op-imms32-funct
          • Encoding-of-decoding
            • Decode-injective
            • Encode-of-decode
          • Encode-op-imm-funct
          • Encode-op-imm-32-funct
          • Encode-branch-funct
        • Reads-over-writes
        • Rv32im
        • Rv64im
        • Execution
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • 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
      • Aleo
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Encoding
  • Decoding

Encoding-of-decoding

Encoding applied to decoding.

We show that encoding is left inverse of decoding over valid encodings, i.e. over encodings of valid instructions: if decoding yields an instruction (which we know to be valid as proved in decode), then applying the encoding to the instruction yields the original encoding. As a consequence, decoding is injective over valid encodings: if two different encodings were decoded in the same way, the encoder would have to restore both from the same instruction, which is impossible since encoding is a function.

Subtopics

Decode-injective
Injectivity of decoding.
Encode-of-decode
Encoding the decoding of a valid encoding yields the original encoding.