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

theorem INV07:
  for input be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  holds (InvSubBytes(SBT)).((SubBytes(SBT)).input) = input
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 = (((SubBytes(SBT)).input).i).j &
    (((InvSubBytes(SBT)).((SubBytes(SBT)).input)).i).j = (SBT").(outputij)
    by DefInvSubBytes;
    consider inputij be Element of 8-tuples_on BOOLEAN such that
A5: inputij = (input.i).j & (((SubBytes(SBT)).input).i).j = SBT.(inputij)
    by DefSubBytes,A3;
    thus (((InvSubBytes(SBT)).((SubBytes(SBT)).input)).i).j = (input.i).j
    by A4,A5,INV07A;
  end;
  hence (InvSubBytes(SBT)).((SubBytes(SBT)).input) = input by LM01;
end;
