(* This file contains highly trivial proofs, but they are carefully engineered in such a way that the Qed is fast. This is tricky because we have to avoid that constants such as 12 or 13 are unfolded by the typechecker while unifying two terms. *)
Local Open Scope Z.

Lemma round13eq: forall buf S12 S13,
S13 = mbed_tls_fround S12 buf 52 ->
Int.xor
(Int.xor
(Int.xor
(Int.xor (Int.repr (Znth 52 buf))
(Znth
(Z.land (Int.unsigned (col 0 S12))
(Int.unsigned (Int.repr 255))) FT0))
(Znth
(Z.land (Int.unsigned (Int.shru (col 1 S12) (Int.repr 8)))
(Int.unsigned (Int.repr 255))) FT1))
(Znth
(Z.land (Int.unsigned (Int.shru (col 2 S12) (Int.repr 16)))
(Int.unsigned (Int.repr 255))) FT2))
(Znth
(Z.land (Int.unsigned (Int.shru (col 3 S12) (Int.repr 24)))
(Int.unsigned (Int.repr 255))) FT3) = col 0 S13
/\  Int.xor
(Int.xor
(Int.xor
(Int.xor (Int.repr (Znth 53 buf))
(Znth
(Z.land (Int.unsigned (col 1 S12))
(Int.unsigned (Int.repr 255))) FT0))
(Znth
(Z.land (Int.unsigned (Int.shru (col 2 S12) (Int.repr 8)))
(Int.unsigned (Int.repr 255))) FT1))
(Znth
(Z.land (Int.unsigned (Int.shru (col 3 S12) (Int.repr 16)))
(Int.unsigned (Int.repr 255))) FT2))
(Znth
(Z.land (Int.unsigned (Int.shru (col 0 S12) (Int.repr 24)))
(Int.unsigned (Int.repr 255))) FT3) = col 1 S13
/\  Int.xor
(Int.xor
(Int.xor
(Int.xor (Int.repr (Znth 54 buf))
(Znth
(Z.land (Int.unsigned (col 2 S12))
(Int.unsigned (Int.repr 255))) FT0))
(Znth
(Z.land (Int.unsigned (Int.shru (col 3 S12) (Int.repr 8)))
(Int.unsigned (Int.repr 255))) FT1))
(Znth
(Z.land (Int.unsigned (Int.shru (col 0 S12) (Int.repr 16)))
(Int.unsigned (Int.repr 255))) FT2))
(Znth
(Z.land (Int.unsigned (Int.shru (col 1 S12) (Int.repr 24)))
(Int.unsigned (Int.repr 255))) FT3) = col 2 S13
/\  Int.xor
(Int.xor
(Int.xor
(Int.xor (Int.repr (Znth 55 buf))
(Znth
(Z.land (Int.unsigned (col 3 S12))
(Int.unsigned (Int.repr 255))) FT0))
(Znth
(Z.land (Int.unsigned (Int.shru (col 0 S12) (Int.repr 8)))
(Int.unsigned (Int.repr 255))) FT1))
(Znth
(Z.land (Int.unsigned (Int.shru (col 1 S12) (Int.repr 16)))
(Int.unsigned (Int.repr 255))) FT2))
(Znth
(Z.land (Int.unsigned (Int.shru (col 2 S12) (Int.repr 24)))
(Int.unsigned (Int.repr 255))) FT3) = col 3 S13.