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. *)

(* Specifications: *)
Lemma ft0_equiv : forall n : nat,
(n < 256)%nat ->
let b := nth n sbox Int.zero in
nth n FT0 Int.zero = word_to_int (ff_mult b (Int.repr 2),  b, b, ff_mult b (Int.repr 3)).
Lemma ft1_equiv : forall n : nat,
(n < 256)%nat ->
let b := nth n sbox Int.zero in
nth n FT1 Int.zero = word_to_int (ff_mult b (Int.repr 3), ff_mult b (Int.repr 2), b, b).
Lemma ft2_equiv : forall n : nat,
(n < 256)%nat ->
let b := nth n sbox Int.zero in
nth n FT2 Int.zero = word_to_int (b, ff_mult b (Int.repr 3), ff_mult b (Int.repr 2), b).
Lemma ft3_equiv : forall n : nat,
(n < 256)%nat ->
let b := nth n sbox Int.zero in
nth n FT3 Int.zero = word_to_int (b, b, ff_mult b (Int.repr 3), ff_mult b (Int.repr 2)).