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

theorem INV05:
  for output be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  holds ShiftRows.(InvShiftRows.output) = output
proof
  let output be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  ShiftRows.(InvShiftRows.output) in
  4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  then
P3: ex s be Element of (4-tuples_on(8-tuples_on BOOLEAN))*
  st ShiftRows.(InvShiftRows.output) = s & len s = 4;
  output in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  then
P4: ex s be Element of (4-tuples_on(8-tuples_on BOOLEAN))*
  st output = s & len s = 4;
  now let i be Nat;
    assume 1 <= i & i <= len (ShiftRows.(InvShiftRows.output));
    then
XX2: i in Seg 4 by P3;
    then consider xi be Element of 4-tuples_on (8-tuples_on BOOLEAN)
    such that
XX3: xi = output.i &
    (InvShiftRows.output).i = Op-Shift(xi,i-1) by DefInvShiftRows;
    xi in 4-tuples_on (8-tuples_on BOOLEAN);
    then
YY1: ex s be Element of (8-tuples_on BOOLEAN)* st xi = s & len s = 4;
    consider yi be Element of 4-tuples_on (8-tuples_on BOOLEAN) such that
XX4: yi = (InvShiftRows.output).i &
    (ShiftRows.(InvShiftRows.output)).i = Op-Shift(yi,5-i) by DefShiftRows,XX2;
    thus (ShiftRows.(InvShiftRows.output)).i = Op-Shift(xi,i-1+(5-i))
    by XX3,XX4,DESCIP_1:10,YY1
      .= output.i by DESCIP_1:12,YY1,XX3;
  end;
  hence (ShiftRows.(InvShiftRows.output)) = output by P3,P4,FINSEQ_1:14;
end;
