Theorems about get-rd applied to the encoding of different instructions.
Theorem:
(defthm get-rd-of-encode-of-instr-op-imm (equal (get-rd (encode (instr-op-imm funct rd rs1 imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-op-imms32 (equal (get-rd (encode (instr-op-imms32 funct rd rs1 imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-op-imms64 (equal (get-rd (encode (instr-op-imms64 funct rd rs1 imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-op-imm-32 (equal (get-rd (encode (instr-op-imm-32 funct rd rs1 imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-op-imms-32 (equal (get-rd (encode (instr-op-imms-32 funct rd rs1 imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-lui (equal (get-rd (encode (instr-lui rd imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-auipc (equal (get-rd (encode (instr-auipc rd imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-op (equal (get-rd (encode (instr-op funct rd rs1 rs2) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-op-32 (equal (get-rd (encode (instr-op-32 funct rd rs1 rs2) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-jal (equal (get-rd (encode (instr-jal rd imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-jalr (equal (get-rd (encode (instr-jalr rd rs1 imm) feat)) (ubyte5-fix rd)))
Theorem:
(defthm get-rd-of-encode-of-instr-load (equal (get-rd (encode (instr-load funct rd rs1 imm) feat)) (ubyte5-fix rd)))