Definition asZ (x : bool) : Z := if x then 1 else 0.
Definition convertByteBits bits (b : byte) : Prop :=
exists (b0 b1 b2 b3 b4 b5 b6 b7 : bool),
bits = [b0; b1; b2; b3; b4; b5; b6; b7] /\
Byte.unsigned b =  (1 * (asZ b0) + 2 * (asZ b1) + 4 * (asZ b2) + 8 * (asZ b3)
+ 16 * (asZ b4) + 32 * (asZ b5) + 64 * (asZ b6) + 128 * (asZ b7)).

Lemma xor_correspondence :
forall (b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 : bool)
(byte0 byte1 : byte),
convertByteBits [b0; b1; b2; b3; b4; b5; b6; b7] byte0 ->
convertByteBits [b8; b9; b10; b11; b12; b13; b14; b15] byte1 ->
convertByteBits
[xorb b0 b8; xorb b1 b9; xorb b2 b10; xorb b3 b11;
xorb b4 b12; xorb b5 b13; xorb b6 b14; xorb b7 b15]
(Byte.xor byte0 byte1).