Simplify read32i-xreg-unsigned{2} after the isomorphic state transformation.
We assume the guard so that we eliminate the outer if with mbt added by apt::isodata.
We simplify the guard to eliminate stat-validp from it, which is implied by stat32ip.
This is the final refinement for this function,
so we use the name
Function:
(defun read32i-xreg-unsigned (reg stat) (declare (xargs :guard (and (stat32ip stat) (natp reg) (< reg 32)))) (if (equal reg 0) 0 (nth (+ -1 reg) (stat32i->xregs stat))))
Theorem:
(defthm read32i-xreg-unsigned{2}-becomes-read32i-xreg-unsigned (implies (and (stat32ip stat) (natp reg) (statp (stat-from-stat32i stat)) (stat-validp (stat-from-stat32i stat) '((base :rv32i) (endian :little) (m))) (< reg 32)) (equal (read32i-xreg-unsigned{2} reg stat) (read32i-xreg-unsigned reg stat))))
Theorem:
(defthm ubyte32p-of-read32i-xreg-unsigned (implies (and (natp reg) (< reg 32)) (ubyte32p (read32i-xreg-unsigned reg stat))))