reserve SBT for Permutation of (8-tuples_on BOOLEAN);

theorem INV08:
  for output be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  holds (SubBytes(SBT)).((InvSubBytes(SBT)).output) = output
proof
  let input be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  now let i,j be Nat;
    assume
A3: i in Seg 4 & j in Seg 4;
    then consider outputij be Element of 8-tuples_on BOOLEAN such that
A4: outputij = (((InvSubBytes(SBT)).input).i).j &
    (((SubBytes(SBT)).((InvSubBytes(SBT)).input)).i).j = SBT.(outputij)
    by DefSubBytes;
    consider inputij be Element of 8-tuples_on BOOLEAN such that
A5: inputij = (input.i).j &
    (((InvSubBytes(SBT)).input).i).j = (SBT").(inputij) by DefInvSubBytes,A3;
    thus (((SubBytes(SBT)).((InvSubBytes(SBT)).input)).i).j = (input.i).j
    by A4,A5,INV08A;
  end;
  hence (SubBytes(SBT)).((InvSubBytes(SBT)).input) = input by LM01;
end;
