Module IndexedMreg <: INDEXED_TYPE.
Definition t := mreg.
Definition eq := mreg_eq.
Definition index (r: mreg): positive :=
match r with
| R0 => 1  | R1 => 2  | R2 => 3  | R3 => 4
| R4 => 5  | R5 => 6  | R6 => 7  | R7 => 8
| R8 => 9  | R9 => 10 | R10 => 11 | R11 => 12
| R12 => 13
| F0 => 14 | F1 => 15 | F2 => 16  | F3 => 17
| F4 => 18 | F5 => 19 | F6 => 20  | F7 => 21
| F8 => 22 | F9 => 23 | F10 => 24 | F11 => 25
| F12 => 26 | F13 => 27 | F14 => 28 | F15 => 29
end.

Lemma index_inj:
forall r1 r2, index r1 = index r2 -> r1 = r2.