Local Open Scope logic.
(* we want to prove forward table lemmas: * for byte i, FT0[i] = (2 * sbox[i], sbox[i], sbox[i], 3 * sbox[i]), where * is GF(256) mult; * FT1[i] is the same but a rotation, etc. * * This means that FT0 corresponds to the first column of the transformation matrix in figure 5.6 * in the official spec; FT1 is the second column, etc. *)
(* Analogous reverse table lemmas with figure 5.10 *)
(* (0x0e, 0x09, 0x0d, 0x0b) *)

Lemma rt1_equiv : forall n : nat,
(n < 256)%nat ->
let b := nth n inv_sbox Int.zero in
nth n RT1 Int.zero = word_to_int (ff_mult b (Int.repr 11), ff_mult b (Int.repr 14),
ff_mult b (Int.repr 9), ff_mult b (Int.repr 13)).