Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  aescip_1.miz   Sprache: Mizar

 

:: Formalization of the Advanced Encryption Standard -- Part {I}
::  by Kenichi Arai and Hiroyuki Okazaki
::
:: Received October 7, 2013
:: Copyright (c) 2013-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

 vocabularies AESCIP_1, DESCIP_1, TARSKI, XBOOLE_0, FINSEQ_1, RELAT_1, FUNCT_1,
      ARYTM_1, FUNCT_2, FINSEQ_2, NAT_1, MARGREL1, ZFMISC_1, SUBSET_1, NUMBERS,
      INT_1, CARD_1, JORDAN3, XXREAL_0, ARYTM_3, ORDINAL4, FINSEQ_5, XCMPLX_0;
 notations   java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 76
      RELSET_1, A4 (S)..)j&
      XXREAL_0, NAT_1, INT_1, NAT_D, FINSEQ_1, FINSEQ_2, MARGREL1, FINSEQ_4,
      FINSEQ_6, DESCIP_1;
 constructors RELSET_1, FINSEQ_4, NAT_D, FINSEQ_6, DESCIP_1, BINOP_1;
 registrations FINSEQ_1, RELSET_1, FINSEQ_2, FUNCT_2, ORDINAL1, MARGREL1,
NT_1 NAT_1,XXREAL_0, XBOOLE_0,FUNCT_1,XREAL_0,java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
,java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 52
 equalities FINSEQ_1, FINSEQ_2;
 theorems TARSKI, consider inputij be 8tuples_on  
      NAT_1, INT_1, FINSEQ_1, CARD_1, BINOP_1,    input.). &(((SBT)input)i).j  (nputij
      RFINSEQ, FINSEQ_5, XBOOLE_0, ORDINAL1, DESCIP_1, MARGREL1, NAT_2,
      WSIERP_1, XCMPLX_1, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 22
 schemes FUNCT_2, thus (((InvSubBytes).(SBT).nput).)j=(i.

begin :: Preliminaries

theorem   input.i.&
  for k,m be Nat st m <> 0 & (k+1) mod m <    (I(BT)i)i)j= SBT" DefInvSubBytesA3
  holds (k+1) mod m = (k mod m)+1
proof
  let k,m be Nat;
  assume
C1: m <> 0 & (k+1) mod m <> 0;
  (k mod m)+1 <= m by NAT_D:1,C1,NAT_1:13;
  then
P1: (k mod m)+1-1 <= m-1 by XREAL_1:9;
P2: (+)mod m = (k 22java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  k mod m < m-1
  
    assume not k mod m < m-1;
    then (k+1) mod m = (java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 4
      .= 0 by INT_1:50;
    hence by ;
  end;
  then (k mod m)+1 < m-1+1 by XREAL_1:
  hence (k+1) mod m = (k mod m)  java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 19
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem4tuples_on(-tuples_on (-BOOLEAN 
  for k,m be Nat st m <> 0 & (k+1) mod m <> 0 ::
proof
  let k,m be Nat;
  
C1: m <> 0 & (k+1) mod m <> 0;
  +1 (+)div m)m+(+1)modm)byINT_159,
    .= ((k       s = 4
  then
P1: ((k+1) div m)*m+(k mod m)-(k mod m) = (k div m )*m+(k mod m)-      defpred P[Nat,set]means
  by INT_1:java.lang.StringIndexOutOfBoundsException: Range [78, 13) out of bounds for length 78
  thus ((k+1ex k be Elementof -(8tuples_onBOOLEAN st xk.
    .= (k div m) by XCMPLX_1:89,C1;zk=Op-5-)
end;

theorem XLMOD02X:
  for k,m be Nat st m  hence ;
proof
  let k,m be Nat;
  assume
C1: m <> 0 & (k+1) mod m = 0;
  then (k mod m)+1 <= m by NAT_D: consider z be FinSequence of4tuples_on (8-tuples_onBOOLEAN)such 
  then
P1: (k mod m)+1-1 <= m-1 by XREAL_1:9;
P2: (k+1 mod m  (( mod m)+) mod  by 22;
  assume not k mod m = m-1;
  then k mod m < m-1 by XXREAL_0:1,P1;
  then k mod m+1 < m-1+1 by XREAL_1:8;
 P224C1
end;

theorem java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
 <>0&(+1) modmjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  holds (k+1) div 4tuples_on4(8-BOOLEAN;
proof
  let k,m be Nat;
sume
C1: m <> 0 & (k+1) mod m = 0;
  then
P3: k mod m = m-1 by XLMOD02X;
P4: k+1 = ((holds (for  e  i in Seg 4 holds
    .= ((k+1) div m)*m by C1;
P5: k = (k div m )*m+(k mod m) by INT_1:59,C1
    .= (k div m)*m+m-1 by P3;
  thus(k+)divm)  ( divm)+1*   by89C1,
    .= ((k div m)    H1..  -Shift,-);
end;

theorem XLMOD03:
  forassume
proof
  let k,m be Nat;
  thus (k-m) mod m =:for be of4tuples_on8tuples_on )
dmbyNAT_D:java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
end;

theorem XLMOD04:
  for k,m be Nat(H2..  -(5i);
proof
  let k,m be Nat;
  assume
AS: m <>  now be of4tuples_on(4tuples_on 8tuples_onBOOLEAN);
      input  4-java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 65
    .= (k div m)+-1 by AS,NAT_D:61
      m-;
end;

definition
  let m,n be Nat, X,D be non empty set;
  let F be Function of X, m-tuples_on(n-tuples_on D);
  let x be Element of X;
  P3:   ex sElement(tuples_on8tuples_on BOOLEAN)* st.input = s &
  coherence
  proof
    F.x in m-tuples_on(n-tuples_on D);
    hence thesis;
  end;
end;

definition
  let m be Nat, X,Y,D be non empty set;
  let F be Function of [:X,Y:], m-tuples_on D;
e Elementof ,y be Element of Y;
  redefine func F.(x,y) -> Element of m-tuples_on D;
  coherence
  proof
    F.(x,y) in m-tuples_on D;
    hence thesis;
  
end;

theorem LM01:
  for m,n be Nat, D be non empty set,
  F1,F2 be Element of m-tuples_on (n-tuples_on D) st for i,j be Nat
  st i inS m  j in Seg n
  holds (F1.i).j = (F2.i).j holds F1 = F2
  proof
    let m,n be Nat, D be non empty set,
    F1,      len  = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    assume
AS: for i,j be Nat st i in Seg         =i  < (input);
    holds (F1.i).j  then
    F1 in m-tuples_on (n-tuples_on D);
    then
P1: exXX2:iin  4 P3
    F2 in m-tuples_on (n-tuples_on D);
    then
P2: ex s be Element of (n-tuples_on D)* st F2 = s & len s = m;
    now let i be Nat;
      assume 1 <= i & i <= len F1;
en
P4:   i in Seg m by P1;
      then i in dom F1 by FINSEQ_1:def 3,P1;
      then F1.i in rng F1 by FUNCT_1:3;
      then F1.i in n-tuples_on D;
      then
P6:   ex s be Element of D* st F1.i = s & len s =         st  =inputi&(.input)i=OpShift(i,5i)byA1
      then reconsider F1i = F1.i as Element of D*;
      i indom  by FINSEQ_1:def 3,P2,P4;
      then F2.i in rng F2 by FUNCT_1:3;
      then F2.i in n-tuples_on D;
      then
R6:   ex s be Element of D* st F2.i = s & len s = n;
           then  =F2i as Element of D*;
      now let j be Nat;
      assume 1 <= j & j <= len F1i;
      then j in Seg n by P6;
      hence F1i.j = F2i.j by AS,P4;
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    hence
    F1.i       ndjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  end;
  hence F1 = F2 by P1,P2,FINSEQ_1:14;
;

theorem LMGSEQ4:
  for D be non empty set, x1,x2,x3,x4 be Element of D
  holds <* x1,x2,x3,x4 *> is Element of (4-tuples_on D)
proofhence H1 = H2 by FUNCT_2:63;
  let D be non empty set, x1,x2,x3,x4 be Element of D;
  reconsider x1234 = <* x1,x2,x3,x4 *> as FinSequence of D;
P1:   end
  x1234 in D* by FINSEQ_1:def 11;
  then x1234 in 4-tuples_on D by P1;
  hence thesis;
end;

theorem LMGSEQ5:
  for D be non empty set,x1,x2,x3,x4,x5 be java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
  holds <* x1,x2,x3,x4,x5  unc InvShiftRows ->
proof
  let D be non empty set, x1,x2,x3,x4,x5 be Element of D;
  reconsider x12345 = <* x1,x2,x3,x4,x5 *> as FinSequence of D;
P1: len  = 5 by FINSEQ_4:78;
  x12345 in D* by FINSEQ_1:def 11;
  then x12345 in 5-tuples_on D by P1;
  hence thesis;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem
   :
  holds <* x1,x2,x3,x4 *>^<* x5,x6,x7,x8 *> is Element of (8-tuples_on D)
proof
  let D be non empty set,x1,x2,x3,x4,x5,x6,x7,x8 be Element of D;
  reconsider x1234 = <* x1,x2,x3,  holds (for i be Nat st i in Seg 4
  by LMGSEQ4;
  reconsider x5678 = <* x5,x6,x7,x8 *> as Element of 4-tuples_on D
  yLMGSEQ4;
  D c= D;
  hence thesis by FINSEQ_2:109;
end;

theorem LMGSEQ10:
  for D be non empty set, x1,x2,x3,x4,
  holds <* x1,x2,x3,x4,x5 *>^<* x6,x7,x8,x9,x10 *> is
  Element of (10-java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 11
proof
  let D be non empty   proof
  reconsider x12345 = <* x1,x2,x3,x4,x5 *> as Element of 5-tuples_on D
  by ;
  reconsider x67890 = <* x6,x7,x8,x9,x10 *> as     lement of4tuples_on(-uples_on 8tuples_on BOOLEAN)]means
  by LMGSEQ5;
  D c= D;
  hence thesis by FINSEQ_2:109;
end;

theorem LMGSEQ16:
  for D be non empty set, x1,x2,x3,x4,x5,x6,x7,x8 be Element of (4-tuples_on D)
  holds <* x1^x5,x2^x6,x3^x7,x4^x8 *> is
  Element of 4-tuples_on (8-tuples_on D)
proof
  D be non
  x1,x2,x3,x4,x5,x6,x7,x8 be Element of (4-tuples_on D);
X1    $.  OpShift(i1);
  then
P1: x1^x5 is Element of 8-tuples_on D by FINSEQ_2:109;
P2:x2^6 is Element of -tuples_on D by X1FINSEQ_2:109;
P3: x3^x7 is Element of 8-tuples_on D by X1,FINSEQ_2:109;
  x4^x8 is Element of 8-tuples_on D by X1,FINSEQ_2:109;
java.lang.StringIndexOutOfBoundsException: Range [49, 35) out of bounds for length 35
end;

theorem
  for D be non empty set, x be Element of 4-tuples_on(4-java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 14
  k be Element of NAT st k in  
  ex x1,x2,x3,x4 be Element of D st x1 = (x.k).1 & x2 = (x.k).2 &
  = (x.).4
proof
  let D be non empty set, x be Element of 4-tuples_on(4-tuples_on D),
  k be Element of NAT;
  assumex in 4tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
AS: k in Seg 4;
  x in 4-tuples_on(4-tuples_on D);
  then ex s be Element of (4-tuples_on D)* st x = s & len s = 4;
  then k in dom x by AS,FINSEQ_1:def 3;
  then x.k in rng x by FUNCT_1:3;
  then x.k in 4-tuples_on (D);
  then
Q13Q01: ex  be Element of 4tuples_on (tuples_on BOOLEAN))* st x = s &
  then reconsider xk = x.k as Element of D*;
  1 in Seg 4;
  then 1 in dom xk by Q13,FINSEQ_1:def 3;
  then xk.1 in rng xk by FUNCT_1:3;
  then reconsider x1 = xk.1 as Element of D;
  2 in Seg 4;
  then 2      len   4java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  then xk.2 in rng xk by FUNCT_1:3;
  then reconsider x2 = xk.2 as Element of D;
 3in  4java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  then 3 in dom xk by Q13,FINSEQ_1:def 3;
  then xk.3 in rng xk by FUNCT_1:3;
  then reconsider x3 = xk.3 as Element of D;
  4 in 4java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  then 4 in dom xk by Q13,FINSEQ_1:def 3;
  then xk.4 in rng xk by FUNCT_1:3;
  thenreconsider x4 = xk.4  of ;
  take x1,x2,x3,x4;
  thus thesis;
end;Q1:   k   in4

theorem INV00:
  for X,Y be non empty set, f be Function of X,Y, g be Function of Y,       zkbeingElementof((-java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 75
  st (for x be Element of X holds g.(f.x) = x) &
  (for y be Element of Y holds f assumek in Seg 4;
  holds f is one-to-one & f is onto & g is one-to-one & g is onto &
  g = f" & f = g"
proof
  let X,Y be non empty set, f be Function of X,Y, g be Function of Y,X;
  assume
A1: for x be Element of X holds g.(f.x) = x;
  assume
A2: for y be        zk =OpShift(xk1,k-1)
  now let x be Element of X;
    thus (g*f).x = g.(f.x) by FUNCT_2:15
      .= x by A1;
  end;
  then
P2: g*f = id X by FUNCT_2:124;
  now let y      end;
    thus (f*g).y = f.(g.y) by FUNCT_2:15
      .= y by A2;
  end;
  then
P4: f*g = id Y by FUNCT_2:124;
  thus
P5: f is one-to-one & f is onto by P2,P4,FUNCT_2      consider z  FinSequenceof4-(-tuples_onBOOLEAN)suchthat
   thus
P6: g is one-to-one & g is onto by P2,P4,FUNCT_2:23;
  rng f = Y by P5,FUNCT_2:def 3;
  hence g = f" by4tuples_on4tuples_on 8-tuples_onBOOLEAN);
  rng assume
  hence f = g" by FUNCT_2:30,P4,FUNCT_2:23;
end;

begin :: State array

definition
  func AES-Statearray -> Function of 128-tuples_on BOOLEAN,
  4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
  :DefStatearray:
  for input be Element of 128-tuples_on BOOLEAN
  for i,j be Nat st i in Seg 4 & j in Seg 4
  holds(it.java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 59
  1+(i-'1)*8+(j-'1)*32+7);
  existence
  proof
    P0[lement of -BOOLEAN,set means
    ex z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    st $2    (H1..i  -Shift(xi,i-1));
    holds (z.i).j = mid ($1,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7);
A1: for x being Element of 128-tuples_on BOOLEAN
    ex z be A2: for input beElement  4-uples_on(- (8tuples_on BOOLEAN)java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
    st P0[x,z]
    proof
      let x be Element of 128-tuples_on BOOLEAN;
      x in 128-tuples_on BOOLEAN;
      then
A01:  ex s be Element of (BOOLEAN)* st x = s & len s = 128;
      defpred P[Nat,set] means
      ex zi be Element of (4-tuples_on (8-tuples_on BOOLEAN))
      st $2 = zi & for j be Nat st j in Seg 4
      holds zi.j = mid (x,1+($1-'1)*8+(j-'1)*32,1+($1-'1)*8+(j-'1)*32+7);
Q1:   for k be Nat st k in Seg 4
      ex x being Element of (4-tuples_on (8-tuples_on BOOLEAN)) st P[k,x]
      proof
        let k be Nat;
        assume k in Seg 4;
        then
Q110:   1 <= k & k <= 4 by FINSEQ_1:1;
        then 1-1 <= k-1 by XREAL_1:9;
        then k-'1 = k-1 by XREAL_0:def 2;
        then k-'1 <= 4-1 by Q110,XREAL_1:9;
        then
Q112:   (k-'1)*8 <= 3*8 by XREAL_1:64;
        defpred Pi[Nat,set] means
        $2 = mid (x,1+(k-'1)*8+($1-'1)*32,1+(k-'1)*8+($1-'1)*32+7);
Q12:    for j be Nat st j in Seg 4
        ex xi being Element of (8-tuples_on BOOLEAN) st Pi[j,xi]
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
          let j be Nat;
          assume j in Seg 4;
          then
Q130:     1 <=j & j = 4byFINSEQ_1;
          then 1-1 <= j-1 by XREAL_1:9;
          then j-'1 = j-1 by java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 10
         -< - Q130,:java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
          then
Q133:         ;
          (k-'1)*8+(j-'1)*32 <= 24+96
          then
Q134:     1+((k-'1)*8+(j-'1)*32) <= 1+120 by XREAL_1:7;
Q136:     (1+(k-'1)*8+(j-'1)*32)+7 <java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
          1+0 <= 1+((k-'1)*8+(j-'1)*32) by XREAL_1:7;
          then
Q14:      1 <= 1+(k-'1)*8+(j-'1)*32 & 1+(k-'1)*8+(j-'1)*32 <= len x
          by Q134,XXREAL_0:2,A01;
Q150:     1+0 <= 1+(k-'1)*8+(j-'1)*32+7 by XREAL_1:7;
          reconsider mmd = mid (x,1+(k-'1)*8+(j-'1)*32,
          1+(k-'1)*8+(j-'1)*32+7) as Element of (BOOLEAN)* by FINSEQ_1:def 11;
          1+(k-'1)*8+(j-'1)*32+0 <= 1+(k-'1)*8+(j-'1)*32+7 by XREAL_1:6;
          then len mid (x,1+(k-'1)*8+(j-'1)*32,1+(k-'1)*8+(j-'1)*32+7) =
          (1+(k-'1)*8+(j-'1)*32+7)-'(1+(k-'1)*8+(j-'1)*32)+1
          by FINSEQ_6:118,Q14,Q136,A01,Q150
            .= 7+1 by NAT_D:34
            .= 8;
          then mmd in (8-tuples_on BOOLEAN);
          then reconsider xi = mid (x,1+(k-'1)*8+(j-'1)*32,
          1+(k-'1)*8+(j-'1)*32+7) as Element of (8-tuples_on BOOLEAN);
          xi = mid (x,1+(k-'1)*8+(j-'1)*32,1+(k-'1)*8+(j-'1)*32+7);
          hence thesis;
        end;
        consider zi be        then
Q13:    dom zi = Seg 4 & for i be Nat st i in Seg 4
        holds Pi[i,zi.i] from FINSEQ_1:sch 5(Q12);
Q14:    len zi = 4 by Q13,FINSEQ_1:def 3;
        reconsider zi as Element of (8-tuples_on BOOLEAN)* by FINSEQ_1:def 11;
        zi in 4-tuples_on (8-tuples_on BOOLEAN) by Q14;
        then reconsider zi as Element of 4-tuples_on (8-tuples_on BOOLEAN);
        for j be Nat st j in Seg 4
        holds zi.j = mid (x,1+(k-'1)*8+(j-'1)*32,1+(k-'1)*8+(j-'1)*32+7)
        by Q13;
        hence thesis;
      end;
      consider z be FinSequence of 4-tuples_on (8-tuples_on BOOLEAN) such that
Q2:   dom z = Seg 4 &
      for  be  i in Seg 4 holds P[i,z.i] from FINSEQ_1:sch 5Q1;
Q3:   len z = 4 by Q2,FINSEQ_1:def 3;
      reconsider z as Element tuples_on (8-tuples_on BOOLEAN) st xi = input.i &
 FINSEQ_1:
      z in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))by Q3;
      thenreconsider z as
      Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
      for i,j be Nat st i in Seg 4 & j in Seg 4
      holds (z.i).j = mid (x,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)
      proof
        let i,j be Nat;
        assume
P11:    i in Seg 4&j in 4;
        then consider zi be Element of (4-tuples_on (8-tuples_on BOOLEAN))
        such that
P12:    z.i = zi & for j be Nat st j in Seg 4
        holds zi.j = mid (x,1    endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        thus (z.i).j = mid (x,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)
        by P11
      end;
henceex java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 77
      st P0[x,z];
    end;
    consider I be Function of 128- input be Element of 4-tuples_on(4-tuples_on8-)
    4-tuples_onInvShiftRows(java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 46
A2: for
    holds P0[x,I.x] from FUNCT_2:sch 3(A1);
    put be Element of 128-tuples_on BOOLEAN;
      ex z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
      st I.input = z & for i,j be-tuples_on(-tuples_on -tuples_onB
      holds (z.i).j = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 6
       java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
      hence for i,j be Nat st i in Seg 4 & st.(hiftRows.)= s& s 4;
      holds ((I.input).i).j = mid (input,1+(i-'1)*8+(j-'1)*32,
      1+(i-'1)*8+(j-'1)*32+7);
    end;
    hence thesis;
  end;
  uniqueness
  proofP4: java.lang.StringIndexOutOfBoundsException: Range [19, 11) out of bounds for length 58
    let H1,H2 be Function of 128-tuples_on BOOLEAN,
    4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    assume
A1: for input be Element of 128-tuples_on BOOLEAN
    for i,j be Nat st i in Seg 4 & j in Seg 4
    holds ((H1.input).i).j = mid (input,1+(i-'1)*8+(j-'1)*32,
java.lang.StringIndexOutOfBoundsException: Range [18, 4) out of bounds for length 28
    assume
A2: for input be Element of 128-tuples_on BOOLEAN
    for i,j be Nat st i in Seg 4 & j in Seg 4
    holds ( then
    1+(i-'1)*8+(j-'1)*32+7);
    now let input be Element of 128-tuples_on BOOLEAN;
      (H1    then consider  Element4 (8 that
      then
P3:   ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
      st (H1.input) = s & len s = 4;
      (H2.input) 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 (H2.input) = s & len s = 4;
      now let i be Nat;
        assume1 <i & < len(input;
        then
         ;
        then i in dom(H1.input) by FINSEQ_1:def 3,P3;
         in rng (H1.) by FUNCT_1:3
        then (H1.input).i in 4-tuples_on (8-tuples_on BOOLEAN);
    then
P8:     ex s be Element of (8-tuples_on BOOLEAN)*
        st (H1.input).i = s & len s = 4;
        reconsider H1i = (H1.input).i as
        Element of (8-tuples_on BOOLEAN)* by P8;
        i in dom(H2.input) by FINSEQ_1:def 3,P4,     ,X4,DESCIP_1:10,YY1
        then (H2.input).i in rng (H2.input) by FUNCT_1:3;
        then (H2.input).i in 4-tuples_on (8-tuples_on BOOLEAN);
        then
P11:    ex s be Element of (8-tuples_on BOOLEAN)*
        st (H2.input).i =   end;
        reconsider H2i = (H2.input).i as
  (InvShiftRows.ShiftRows.input)) = input by P3,P4,FINSEQ_1:14;
        now let j be Nat;
          assume 1 <=j & j ;
          then
P14:      j in Seg 4 by P8;
          then ((H1.input).i).j = mid (input,
          1+(i-'1)*8+(j-'1)*32+7) by A1,P6;
          hence .j =H2i.jbyA2,P6,P14;
        end;
        hence (H1.input).i = (H2.input).i by P8,P11,FINSEQ_1:def 18;
      ;
      hence H1.input = H2.input by P3,P4,FINSEQ_1:def 18;
    end;
     = H2 by:;
  end;
end;

theorem LMStat0:
  for k be Nat st 1java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32XX2in4by ;
proof
  let k be Nat;
  assume
A1: 1 <= k & k <= 128;
A3: k = 32*(k div 32)+(k mod 32) by NAT_D:2;
  reconsider m = k div 32 as Nat;
  reconsider n = k mod 32 as Nat;
  XX3:xi= &
  then
M1: m <= 4;
  per cases;
  suppose
A4: n = 0;
A5: 1 <= m
    proof
      assume not 1 <= m;
      then =0by NAT_1:14;
      hence contradiction by A1,A3,A4;
    end;
    set j = m;
A8: j in Seg 4 by M1,A5;
    set i = 4;
A10: i in Seg 4;
A11: j-'1 = j-1 by XREAL_1:233,A5;
A13: k = 32*(k     consider yi be  4(- uchjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
      .= 32*(j-'1)+8*((i-1)+1) by A4,A11
      . (j'+8*(i-1+1) XREAL_1:
      .= 1+(i-'1)*8+(j-'1)*32+7;
    1+(i-'1)*8+(j-'1)*32+0 <= 1+(i-'1)*8+(j-'1)*32+7 by XREAL_1:7;
    hence ex, beNat   Seg 4 & j in Seg 4 &
    1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7 by A8,A10,A13;
  end;    by XX3,,DESCIP_1:10,YY1
  suppose
A14: n       .= .i by DESCIP_1:12,YY1,XX3;
    then
XX0: 1 <= n by NAT_1:14;
XX1: n <= 32 by NAT_D:1;
    <>4
    proof
      assume
U1:   m = 4;
U2:   k = 32*4+n by NAT_D:2end
        .= 128+n;
      128+1 <= java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      hence contradiction by U2,XXREAL_0:2,A1;
    end;
    then m < 4 by XXREAL_0:1,M1;
    then
A15: m+1 <= 4 by NAT_1:13;
A16: 1 <= m+1 by   InvShiftRows is one-to-one & InvShiftRows is onto &
    set j = m+1;
A18: j in Seg 4 by A15,A16;
A19: j-1 = j-1  XREAL_1:233,NAT_1:11
      .=m;
A20: k = 32*(j-'1)+n by NAT_D:2,A19;
A22: n = 8*(n div 8)+(n mod 8) by NAT_D:2;
    reconsider s = n div 8 as Nat;
    reconsider t = n mod 8 as Nat;
    n div 8 <= (8*4) div 8 by XX1,NAT_2:24;
    then
M2: n divbegin :: AddRoundKey
    now per cases;
    suppose
A23:  t = 0;
A24:  1 <= s
      proof
        assume not 1 <= s;
        then n = 8*0+0 by NAT_1:14,A22,A23;
        hence contradiction by A14;
      end;
      set i = s;
A28:  i in Seg 4 by M2,A24;
A29:  i-'1 = i-1 by XREAL_1:233,A24;
A30:  n = 8* Function of [:4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
        .= 8*(i-'1)+8*1 by A29;
      1+(i-'1)*8+(j-')32+0<= 1(i'1)*+j'*+  XREAL_1:7java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
      henceexj beNat st i in 4& j inSeg 4&
      1+(i-'1)*8+(j-'1)*32 <= k & k <:java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
      by fortext, be Element of -java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 76
    end;
    suppose
      t <> 0;
      then
XX0  1<= t by 14
XXX1: t <= 8 by  st textij = (text.i).j & keyij = (key.i).j &
      s <> 4

        assume
U1:     s = 4;
U2:     n = 8*4+t by NAT_D:2,U1
          .= 32+t;
        32+1 <= 32+t by XX0,XREAL_1:7;
        hence contradiction by U2,XXREAL_0:2,XX1;
      end;
      then s < 4 by XXREAL_0:1,M2;
      then
B15:  s+1 <= 4 by NAT_1:13;
B16:  1 <= s+1 by NAT_1:11;
      set i = s+1;
B18:  i in Seg 4 by B15,B16;
B19:  i-'1 = i-1 by XREAL_1:233,NAT_1:11
        .=s;
B20:  n = 8*(i-'1)+t by NAT_D:2,B19;
B220: 32*(j-'1)+8*(i-'1)+1 <= 32*(j-'1)+8*(i-'1)+t by XX0,XREAL_1:7;
      32*(j-'1)+8*(i-'1)+t <= 32*(j-'1)+8*(i-'1)+8 by XXX1,  proof
      then <=18(-')32(j-1+ byA20,;
      hence ex i,j be Nat st i in Seg 4 & j in Seg 4 &
      1+(i-'1)    Element  -4tuples_on(8tuples_on BOOLEAN),
      by B220,A20,B20,B18,A18;
    ;
  end;
  hence ex i,j be Nat st i in Seg 4 & j in Seg 4 & 1+(i-'1)*8+(j-'1)*32 <= k &
  k<= 1+(i-'1)*8+(j-'1)*32+7;
end;
end;

theorem LMStat2A:
  for i,j,i0,j0 be Nat st i in Seg 4 & j in Seg 4 & i0 in Seg 4 &
  j0 in Seg 4 & not (i = i0 & j = j0)
  holds {k where k is Nat : 1+(i-'1)*8+(j-'1)*32 <= k &
  k <= 8+(i-'1)*8+(j-'1)*32} /\ {k where k is Nat :
  1+(i0-'1)*8+(j0-'1)*32 <= k & k <= 8+(i0-'1)*8+(j0-'1)*32} = {}
proof
       ex,beElement of-tuples_on BOOLEAN
  assume
AS: i in Seg 4 & j in Seg       $.).j  $2i.  $.)j  -XORtextij;
  j0 in Seg 4 & not (i = i0 & j = j0);
  set A = {k where k is Nat : 1+(i-'1)*8+(j-'1)*32 <= k &
  k <= 8+(i-'1)*8+(j-'1)*32};
  set B = {k where k is Nat : 1+(i0-'1)*8+(j0-'1)*32 <= k &
  k <= 8+(i0-'1)*8+(j0-'1)*32};
A1: 1 <= j & j <= 4 by AS,FINSEQ_1:1;
A2: 1 <= i & i <= 4 by AS,FINSEQ_1:1;
B1: 1 <= j0 & j0 <= 4 by AS,FINSEQ_1:1;
B2: 1 <= i0 & i0 <= 4 by AS,FINSEQ_1:1;
P1: (j-'1) = j-1 by XREAL_1:233,A1;
P2: (i-'1) = i-1 by XREAL_1:233,A2;
P3: (j0-'1) = j0-1 by XREAL_1:233,B1;
P4: (i0-'1) = i0-1 by XREAL_1:233,B2;
  i-1 <= 4-1 by A2,XREAL_1:9;
  then
R2: i-'1 <= 3 by XREAL_1:233,A2;
  i0-java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
  then
R4: i0-'1 <= 3 by XREAL_1:233,B2;
  per cases;
  suppose
A2: j <> j0;
    now per cases by A2,XXREAL_0:1;
    suppose
      j < j0;
      then (j-'1) < (j0-'1) by XREAL_1:14,P1,P3;
      then (j-'1)+1 <= (j0-'1) by NAT_1:13;
      then
A12:  ((j-'1)+1)*32 <= (j0-'1)*32 by XREAL_1:64;
      (i-'1)*8 <= 3*8 by R2,XREAL_1:64;
      then 8+(i-'1)*8 <= 8+24 by XREAL_1:6;
      then 8+(i-'1)*8+(j-'1)*32 <= 32+(j-'1)*32 by XREAL_1:6;
      then
A13:  8+(i-'1)*8+(j-'1)*32 <= (j0-'1)*32 by A12,XXREAL_0:2;
      0+(j0-'1)*32 <= (i0-'1)*8+(j0-'1)*32 by XREAL_1:6;
      then (j0-'1)*32+0 < (i0-'1)*8+(j0-'1)*32+1 by XREAL_1:8;
      then
A14:  8+(i-'1)*8+(j-'1)*32 < 1+(i0-'1)*8+(j0-'1)*32 by A13,XXREAL_0:2;
      thus A /\ B = {}
      proof
        assume A /\ B <> {};
        then consider x be object such that
A150:   x in A /\ B by XBOOLE_0:def 1;
A15:    x in A & x in B by XBOOLE_0:def 4,A150;
        consider k1 be Nat such that
A16:    x = k1 & 1+(i-'1)*8+(j-'1)*32 <= k1 & k1 <= 8+(i-'1)*8+(j-'1)*32
        by A15;
        consider k2 be Nat    being   4-(- (8-tuples_on))
A17:    x = k2 & 1+(i0-'1)*8+(j0-'1)*32 <= k2 & k2 <= 8+(i0-'1)*8+(j0-'1)*32
        by A15    ex bebe  of-tuples_on(-tuples_on 8-tuples_on BOOLEAN)
        reconsider x as Nat by A16;
            st P0[text,
      end;
    end;
    suppose
      j0 < j;
:: Copyright (c::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
      :: licenses, or see http://www.gnu.:: http:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      then
A12INT_1,,CARD_1        java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 61
      (i0-'1)*8 <= 3*8 by R4,XREAL_1:64;
 8(-1)8< +24byXREAL_1:6;
       <= +j0')32by java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 64
      then
A13:  8+(i0-'1)*8+(j0-'1)*32 <= (j-'1)*32 by A12,XXREAL_0XXREAL_0,java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 76
      0(-      key4tuples_on(-(BOOLEANjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
      j1*32      then
      INT_1,NAT_1,XXREAL_0, XBOOLE_0Q02:    java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 61
A14:  8+(i0 requirements BOOLE, SUBSET, NUMERALS, ARITHM, REAL;
       A/\  }
      proof
       assume      efpredPNat,et] means
        then consider x be object      ex  beElement of (4-tuples_on (8-tuples_on BOOLEAN))
150:   x inA/\ B by XBOOLE_0: 1;       $2 =zk&  k  Nat m <  &+1mod m< 0
A15java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        onsider k1beNatsuchthat
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 72
        ysttextij = .1)j& keyij =(key.$). &
        consider k2 be Nat such that
A17:    x = k2 & 1+(i0-'1)*8+(j0-'1)*32 <= k2 &   then
              zk.j =Op-XOR(textij,eyij;
        reconsider x as Nat by A16;
           by A16A14,XREAL_02A17;
      end;
     proof
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 6
   /\ B ={}
  end;
  suppose
A2:
    hence(+)mod  =(mod )+1by 24P2
      suppose i < i0;
      (-1  ('1)by REAL_1:,,        
      then (i-'1)+1 <= (i0-'1) byC1:m< 0&k1 modm >0;
      then (-')1*8 <= (i0-1*8byXREAL_1:64java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
      hen
A13:  (i-'1)*8+8+(j-'1)*32 <= (i0-'1)*8        INT_1591
      i0-'1*8(j0-'1)*32        then text.k in 4-tuples_on (8-tuples_on BOOLEAN);
      then
A14:8+i'        
      thus A /\ B = {}
      proof
        assume A /\ B <> {};
        then consider x be object such that
A150:   x in A /\ B by XBOOLE_0:def 1;
A15:    x in A& x in :def4A150;
        consider k1 be Nat such that
A16:    x = k1 & 1+(i-'1)*8+(j-'1then  textk=text. as Elementof(- BOOLEAN)*;
        by A15;
        consider k2 be Nat such that
A17:    x = k2 & 1+(i0-'1)*8+(j0-'1)*32 <= k2 & k2 <= 8+(i0-'1)*8+(j0-'1)*32
        by A15;
reconsider  A16
        thus contradiction by A16,A17,A14,XXREAL_0:2;
      end;
    end;
    suppose
      i0 < i;
:exsbe  8 8- BOOLEAN
      then (i0-'1)+1 <= (i-'1) by NAT_1:13;
       then((i0-1+1)8< i')*8byXREAL_1:64;
      then
  (')88j-1* =ijava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 33
j')*1;
      then
A14:  8+(i0-'1)*8+(j0-'1)*32 < 1+(i-'1)*8+(j-'1)*32 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 50
      thus A then kmod m1  -+ 8: j Natstjin Seg   exxi Element  (tuples_onBOOLEAN)
      proof
        assume A /\ B <> {};
        thenforkmbe st<>0
A150:  xin /  y XBOOLE_0:        roof
A15      A &x   by let  java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
               k1beNat java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 =k1  +i'1*+:    
 byA15
           
A17:    x = k2 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        by A15;
        .           j in rng(extk by FUNCT_13;
        thus contradiction by A16,A14,XXREAL_0:2(, =OpXORtextkj,eykj);
      end;
    end;
  end;
  hence A /          hence thesis;
end;
end;

theorem LMStat2:
  for ki,,i0,j0 st 1 =k < 128 &  in 4   in 4 &
  i0 in Seg 4 & j0 in Seg 4 & 1+(i-'1)*8+(j-'1)*32 <= k &
  k< 1+(i'1*8(j-'1)327 &1+(0'1)8(j0-1)32 <=k &
  k <= 1+(i0-'1)*8+(j0-'1)*32+7 holds i = i0 & j = j0
proof
  letk,,,i0,j0beNat
  assume
AS . ( div-         java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 75
  1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7 &
)+j-1*+;
  assume not (i = i0 & j = j0);
  java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
A2: {n where n is Nat : 1+(i-'1)*8+(j-'1Q2   dom z = Seg 4&fori beNat st i in Seg 4
  / {n   isNat : 1+i0'*+j0
  n <= 8+(i0-'1)*8+(j0-'1)*32} = {} by LMStat2A,AS;
A3:k in { where n is Nat : 1+(i-'1)*8+(j-'1)*32 <= n &
  n <= 8+(i-'1)*8+(j-'1)*32} by AS;
  k in{ where n is Nat : 1+(0-1)*+(j0-)32<=n java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  n <= 8+(i0-'1)*      by FINSEQ_1:def 1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  hence contradiction by A3,XBOOLE_0       in 4-tuples_on(4-uples_on (8-tuples_on BOOLEAN)) by Q3;
end;

theorem LMStat1:
  AES-Statearray is one-to-one
proof
  for x1,x2 be object st x1 in 128-tuples_on BOOLEAN &
  x2 in 128-tuples_on BOOLEAN &
  (AES-Statearray).x1 = (AES-Statearray).x2 holds x1 = x2
  proof
    let x1,2 be object;
    assume
A1: x1 in 128-tuples_on BOOLEAN & x2 in 128-tuples_on BOOLEAN &
    (AES-Statearray).x1 = (AES-Statearray).x2;
    then reconsider xx1 = x1,xx2 = x2 as Element of 128-tuples_on BOOLEAN;
P1: ex s be Element of (BOOLEAN)* st xx1 = s & len s = 128 by A1;
P2: ex s be Element of (BOOLEAN)* st xx2 = s & len s = 128 by A1;
    now let k be Nat;
      assume
P5:   1 <= k & k <= len xx1;
      consider i,j be  
letmn ,D be          8tuples_onst=
        +(')*+j-'1)*+  LMStat0,5P1
       (xx1,+(i'1*j'*21(-1*+j-1)327 java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      Element of (BOOLEAN)* by FINSEQ_1:def 11;
      then reconsider A1ij = (((AES java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
      FinSequence of (c
      mid e;
     java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 47
             then ex zi Element of(4-tuples_on8tuples_onBOOLEAN)java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
AN DefStatearray,4java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
< java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 73
      by A4,XREAL_1:java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 10
')*+j')32as Element ofNAT byINT_1:3;
F41:  k-((i-'1)*8+(j-'1)*32) <=    : ex s java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 62
       ;
F1:      assume < &        st textij =(..j &eyij=(key.i). java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
F2:   1+(i-'1)*8+(j-'1)*32 <= 1+ java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 39
 i &i<   ,FINSEQ_1:;
      then 1-1 <= i-1 by XREAL_1:9;
      R6:   ex consider be  of :4tuples_on(4java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 79
      then i-'1 <= 4-1 by Q110,XREAL_1:9;
      then
:()8< 38 by XREAL_1:;
Q130: 1 <= j & j <= 4 by A4,FINSEQ_1:1;
      hen - < j-1 by XREAL_1:9;
      then j-'1 = j-1 by XREAL_0:def 2;
      then j-'1 <= 4-1 by Q130,    holds P0[x,y,I.(x,y)] from BINOP_1 3(1);
      then
Q133: (j-'1)*32 <= 3*32 by XREAL_1 take I;
      )*8+(j-1* < 24+96 by  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 22
      then 1+((i-'1)*  end;
      then
 1+i1*+(-1*32+ =121+7by:6java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
F5:   n    end;
A6:   k = n-1+(1+(i-'1)*8+(j-'1)*32);
      thus xx1  hence F1=F2 P1P2FINSEQ_1:14;
      by F1,F2,Q135 holds< ,x2,3x4* Element (-tuples_on D)
,,1
         mid(x21(i'1*+j'),+('1)*8(j')32+7).n
        by  x1234 in *by FINSEQ_1:def 11
        .= xx2.java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
    end;
byP1P2:;
end;
hencethesis :19;
end;

theorem theorem LMStat3)ij XORk)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  AES-Statearray is onto
proof
  forD   empty ,x1x2x3x4x,x7,x8 beElement of D
  ex x be object st x in 128-tuples_on BOOLEAN & y = AES-Statearray.x
  
let  ;
     intuples_on4-uples_on (8-tuples_on BOOLEAN));
    then
_(-BOOLEAN)*
    y=s    = ;
    then reconsider z  ,be
    
i,jnbe, (8-tuples_on BOOLEAN)
    st i in Seg 4 & j in Seg 4 & n in Seg 8 & 1+(i-'1)*8+(j-'1)*32 <= $1 &
    $1 <= 1+(i-'1)*8+(j-'1)*32+7 & n = $1-((i-'1)*8+(j-'1)*32) & zij = (z.i).j
    & $2 = zij.n;
:  k be  st k in Seg 128 ex z being Element  BOOLEAN         st =(ext.i)&keyij =(..&
    proof
      let k be Nat;let  set x1,2x3x4x5,x7,x8,x9,x10java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
inSeg 128;
      1 =k& k <= 128 by FINSEQ_1:1;
      then consider i,j be Nat such that
   4  in  &1(-1)*8+j-')32<-java.lang.StringIndexOutOfBoundsException: Range [68, 60) out of bounds for length 68
      k <= 1+(i-'1)*8+(j-'1)327by;
      i in dom z by FINSEQ_1:def 3proof
      then z.i in rng z by FUNCT_1:3 be of ;
      let  ;
      then
B10:  ex s be Element of (8-tuples_on BOOLEAN)* st z.i = s & len s = 4;
i =ziasof:inSeg;
      j in dom zi by B10,FINSEQ_1:def 3,A4;
      then (zi).j in rng zi by FUNCT_1:3;
      thenjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 44
-)+'*-(-1*+j1*)< (-')8j')*)
by A4java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 13
      then.xk)   xk2   xk UNCT_1;
      k-((i-'1)*8+(j-'1)*32) <=      hence;
      by A4,XREAL_1:9;
      then
G4: eg8 A50java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
     java.lang.StringIndexOutOfBoundsException: Range [35, 16) out of bounds for length 49
      z;
thusthesisbyA,G4;
    end;
    consider be  ofBOOLEAN
 
  Nat iSeg 128
    holds [i,x.] from FINSEQ_1:Q12)
:  p 4(-java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 48
       Elementof(    hen reconsider p as Element of 4-tuples_on (8-tuples_on BOOLEAN);
    x in 128-tuples_on BOOLEAN by Q14;      ake  ;
      for  be  of  f.g) = y)
  j st   Seg 4 &jin  4
ds (.i.  mid x1+(i-java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
f
      let i,j be Nat;
      assume
P21:  ie
     theniindom zbyFINSEQ_1: 3,10;
      then z.i in rng z by FUNCT_1:3;
      then z.iin4tuples_on(8tuples_on BOOLEAN);
      hen
P8:   ex s be Element of (8-tuples_on BOOLEAN)* st z.i = s & len s = 4;
      reconsider zi = z.i as Element of       ex  be Element of 8-tuples_on BOOLEAN st xi = x.i & p.i = SBT.(xi)
      j in dom zi by P8,FINSEQ_1:def 3,P21;
      then zi.j in rng zi by FUNCT_1:3;
      thenjava.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 41
      then
P11:  ex s be Element of (BOOLEAN)* st zi.j = s & len s = 8;
      reconsider zij = zi.j as Element of (BOOLEAN)* by P11;
Q110: 1 <= i & i   end;
      then 1-1 <= i-1 by XREAL_1:9;
      then i-'1 = i-1 by XREAL_0:def 2;
      then i-'1 <= 4-1 by Q110,XREAL_1:9;
      then
Q112: (i-'1)*8 <= 3*8 by XREAL_1:64;
Q130: 1 <= j & j <= 4 by P21,FINSEQ_1:1;
      then 1-1 <= j-1 by XREAL_1:9;
      then j-'1 = j-1 by XREAL_0:def 2;
      then j-'1<=4- by Q130,XREAL_1:9;
      then
Q133: (j-'1)*A: for ibe  hen
      (i-')*+(j-') <= 24+96 by Q133,Q112,XREAL_1:7;
      then
-'1 <1 by :;
      then
G1:   1+((i-'    H2  4tuples_on(-tuples_on BOOLEAN)
G0:   1 <= 1+((i-'1)*8+(j-'    
G2:   : ex  Element f (- ) st  = s    =4;
G3:   1+((i-'1)*8+(j-'1    let java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 21
Q135: 1+(i-'1)*8+(j-'1)*32+7 <= 121+7 by XREAL_1:6,Q134;
      then
F3:   1+(i-'1)*8+(j-'1)*32+7 <= len x by Q13,FINSEQ_1:def 3;
P13:  len (mid (x,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)) =
      (1+(i-'1)*8+(j-'1)*32+7)-'(1+(i-'1)*8+(j-'1)*32)+1
      by G1,G2,G3,G0,F3,FINSEQ_6:118
        .= (1+(i-'1)*8+(j-'1)*32+7)-(1+(i-'1)*8+(j-'1)*32)+1 by G3,XREAL_1:233
        .= 8;
      now let n be Nat;
        assume
F40:    1 <= n & n <= len zij;
F1:     1 <= 1+((i-'1)*8+(j-'1)*32) by NAT_1:11;
F2:     1+(i-'1)*8+(j-'1)*32 <= 1+(i-'1)*8+(j-'1)*32+7 by NAT_1:11;
F5:     n <= (1+(i-'1)*8+(j-'1)*32+7)-(1+(i-'1)*8+(j-'1)*32)+1 by F40,P11;
        reconsider k = n+((i-'1)*8+(j-'1)*32) as Nat;
A6:     k = n-1+(1+(i-'1)*8+(j-'1)*32);
        n <= n+((i-'1)*8+(j-'1)*32) by NAT_1:11;
        then
H1:     1 <= k by F40,XXREAL_0:2;
        reconsider k = n+((i-'1)*8+(j-'1)*32) as Nat;
H3:     k <= 8+((i-'1)*8+(j-'1)*32) by F40,P11,XREAL_1:7;
        then
H2:     k <= 128 by Q135,XXREAL_0:2;
        then k in Seg 128 by H1;
        then consider i0,j0,n0 be Nat,
        beElement  (-tuples_on  suchthat
AA1:    i0 in Seg 4 &   s,   ofm- (n-tuples_onBOOLEAN;
         = 1+i0')*8+(j0-1)*32+ & n0=k-(0'1)*')32)&
        zi0j0 = (z.i0).j0 & x.k = zi0j0.n0 by Q13;
        1+((i-'1)*8+(j-'1)*32) <= n+((i-'1)*8+(j-'1)*32) by F40,XREAL_1:7;
        then 1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7 by H3;
        then i = i0 & j = j0 by LMStat2,AA1,P21,H1,H2;
        hence zij.n = (mid (x,1+(i-'1)*8+(j-'1)*32, PNs]
by,,F2F40F5:java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
      end;
      hence thesis by FINSEQ_1:def 18,P11,P13;
    end;
(-.)in4-tuples_ontuples_on(8-tuples_onBOOLEAN);
    then
P3: ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
    st (AES-Statearray.x) = s & AS   k in Seg m;
    now let i be Nat;
            s in m-tuples_on (n-tuples_on BOOLEAN);
      then
: Seg P3
      then i in dom(AES-Statearray.x) by then java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 43
      then (AES-Statearray.x).i in rng (AES-Statearray.x) by FUNCT_1:3;
      then (AES-Statearray.x).i in 4-tuples_on (8-tuples_on BOOLEAN);
      then
P8:   ex s be Element of (8-tuples_on BOOLEAN)*
      st (AES-Statearray.x).i = s & len s = 4;
      reconsider H1i = (AES-Statearray.x).i as
      Element of (8-tuples_on BOOLEAN)* by P8;
      i in dom z by FINSEQ_1:def 3,B10,P6;
      then z.i in .=Op-XOR(si,i)byP3;
      then z.i in 4-tuples_on (8-tuples_on BOOLEAN);

P11:  ex s be Element of (8-tuples_on BOOLEAN)*
      st z.i = s & lenA1:   Element of  mholdsH1. = Op= Op-(.it.)
      reconsider H2i =    assume
      :fori Element  Segm  H2. OpP2,P4,FUNCT_2:23;
        assume 1 <= j & j <= len H1i;
        then
P14:    j in Seg   end
        then ((AES-Statearray.x).i).j =end;
        1+(i-'1)*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        hence H1i.j = H2i.j by P2,P6,P14;
      end;
      java.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 60
;
    hence thesis by P3,B10,FINSEQ_1:def 18;
  
  then 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) =
  rng AES-Statearray by FUNCT_2:10;
  hence thesis by FUNCT_2:def 3;
end;

registration
   >java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  correctness by LMStat1,LMStat3;
end;

theorem LMINV1:
  for cipher be    *0,0,><*0,0,0><0000>^0000 >&
 holds AES-Statearray.((ES-Statearray)".(cipher)) = cipher
proof
  let cipher be Element of 4-tuples_on(4-tuples_on (8-    <*0,0,,0*><000*,*000><000,* java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
L0: rng AES-Statearray = 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  by,00>00><0,,0*^0000> >&
  then reconsider g = f" as   it.10 = <* <*0,0,1,1*>^<*0,1,**,,,*><*0,,,*,
  4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),128-tuples_on BOOLEAN
  by FUNCT_2:25;
2:f*f  128 )&f*f)=
  id (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))) by FUNCT_2:29  
  then g is one-to-one & rng g = 128-tuples_on BOOLEAN by FUNCT_2:18;
  then f = g" by FUNCT_2:30,L2;
thesisbyFUNCT_226
end;

begin :: SubBytes

java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 53

definition
  let SBT;
func)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 61
-(48java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 54
  :DefSubBytes:
  for input be Element of 4-    Element of 4-uples_on 8   P1P,
      reconsider PP7 =< <000,*><0010>*,,,><0,*,
  holds ex inputij be<000,0><0,,,*,<,0,*^*,,,* * 
  st inputij = (input.i).j & ((it.input).i).j =    4-(-java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 67

  proof
 [ of-4java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 73
    Element of 4-tuples_onElementof -java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 67
    for i,jjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 72
    holds ex inputij be Element of 8-tuples_on BOOLEAN
st =(1i. $.)=.);
A1: for text being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    zbe Element Element 44 - )
    st P0[text,z]

      let text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
      text in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
      then
 BOOLEAN))*
      st text = s & len s = 4;
       java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 73
ex Element 4-(-BOOLEAN)
      st    of4-(8   P1
           reconsider PP12 = *<,100^,000><00,0^<,00*,
      st textij = (text.$1).j & zk.j = SBT.(end;
Q1:   for k be Nat       -java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 67
      Elementof 4*,00for i,     4&inSeg java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
      proof
et  Nat
        assume k in 4java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 69
        thenk in dom  byQ01,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 49
        textk  text ;
        then text.k in 4-tuples_on (8-tuples_on BOOLEAN);
        then
    ex  of(-*  s s  ;
        then reconsider textk = text    st    *,,*^00,*,*,,00><00,**s
        defpred[, 
        textijbe java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 76
$2=SBT(;
Q18      exzibe of 4tuples_on(- BOOLEAN
        st Pi[j,xi]

          let j be Nat;
me j Seg4;
          then j in dom(textk) by Q13,FINSEQ_1:def 3;
           textk)j  ( 3java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
   (. Elementof-uples_on  BOOLEAN
          SBT.t) =SBT.(textkj);
          A2  Q1   Q11=   
        end;
        consider zk be defpred Pi[Nat,set]
:domzk Seg4   bejin4
        holds Pi[j,zk.j] from java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 13
Q23:    lenthen j-A1def7
        java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
          (k-18j'* < 24byQ133,XREAL_1;
        then reconsider zk asQ134:1(k')     java.lang.StringIndexOutOfBoundsException: Range [36, 32) out of bounds for length 42
        java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 40
        ex textij be Element of 8-tuples_on           10<=+((-'1)*8+(R3IT   F7
        zk.j = SBT.(textij) by Q22;
        thesis;
      end:.4=PP9java.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 36
      consider z bejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
: =Seg4&fori st java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
P[i,java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
 ;
reconsiderasElementof 4java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 14
byd 11java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
      z in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) by Q3;
      then reconsider z as Element of
      4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
      take z;
      for i,j be Nat st i in Seg 4 & j in Seg 4 holds
      ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
      (z.i).j = SBT.(textij)
      proof
        let i,j be Nat;
        assume
Q4:     i in Seg 4 & j in Seg 4;
        then ex zi be Element of (4-tuples_on (8-tuples_on BOOLEAN))
        st z.i = java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 54
        ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j    then
R40 IT+)=.  A1,FINSEQ_1d 
        hence ex textij be Element of 8-tuples_on BOOLEAN
        st textij = (text.i).j & (z.i).j = SBT.(textij) by Q4;
      end;
      hence thesis;
    end;
    consider I be Function of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
    4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) such that
A2: for x being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    holds P0[x,I.x] from FUNCT_2:sch 3(A1);
    take I;
    thus thesis by A2;
  end;
  uniqueness
  proof
    let F1,F2 be Function of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
    4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    assume
A1: for text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    holds for i,j be Nat st       .= P14;
    ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
    ((F1.text).i).j = SBT.(textij);
    assume
A2: for text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    holds for i,j be Nat st i in Seg 4 & j in Seg 4 holds
    ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
    ((F2.text).i).j = SBT.(textij);
    now let text 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
A4:     ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
        ((F1.text).i).j = SBT.(textij) by A1;
A5:     ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
        ((F2.text).i).j = SBT.(textij) by A3,A2;
        thus ((F1.text).i).j = ((F2.text).i).j by A4,A5;
      end;
      hence F1.text = F2.text by LM01;
    end;
    hence F1 = F2 by FUNCT_2:63;
  end;
end;

definition
let SBT;
  func InvSubBytes(SBT) ->
Fof tuples_on4- (-java.lang.StringIndexOutOfBoundsException: Range [59, 50) out of bounds for length 61
  4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
  :java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   of4-tuples_on-(8-tuples_on )
 for, sti  Seg4 Seg4holds
   be8-  stinputiji. 
  ((it.input).i).j = (SBT").(inputij);
  existence
  proof
    defpred P0[Element of 4-tuples_on( java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    tuples_on(-(-BOOLEAN)] means
    for i,j be Nat st i in Seg 
    ex inputij be Element of 8-tuples_on BOOLEAN st inputij = ($1.i).j &
    ($2.i).j = (SBT").(inputij);
: fortext being  of 4-tuples_on(4-tuples_on 8tuples_on ))
    zbeElement of -(4tuples_on 8tuples_on java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 69
    stM1m =4java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    proof
      lettext be Element of 4-4-tuples_on (8tuples_on BOOLEAN));
      text in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
      then
Q01: ex   of(-java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 75
      lens = 4;
     PNatset means
 Element of (-tuples_on 8tuples_on BOOLEAN))st 2=zk&
      for j be Nat st j in holds <* x1^x5,x2^x6,x3^x7,x4
      X1: D c=;
      zk.j = (SBT").(textij);
Q1:   for k be Nat st k in Seg 4
      ex zk Element (-uples_on(8-tuples_on ))st P[,k
      proof
        letnon set,x be  -java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 69
        assume k in Seg 4;
        then k in dom text by Q01R2    reconsider   as;
        hen textk rng  FUNCT_13;
        then text.k in 4-tuples_on (8-tuples_on BOOLEAN);
        then
Q13:    ex s be Element        ;
                hence thesis;
        defpred Pi[Nat,set] means
        ex textij be Element of 8-tuples_on BOOLEAN st textij = (textk).$1 &
        $2 = (SBT").(textij);
Q18:    for j be Nat st j in Seg 4 ex xi being Element of (8-tuples_on BOOLEAN)
        st Pi[j,xi]
        proof
          let j be Nat;
          assume j in Seg 4;
          then j in dom(textk) by Q13,FINSEQ_1:def 3;
          then (textk).j in rng (textk) by FUNCT_1:3;
          then reconsider textkj = (textk).j as Element of 8-tuples_on BOOLEAN;
          (SBT").(textkj) = (SBT").(textkj);
          hence thesis;
        end;
        java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
Q22:    dom zk = Seg 4 &    thus (i mod   0 & (m =8&(mod 8)= )implies
        holds Pi[j,    ex A being Element (-(-   henceexjbe in  jin 4
  endjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
        zkasElementof (-tuples_onBOOLEAN* by FINSEQ_1:def 11;
        zk in 4-tuples_on (8-tuples_on BOOLEAN) by Q23;
        then reconsider zk as Element of 4-tuples_on (8-tuples_on BOOLEAN);
        for j be Nat st j in
        ex textij be Element of 8-tuples_on BOOLEAN 
        zk.j = (SBT").(textij) by Q22;
        hence thesis;
      end;
      consider z be FinSequence of 4-tuples_on (8-tuples_on BOOLEAN) such that
Q2:   dom z = Seg 4 & for i be Nat st i in Seg 4
      holds P[i,z.i] from FINSEQ_1:sch 5(Q1);
Q3:   len z = 4 by Q2,FINSEQ_1:def 3;
      reconsider z as Element of (4-tuples_on (8-tuples_on BOOLEAN))*
F: 
      z in 4-tuples_on(4-tuples_on (s=n 8Natjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
per cases;
      A23:t =;
      take z;
      for i,j be Nat st   1 
ex0  java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 43
      z)j (SBT)(extij)
      proof
let, beNat;
        assume
Q4:     i in Seg 4 & j in Seg 4;
+i1*+j12 <=   1(-')+j-1*327
         .i=zi &forjbe st j in Seg 4 holds
:  java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24
        zi.j = (U2:     n = 8*4+t b:,
        exjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 57
        st textij =then<4byXXREAL_01M2;
      end;
      hence(.(4 java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
    end;
    b--8,
    4-tuples_on(4-tuples_on (      32(j-'1+ Elementof*(java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 77
A2:for  x beingElement of      hence ,  st Seg& jinSeg&
    holds P0(   java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 58
    take I;P
    thus thesis by A2;
  endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  uniqueness
  proof
    holds kisNat:1(-1)*8+(    tuples_on-java.lang.StringIndexOutOfBoundsException: Range [53, 49) out of bounds for length 73
    4-tuples_on(4-defpred PP[Nat,set,set+i0-)8(0-1*32<=&k<= + be oft (tuples_on
    
: fortext  Element ofj0  4not   &java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 57
    ex textij be Element of 8-tuples_on BOOLEAN st textij = (text    =8i1*  be<holds
    (F1.P   4- (-BOOLEAN)java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 59
    assume
:for be      Q be Element of 4-tu java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    holds for i,j be NatstP  .i+ Q  t.i java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
ex textij be Elementof8tuples_onBOOLEAN st textij = (text.i).j &
    ((F2.text).i).j = (SBT").(textij);
    now      0m < 7+by:;
      now let i,j be Nat;
        assume
A3:     i in Seg 4 & j in Seg 4;
       
A4:     ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
        ((F1.text).i).j = (SBT").(textij) by A1;
A5:     ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
        (().i)j=)(  A3,;
        thus ((F1.text).i).j = ((F2.text).i).j by A4,A5;
      end;
      F1.ext  . byby 
    end;
    hence F1 = F2 by FUNCT_2:63;
  end;
end;

INV07A:
  for assume 1< k& <N2;
  holds (SBT").(SBT.(input)) = input
proof
  let input be Element of 8-tuples_on BOOLEAN;
  thus (SBT").(SBT.(input)) = ((SBT")*SBT).input by FUNCT_2:15
 (8tuples_on ).nput byFUNCT_2:java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    .= input;


INV08A:
  for input be Element of 8-tuples_on BOOLEAN
  holds SBT.((SBT").(input)) = input
proof
  let  be Element of8- BOOLEAN;
  thus SBT.((SBT").(input)) = (SBT*(SBT" then s  v &len  java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    .= (          sS e ;
    .= input;
end;

theorem INV07:
  for input         forzbeing Element of (4-tuples_on(8tuples_onBOOLEAN))
  holds (InvSubBytes(SBT)).((SubBytes(SBT)).input) = input
proof
  let input be Element of 4-tuples_on(4-tuples_on (8-tuples_on         [,]
  nowA150:   xin / B XBOOLE_0d 1;
    assume
A3: i in Seg 4 & j           
    then consider outputij be Element of AA1:1 = i i&i  
A4: outputij = (((SubBytes(SBT)).input).i).j &
(InvSubBytes()() ().
    byDefInvSubBytes;
     inputij Element of 8- BOOLEAN
 .i.&(BT)input.. .(
    by ,3java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    thus (((InvSubBytes(SBT)(SSBT)input))i)j=(.j
    by         P3: (j0-'1) = j0-1 XREAL_1,1

hence InvSubBytes(BT      ndjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
end;

java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
   of4-tuples_on(4-java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 12
  holds (SubBytesA  i0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

lementjava.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 22
now ,j          1in  by :;
    assume
:inSeg 4;
f 8-tuples_on BOOLEAN such that
:outputij  ((java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 49
(((). then x  objectsuchthat
    by A150:   in \B XBOOLE_0:def
    consider inputij be Element of 8-tuples_on A15:     in A &(-')32 +-1*thenQ0s as
 = (input.i).j &
    (((InvSubBytes(SBT)).input).i).j = (        then consider x be object such that
   )).)).)j  input.i)j
    by A4  beNat such 
endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  hence (SubBytes(SBT)).((InvSubBytes(SBT)).input) = input by LM01;


theorem
 & SubBytes( isontojava.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
  InvSubBytes(SBT) is one-to      then (
)(SBT"&SubBytesSBT)=(java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 75
proof
  set f = SubBytes(SBT);
  set g = InvSubBytes
P1: for x be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  holds g.(f.x) A:x   \ java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 70
  holds f.(g.y) = y by INV08;
 isonto &gis one-to--one  gis onto &
  g = f" & f = g" by INV00,P1,P2;
end;

begin :: ShiftRows

definition
  func ShiftRows ->
  Function of 4-tuples_onby java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
  (4-uples_on (-tuples_on BOOLEAN) 
  :DefShiftRowsend
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 72
  holds (for i beend;
  ex xi be Element of 4-tuples_on (8-tuples_on A2: =j0
  (it.input).i = Op      2holdsjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 63
e
  proof
    defpred P0[Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN      ,be   then
    Element of t(        o32=  8(1+-*java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
      for i be Nat'*+1* =&2<8(1)*0'*
     xibe      then
    end
A1: for x java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 11
    ex z be Element of java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    st P0[x,z]
    proof
let beElement of-4tuples_on 8java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 14
       in-tuples_on(-tuples_on (8-tuples_on BOOLEANQQ1 1<k& <47)A1Fjava.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 47

tuples_on        by
      len = 4;
              per cas
      java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
$  java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 53
Q1:   for   +i-    java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
exk java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 75
      proof
         then i0')<(-1  14P2,   not (  0&econsider k m+   of NAT;
        A2:- =-by13java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        then           inSegjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

Q11:    x.
               assu          then e ex   4-tuples_on(8tuples_on BOOLEAN))*
        thenn <=8(i-'1)8(-1)*32  ziXBOOLE_0efjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
Q13n<k  java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 70
        reconsider xk1 = xk as Element  by 15
        theoremLMStat1:
reconsiderzk -Shiftx5-)as
        FinSequence of (8-tuples_on BOOLEAN          java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 35
     zk   Q13,ESCIP_1:ef3java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
        reconsider;
uples_on 8tuples_on BOOLEAN)byQ15
        theorem LMStat2:
       ex bejava.lang.StringIndexOutOfBoundsException: Range [17, 8) out of bounds for length 75
        zk = Op-Shift'1(-1)8(-)327  
         x2  128BOOLEAN
end
  
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 48
    . =-java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 46
Q31* (7) )  Xjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62
      P2 ex  Element java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 6
      by FINSEQ_1:def 11;
z 44u (-bQ3
      hence thesisn < 8(0t java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37

    consider I be Function of 4-tuples_on(4-tuples_on (8-consider ,   n <= 8+(i-'1)*8+(j-'1)*byjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 -java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 60
 forx        
    holds P0[x,I.x] from java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
take ;
    thesis java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  uniqueness

let    x1x2
    4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
   
4(4java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 74
olds(ori Nat     (-1*)32bN:;
java.lang.StringIndexOutOfBoundsException: Range [35, 4) out of bounds for length 75

    assume
BOOLEANP2:e be Elementof() st  =  len  A1
    holds (                  w zj;
ex bjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 75
t -<4 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 35
    now let input       then
      H1.input in 4-tuples_on(4-tuples_on (8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 39
     then
: s  4(8-uples_onBOOLEAN)*stH1.input = s &
     g- 8java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 73
     .inputin-4- 8);YY3  u=Seg(4*7m  forkbe Natstkin
      then
P4:A50:1+(i')8+j')32-(i-'1*8(j-'*32 <=k((i-1*+(-1*)
      len s = 4;
      now let ik(i)8(-))=1('*(')*+7((-1)8+j-'1)*32java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
        assume 1 <= i & i <= len (H1.input);

XX2:i Seg4 P3
       then
XX3:    ex xi be Element of< +by6java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
st = inputi&(H1.input). = Op-Shift(i,5i) byA1;
XX4:    ex xi be   1java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 39
        st xi =Q133 (j')32< * by XREAL_1:64;
        -1)8(1*+7=+76
      end;
hence.  .input P3,,14java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    end;
          ,,,A505,,FINSEQ_6
  end;



  func   :k= nb ;kF1,QA,,java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 57
  Function of 4-tuples_on;
  4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
  :DefInvShiftRows
  for java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  ..          .= xx2.k by F1,F2,,,for   ofi<m holds (+)  
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
    defpred P0[Elementtheorem LMStat3        assume  defpred [,
    Element of 4-tuples_onsi  java.lang.StringIndexOutOfBoundsException: Range [19, 16) out of bounds for length 24
    for i be Nat st i in:k    in  ex  object st  128uples_on &         then <+&+4()MMLT47MXXREAL_0:2java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    ex       k Nattuples_on(- (-uples_on
Shifti-
:for x s
    exiindom z                  A4;
    st P0[G4:   n in  8A50
 java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
be  4A50: 1
java.lang.StringIndexOutOfBoundsException: Range [22, 6) out of bounds for length 58
      java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
Q01:      reco as(by :,java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      then            .1=.+)C2,;
      defpred P[atset]means
      h(.)j=mid (,1(-1*+j-1)*2,+;
      $2 = Op-Shift(xk,$1-1);
Q1:   for k be Nat st k in Seg 4
      ex zk being Element      exPbe Element  (-uples_on-)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      proof      take;
        let k be Nat;
        assume k in Seg 4;
        then k in      proof
        then
Q11:    x.k in rng        assume
            m<&k4(+;
        then
Q13:    ex       zi  z.i  of8t* by;
        then reconsider xk = x.k as Element of (8-tuples_on BOOLEAN)*;
        reconsider xk1 = xk as then zi.j in (8-tuples_on BOOLEAN);
byjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
        reconsider zk = Op-Shift(xk,kQ110: 1< i &LX34   (modm > implies i  kdiv + =kodm java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
        FinSequence of (8-tuples_on BOOLEANthen1- -          ( )= i=  m)&=m    i &
zk Q13DESCIP_1: 33java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
        NLX32:1<=k+  +1 =4(+)bytjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
         n -(uples_on BOOLEAN byQ15;
        then reconsider zk as Element of 4-tuples_on (8-tuples_on BOOLEAN);
 (k1) modm <)327:
zk=OpShift-be   in        +mod)&(1 modm) =0 =(k1div then

Q14  xx=128 by,Q14: len x = 128 by Q13,FINSEQ_1)32  reconsider km0 =-m Element ofNATAS1483
      consider(1(ir=m0+as Element f NAT;
2    z =  fori Nat st iinSeg 4holds
      P[iz1(-*(-*7((')8(-1321byG3REAL_1233
Q3:   len z = 4 by Q2,java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 13
      F40:    1 <=  n < lenzij;
      by FINSEQ_1:def        then        128F1:     1 <= 1+((i-'1)+-*  NAT_11
      1i')        beElementofmuples_on-tuples_on -java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 72
P2  ijbe st i Seg   j in Seg 4
    end        java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 53
    let i,jNat
    4-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
A2: for        then
    holds java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    thus thesis by A2        suppose

  uniqueness
 
    let consider ,0,0be ,
    4-tuples_on(4-tuples_on (8 zi0j0 DD1:      ((4*(7+m)) div)0< (7m)div )  XREAL_1;

       b DD1XXREAL_0,,NAT_23java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
   holds(beNat st i inSeg  java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
exbeElement  -tuples_on (-tuples_on BOOLEAN)st xi = input.i &
    (H1.input).i = Op-Shift(xi,i-1));
    assume
A2n=midx1(-')8+jj  b =.  )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [9, 1) out of bounds for length 10
 -java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 75
H.) Shifti);
    now let input x   &hen '  -1by
      H1.input in 4-tuples_on(4-tuples_on (8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 50
      then
:ex  beElement 4tuples_on(-BOOLEAN) st .input s&
      len      then
      H2.input  < &jjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 69
      java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
(8-tuples_onjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 69
      s=;
      now let i 8      hen
sume1<    H1.;
        then
XX2 iinSeg 4  P3;

XX3:    : s java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        (H1.input).i = Op-Shift(xi,i-1) by A1;
XX4:    ex xi beElement ow j Nat;
       .)  -xi) ,java.lang.StringIndexOutOfBoundsException: Range [51, 3) out of bounds for length 71
       P14     in:=(+-java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      end;
H1input =byP4,
    end;
   FUNCT_2;
end;
 by,2,LC13       =  byLLX34java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 48

INV04
       ;
  now beNat
proof:thus beElement java.lang.StringIndexOutOfBoundsException: Range [36, 12) out of bounds for length 12
              Elementof4tuples_on2:     i1+1* =1+i'*jjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 4
  InvShiftRows.(ShiftRows.input) in
--java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 49
  then
P3:   java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 74
          :java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 71
  in4-tuples_on(4-tuples_ong=suppose
  java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 58
  st input = s & len           i Segjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
  letibe java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    C22X: 
    then
XX2: i in Seg 4 by P3;
    then consider xi be Element of 4-tuples_on (8-tuples_on BOOLEAN)LC12:       i2
     SBT-
  i
    then
YY1: ex shencebyFjava.lang.StringIndexOutOfBoundsException: Range [35, 30) out of bounds for length 46
hat
XX4             ex: beof uples_on (j 
  Q f-uples_on(8tuples_on BOOLEAN)
    DefInvShiftRows,XX2;
    InvShiftRows(hiftRows)i Op-i,i-java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
           .+1 =O-(,SBTjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
. inputiby            C,java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 43
  end;
  InvShiftRows(hiftRows
end;

theorem INV05:
  for output beElement of 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));
    st inputij = (input.i).j & ((it.input).i).j = SBT.(inputij);
  4tuples_on(-tuples_on (8-tuples_on)    st(-thenjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 30
  then
 -java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 58
)  s len4
  4-(- BOOLEAN));
  
P4: ex s be Element of (4               ,  of- -java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 67
  s&len =4;
nowleti Nat;
    assume 1<i& i <=len      t Element of 4tuples_on(-(8)
    
XX2: i in Seg 4 by P3;
    then consider xibe Elementof 4tuples_on(-tuples_on BOOLEAN)
       such 
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
()i=-st=  Nat S4
    xi in 4-tuples_on (8-      holds ex textij be Element of 8-java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 12
    then
   be  8BOOLEAN*  
     beElement java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 73
XX4: yi =      proof
    (ShiftRows.(C21:      u.(k+1) = t.1 by NLX34.byP     ;
 (java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 69
    by     =ke
      .= output.i by DESCIP_1:12,YY1AESStatearraybyFUNCT_2:10,LX34;
  end;
  (.(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
end;

theorem
  ShiftRows is one-to-end    stPijxi]
  InvShiftRows is          letjbeNat;
  InvShiftRows = (ShiftRows)" & ShiftRows = (InvShiftRows)"
 NV04;

  


  func.=SBT  -java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 71
theng =f  Functionjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
4ejava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  4-tuples_on(4-Q22:nce P0[L2(* id(-- f*"=
  : 4-java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 71
  for text, key be Element         thenreconsider as  of reserveSjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 53
  holds for i,j be Nat st i in Seg 4 & j in        java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 75
  holds ex textij,keyij be Element of 8-tuples_on BOOLEAN
  st textij = (text.i).j & keyij = (key.i).j &
 (it(key)i)-XOR(extij,eyij)
  existence
  proof
    defpred P0[    z = 4 by Q2,FINSEQ_1:def 3;
    Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
    Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))] means
    for i,j be Nat st i java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 12
    holds for i4-(-8java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 54
    st textij = ($1.    (*7z) )
A1:      java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    being Element of 
  Element  44tuples_on (8-uples_onBOOLEAN)
    st P0[    holds ( be .        st Seg
    proof
      text 
-tuples_on(- BOOLEAN);
      text in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));

Q01:  ex s be A1 for text be Elementof4tuples_on(8tuples_on BOOLEAN))
      st text = s & len s = 4;
      key in     beElementof4t(tuples_on BOOLEAN)
      then
Q02:  ex s    (j  .java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 35

defpredj=".java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 29
      ex zk be Element of (4-tuples_on (8-java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 11
      st =zk&for j be Nat st   Seg4$=SBT(textij);
      ex textij, java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 61
textij = (text.$1).j & keyij = (key.$1).j &
      zk.j = Op-XORtext.in 4-tuples_on (-java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 57
Q1:   for k be Nat st k in Seg 4 ex zk being
    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 63
proof
k beNat;
        assume
C11Z     i<4*Q:f  st Segex java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 79
        k  dom text by stPijxjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
       then 22java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 51
        then textkin4-tuples_on (-          assume in Seg4proof

 beof8tuples_on            java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 53
        st text.k = s thenreconsider=  java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 55
   . asjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 76
        k in dom(key) by Q02,FINSEQ_1:def 3,Q11;
        then key.k in rng key 4-tuples_on(4-tuples_on (8 ;
 kin- 8;
        then
6:ex of(-tuples_onBOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
        st key.k = s & len s = 4;
        then reconsider keyk      z  -tuples_on4tuples_on (- ) byQ3java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
        defpred Pi[Nat,set] means
        ex textij,keyij be Element of 8-tuples_on BOOLEAN
         =(textk)$1 & keyij =(keyk).$1 &$ =Op-XOR(textij,keyij);
Q18:    for j beproof
        st Pi[j,xi]
        proof
j eNat;
          assumeQ4:iinSeg4&jinSeg 4
st java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 54
          then j in dom(textk) by                .j = ( by ;
then()jin rng textk) by :java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
reconsider  textk)jElement  -BOOLEANjava.lang.StringIndexOutOfBoundsException: Range [79, 80) out of bounds for length 79
jin dom()by Q16,INSEQ_1:def 3,19;
          sttextij =(text.i).j& (.i)j=(java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 8
          then  java.lang.StringIndexOutOfBoundsException: Range [26, 10) out of bounds for length 10
          OpA2x  4tuples_on(   Functionf-4(tuples_on,
          C14:          m
        end;
        consider zk be java.lang.StringIndexOutOfBoundsException: Range [2, 34) out of bounds for length 7
Q22:    dom zk = Seg 4 & for j be Nat st j in Seg 4
        holds Pi[j,zk.j] from FINSEQ_1:sch 5(Q18)F1unction  -java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 76
Q23:    len zk = 4 by Q22,FINSEQ_1:def 3;
        reconsider zk as        ples_on(tuples_on (8-tuples_onjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
zk-(BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        then reconsiderjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 78
 C          = java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 60
        holds ex textij,keyij be Element of 8-tuples_on BOOLEAN
st=textk)(. zkj XOR(textijkeyij
        by Q22;
        ence thesis;
      end;
      consider z be(F2)i).    assume
Q2:   dom z = Seg 4 & for i be Nat st i    holdsfor i,  java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 10
      holds P[i,z.i] from FINSEQ_1:sch 5(Q1);
lettext bejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 Elementoftuples_on(-tuples_on ))*
      by FINSEQ_1:def 11;
      z in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) by Q3;
      then reconsider z as
      Element of  for input beElement of 8tuples_on BOOLEAN
      take z;
      for   let input be Element of8tuples_on BOOLEAN;
      ex textij,  thus .(SBT".(nput)) = (*SBT).inputby FUNCT_21java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      (text.i).j & keyij = ( e;
      proof
 j  4tuples_on4tuples_on 8tuples_on BOOLEAN)
        assume
Q4:     i in Seg 4 & j in           
  (tuples_on(-)
        st z.i =              -(-) =k1  ,  
          textijkeyijbeElemento 8tuples_onBOOLEAN
          .i. &keyij  keyi).j&
zi=Opextijkeyij  Q2
             z beElementof -     ;
st  [textzjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        . =XOR(,keyij java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      hence thesis;

    consider I be         InvSubBytesS)).(
    4-tuples_on(4      end
                 
2:x,  java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 75
 P0Ixyfjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    take I;
    thus thesis by A2;
  nd
  uniqueness
  proof
    , Function[4-uples_on4- 8tuples_ontij)
    4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)):],
    extextij Element of8tuples_on BOOLEANst A: inputij = (i) &
    assume
text, beElement  4tuples_on4tuples_on (tuples_on )
        
    holds ex textij,keyij be Element of 8-tuples_on BOOLEAN
    st textij = (text.i).j & keyij = (key.i).j &
    ((F1.(text,key)).i).j = Op-XOR(textij,keyij);
    assume
A2: for text,key be Element of 4-tuples_on(4-tuples_on SubBytes((SBT)is;
oldsfor i, beNat stiin Seg 4 &j  Seg 4
nt  8- BOOLEAN
 textij =(text        Pi,j]rom FINSEQ_1: 5Q18;
(.tkey)i.j =Op-ORtextijkeyij);
    now let text,key 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
A4:     ex textij,keyij be Element of 8-tuples_on BOOLEAN
        st textij = (text.i).j & keyij = (key.i).j &
        ((F1.(text,key)).i).j = Op-XOR(textij,keyij) by A1;
A5        then reconsiderjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 19
        st textij =extextij   of -uples_on  textij   -4tuples_on 8tuples_on )means
        ((F2.(text,key)).i).j =  hence thesis  efShiftRows:
,key)     zbeH1i
      end;
java.lang.StringIndexOutOfBoundsException: Range [30, 11) out of bounds for length 50
    ;
     F1   :2

end;

begin:

definition
  let SBT;
  let $i=OpShift
(,x - for be Nat st  4 
  for i be Element of Seg 4 holds it.    
  existence
  
    defpred P[Nat,set] means ex xi be Element of 8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 65
    st xi = x.$1 & $2 = SBT.( ;
P1: for k be Nat st k in Seg 4 ex       defpred [at,]means
z
proof
       k Nat;
      assume

xin 4tuples_on(-tuples_on BOOLEAN;
      then ex  take I;
      then k in dom x by FINSEQ_1:def 3,AS;
      then x.k in rng x by FUNCT_1:3;
      then reconsider xk = x.k as Element of 8-tuples_on BOOLEAN;
      SBT.(xk) is Element of 8-tuples_on BOOLEAN;
      hence A1 for Elementof4tuples_on(tuples_on (8java.lang.StringIndexOutOfBoundsException: Range [0, 63) out of bounds for length 12

 pbeingFinSequence of 8-tuples_on BOOLEAN 
P3: dom p = Seg 4 & for k be Nat st k in Seg 4 holds
    P        reconsider zk = Op-Shift(xk,5-k) as
    reconsider p as Element of(8-tuples_on :def 11;
      = 4by P3,:def 3;
    then p in 4-tuples_on (8-tuples_on BOOLEAN);
    then reconsider p as Element of 4-tuples_on (8-tuples_on BOOLEAN);
    takethen  reconsider zk as Element of 4-tuples_on (8-tuples_on BOOLEAN);
    now let i be Element         ex xk  Element of 4-tuples_on (-tuples_on BOOLEAN) st xk = x.k &
      ex xi be Element of 8-java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 31
      by P3;
      hence p.i = SBT.(x.i);
    end;
    hence thesis;
  end;
   uniqueness
  proof
H1H2be Element of 4-tuples_on (8tuples_on BOOLEAN);
    assume
A1: for i be Element of Seg 4 holds H1.i = SBT.(x.i);
    assume
A2: for i be Element     =(    consider I be Funct  -uples_on(tuples_on (8-uples_on BOOLEAN)),
    H1 in 4-tuples_on    -tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) such that
2 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 7
 s=;
 in -tuples_on(-tuples_on BOOLEAN)
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  s  of8 H2 &len  ;
    now let i be Nat;
assume 1 <= i & i <= len H1;
t i inS  P1
      then reconsider j =i  Element of Seg 4java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
   H1i SBT.x then
P3:  exs :i4
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
       java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 6


ion
      nowlet  be Nat;
  ()          iex  4-(*
LeftShiftjava.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 12
  correctness byXX2:     reconsiderw0 = as
end

definition
letnmnon   ofNATjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  let s,t be Element of m-tuples_ondefinition
  func Op-WXOR(s,t        assume k in Seg m7;
  for  -4tuples_on(tuples_on ))
  existence
roof
    defpred P[Nat,set] means
java.lang.StringIndexOutOfBoundsException: Range [23, 6) out of bounds for length 75
    $2 = Op-XOR(si,ti);
:kbenow leti, be java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
P[zjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    proof
      let k be Nat;
      
AS:   k in Seg ZZ9:   4n =4n by XREAL_17java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
       thus (((InvSubBytes(BT)).(SubBytesSBT).)i)j=(input.)j
      then ex v be Element of (n-tuples_on BOOLEAN)*       then ex v be
      then k in dom s by FINSEQ_1:def 3,AS;
      thenbe        4*n+2< 4m7 by ,,XXREAL_02
      then  reconsider sk = s.k as Element of n-tuples_on BOOLEAN;
        m-tuples_on n- ;
thenroof
      then k in dom t by FINSEQ_1:def 3,AS;
      then t.k in rng t by FUNCT_1:3    defpred[ -4tuples_on(- BOOLEAN),
       BOOLEAN;
OpXOR(,tk)is Element ntuples_onBOOLEAN
          ex xibeElement of 4-tuples_on(-tuples_on BOOLEAN)st xi = $1i &
    endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
consider p being FinSequenceofn-tuples_on BOOLEAN such that
P3: dom p = Seg of-java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 14
    from FINSEQ_1:sch 5(P1);
P4: len p =m P3,INSEQ_1def3
pin (n-BOOLEAN)        4tuples_on(-(-BOOLEAN);
then   mtuples_on(-tuples_on BOOLEAN) by P4        then econsiderw1=w(4*+)as
        Element of-java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 55
   java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 11
let  eElement  Segm;
      i  ntuples_one;
      p.i = Op-XOR(si,tiles_on (-tuples_on (-tuples_on BOOLEAN)) by LMGSEQ4 xy FUNCT_1:;
      then reconsider   
    end;
    hence

  
  proof
    H1 beElement  -    let H1,H2 be Element of m-tuples_on
    AA2:i =7m      1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
A1: for i be Element of Seg m holds H1
         + Segby;
A2 reconsiderxk1=f n(+-&
     4        java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 45
or4 -java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 73
:       reconsiderzkElementof8-tuples_on BOOLEANw.*4*;
    H2    take I;
    then
      hencethesis;
    now let
      assume 1 elet,2be Functionof4tuples_on(-tuples_on (- BOOLEAN)
      then i in Seg m by P1;
then reconsider   sElementofSegmjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
      thus H1.i = Op-XOR(s.j,t.j) by A1
        .= H2.i by A2;
    end;
ence H1   thusjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

definition
  func Rcon ->   Functionof 4tuples_on(4tuples_on  proof
      let ,H2 be Function    now let input be Element oftuples_on4tuples_on of-8)
  it.1    H1input)i = -(XX2:in  4 byP3;
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<*0,0,0,0*> *> &
  it.2 = <* <*0,0,0,0*>^<*0,0,1,0*>,<*0,0,0,0*>^<*0,0,0,0*>,
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<*0,0,0,0*> *> &
  it.3 = <    H2input.= Op-(xi,5-i));
    <*0,0,0,0*>^<*0,0,0,0*>,<00.Key &y,
  4  *(..1)*(i).*2w4+w4>java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
*,0*^*00,*,*0,,,*><00,* >java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  it.5 = <    hence   (7) 4tuples_on (-tuples_on BOOLEAN)such 
    <0000><0,,><00,,>^*,0* * java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  it.6 = <* <       i beNat st   +holds
    theorem INV04:
  *,,>0000>*,0*<0,0,
    <*0,0,0,0*>^<*0,0,0  java.lang.StringIndexOutOfBoundsException: Range [52, 17) out of bounds for length 52
  8=<<,0*^00,0>*,,*^*,,,*>
    <0,0,0,t
  it.9 = <* <*0,0,0,1*>^<*1,0,1,1*>,<*0,0,0,0*>^<*0,0,0,0*>,
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 75
  ithencenowlet  beNat
*,  
  existence
    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 61
X0:0n BOOLEANthen
X1: 1 in BOOLEANXX3P4   put be Elementof4-(4-uples_on (8-uples_on )java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
:<0,00,*>is Elementexxi beElement of -tuples_on (-uples_on BOOLEAN) st xi = input.i &
<000>isElementof4uples_on )by LMGSEQ4,0,X1java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
: *,01*>is Element (-uples_on BOOLEAN) MGSEQ4,0,java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
P4: <*0,1,  holdsShiftRows(InvShiftRows.output)=output
P5: <*1,0,0,0*> is Element of (4-tuples_on BOOLEAN) by   let output be Element of 4-tuples_on(4-tuples_on (8-tuples_o));
R1:  stoutput=s&lens ;
R2: <*0,0,1,1*> is Element of (4-tuples_on BOOLEAN) assume 1 <= i & i <= len (ShiftRows.(InvShiftRows.output
 <*endjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
0,*>*0,,0*>P0[,z]
    <*0,0,0,0*>^<*0,0,         of-    
   YY1:exsbelementof8-tuples_on BOOLEAN) stxi &lenjava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 69
    reconsider PP7 = <* <*0Q01: exsbe of(-(-java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 72
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0       defpreds(InvShiftRowsoutput). = OpShift(,5i)by DefShiftRows,X2
    Element of 4-uples_on (-tuples_on BOOLEAN)by
     CIP_110YY1
*      .. by 12,YY1XX3;
    Element of 4-tuples_on (8-     proof
    reconsider PP9=<<0,0*>*1,,0>*000><,0,0*,
    <*0,0,0,0*>^<*0,0  let m be ;
    Element of 4-  let text be  of 4- java.lang.StringIndexOutOfBoundsException: Range [37, 3) out of bounds for length 47
    reconsider  InvShiftRows = ( let Key be Element of m-tuples_onKey be  m-tuples_on(tuples_on (-tuples_on BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
,0><
    Element of 4-tuples_on (8-tuples_on        FinSequence  (-
java.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 73
    <*0,0,0,0*>^<*0,0,0,  [4tuples_on4-uples_on(-tuples_on BOOLEAN defENCjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    Element of 4-zk in 4-tuples_on (8-tuples_on BOOLEAN) by Q15;
    reconsider PP12 = <exxk  4--java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 48
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<*0,0,0,0*> *> as
oftuples_on(byP1P,MGSEQ16java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
            thenkey  rngkeybyFUNCT_1:3java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<*0,0,0,0*>         then
    Element of 4-tuples_on (8-tuples_on BOOLEAN) by P1,java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 33
    reconsider PP14 = <* <*        then reconsider keyk = key.k as java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<*0,0,0,0*> *> as
tof4tuples_on(-:nNat 1 =n   java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
reconsider PP15= <*,,,*><01,*,*,,,*^00,java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 19
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<*0,0,0,0*            be;
    ElementQ19:      j inSeg4;    st P[,,]
    reconsider Q0 =<*P6PP7PP8,PP9,PP10* as FinSequence;
    reconsider Q1 = <*PP11,PP12,PP13,PP14,PP15*> as FinSequence;
    reconsider IT = Q0^Q1 as
    Element of 10-tuples_on (4      assume
A1: len Q0 = 5 & X11:  1 <= n & n < ;
=  ;
A2: len Q1 A:+1=+17,;
    Q1. hence thesis
    1 in Seg 5;
 domQ0 by FINSEQ_1:def 3,A1;
    then
  1,FINSEQ_1:ef
2in 5;
             in 4-tuples_on(8-tuples_on BOOLEAN) by Q23;
    then
R2: IT.       st textij=(textk)be       _ ( BOOLEAN)
    3 in        hence ;
    3 indom Q0  FINSEQ_1:def3A1;
    thenQ2:dom z =Seg4 &for i be  sti inSeg
R3: IT. end;
    4 in Seg 5;
    then 4 in domQ3   len =4 by Q2,FINSEQ_1:def 3    considerseq beA2 xbeing   4-(- 8tuples_onBOOLEAN)
    
R4: IT.4 = PP9 by A1,FINSEQ_1:def 7;
;
  java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
R5: IT.5     assume
    1inSeg5java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    then1in  Q1by :def ,ex FINSEQ_1:ef3X2
    then
R10:IT(+1 =    ssume
      .= PP11;
2ssume
      domQ1 byd3A2
    then
R20: IT.(5+2) = Q1.2 by A1P3    beElement         .i = zi &for  be Nat st j in Seg 4
      .= PP12;
    3 in Seg 5;
    then 3 in dom Q1 by FINSEQ_1:def 3,A2;
    then
R30: IT.(5+3) = Q1.3 by A1,java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 19
     = PP13java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    4   5
then  then 4 -(tjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 60
    then
R40: IT.(5+4) = Q1.    holdsP0x,,.x)  BINOP_1sch3A1;
      .= PP14;
    5 in Seg 5;
    then 5 in dom Q1 by FINSEQ_1:def 3,A2;
then
:B))]java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
      .= PP15;
    thus thesis by R1,R2,R3,R4,R5,R10,R20,R30,R40,R50;
  end;      len s= 0  7mXREAL_1:;
iqueness
  proof
     R1,R2 be Element of 10-tuples_on (-java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 49
    assume
A1: R1.1 =    holds for i, be  sti  Seg 4  j in Seg4
0000>,0,>*,00^*,,** java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    textij texti.&keyij= keyi. java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
    <*0,0        nowet ,eybe
    *000**<,,,>
<00,,0*^<0,,0,*>,*0,,0,*><0,,00seq AddRoundKey(Keyi1)&(java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 75
=**,,
0,*^<0000><000*^*,,,* >&
  .5<0,,><0,>*,,0^*,0,
    <*0,0,0,0*>^<* s1 = AddRoundKey.(ShiftRows*ubBytes(BT)(1()java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
R1.=<<00,0><0000><0000><,000,
<0,,,*^<0,,,* st7+ java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 24
R1.7 =< <*0,,,0*^<0,0,es_on4-uples_on (-tuples_on BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
    <*      endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    R1.8 = <* <*1,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<* 1 tKeyi1 &f ijava.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 6
<0,0,0,0*>^<*0,0,0,0><java.lang.StringIndexOutOfBoundsException: Range [30, 6) out of bounds for length 6
    R1 =*<0,,0,*><1,,1,*>,*,0,0,0>^<*,0, R1.9 = <* <*0,0,0,1*>^<*1,0,1,1*>,<*0,0,0,0*>^<*0,0,0
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0,0*>^<*0,0,0,0*> *> &
     =(KeyExpansionBT).)(+&
    <*0,0,0,0><,,,>00,,*^*,,0,  funcSubWordSBT)- ofs2=(SBT.seq(+-1,java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 69
    assume
A2: R2.1 = <* <*0,0,0,0*>^<*0,0,0,1*>,<*0,0,0,0*>^<*0,0,0,  proof
*0,letinputbeElement oftuples_on4-(-tuples_onBOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  .2 =<<00,,*^<,,1,*,*00^*0,,0*,
    <*0,0,0,0*>    st P[,z]
    .3 =<* <*0,0,,0*^<0,100*>,*0,, P3: ex s Element  f4tuples_on(tuples_on BOOLEAN))
< --uples_on8tuples_on java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 58
    R2.4 = <* <*0,0,0,0*>^<*1,0,0,0*>,<*0,0,0,0*>^<*0,0,0    holdsex beElementof4        in    
  *00^*00>0,,0*><,00> java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    then.inrng  by:;
    <*0,0,0,0*>^<*0,0,0,0      then reconsider xk = x. as Elementof-tuples_on BOOLEAN;
6=< *,0,*^<0,,,0>      ;
    <*,0,0    
R27=< *0,,0,0><00,0*,*,,,*^<000,>java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    <*0,0,0,0*>^<*0,0,0,0*>,<*0,0,0    InvShiftRows.eyExpansion(,) k.  sch5P1;
    R2.8 = <* <*1,0 thus .(hiftRows.java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 68
    <*0,,*^*,00     in-(;
    R2.9 = <* <*0,0,0,1*>^<*1,0,1,1*>,<*0,0,0,0*>^<      = input.i   pasElement  - (8tuples_on BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
*,,,*^*,,,*,*,0,00*^*,,,P:=Nr of 8OOLEANxi=. .=BTxi
    R2.10 = <* <*0,0,1,1*>^<*0,1,1,0*>,<*0,0,0,0*>^<*0,0,0,0*>,
<*0000><0,00><    hence thesis     Keyi1  (yExpansion(SBT,)().java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 uples_on )

XP1: ex v be Element of ( st Keyi = ((KeyExpansi(,m)(java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 36
    len v = 10;
    R2 in 10-tuples_on (4-tuples_on (8-tuples_on BOOLEAN));
  then
:exv   4tuples_on(- )) R   java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    len v =    then
   i be   =  i<len  holds R1=R2.java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    proof
       ibeNat;
=i & i<  R1java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
      then i = 1 or ... or i = 10 by XP1;
       thesis by A1,2;
    end;
    hence Q52 i]java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  end;
end;

definition
  let SBT;funcRotWord(x)->Elemento tuples_on(- )
m,  Nat,  beElement of 4tuples_on (-tuples_on BOOLEAN
  assume AS: (m = 4 or m = 6 or m = 8) & i < 4*(7+m) & m <= i;
  func KeyExTemp(SBT,m,i,w) -> Element of (4-tuples_on (8-tuples_on     1<    =   NAT;
  java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
  (ex T3 be Element of (4-tuples_on (8-tuples_on BOOLEAN)) st      end;
  it = Op-WXOR(SubWord(SBT,RotWord(w)),T3)) if ((i mod m) = 0),
  (it = SubWord(SBT,w)) if (m = 8 & (i mod        roof
 
 oof
    thus (i mod m) = 0 implies ex A
java.lang.StringIndexOutOfBoundsException: Range [43, 4) out of bounds for length 56
    st (ex T3 be Element of (4-tuples_on (8-tuples_on BOOLEAN))
s   .im)&A  -WXORWXOR(SubWordproof
    proof
      assume
         =_onBOOLEAN)
      >  dividesibyA1I62ASjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
LTT0:imWSIERP_1;
:(*thensksElementn 
LTT2: m/m <= i/m by AS,XREAL_1      t in m-uples_on(n-tuples_on BOOLEAN);
LTT4: i/m in NAT by INT_1:3,LTT0;
LTT5: i/m < 28/m+4 by AS,XREAL_1
/=10
      proof
        now per cases by AS;
          case m  :DefAddRoundKey:
       ;
            hence thesis by NAT_1:13,LTT4;
;
          case m = 6;
            java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 44
          end;
          case m =   Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))] means
            hence thesis by LTT5,XXREAL_0:2;
          end;
        end;
hence thesis;
      end    then  p asElement  -uples_on ntuples_onBOOLEAN)
      then
:i inSeg by AS,LTT2,LTT4;
reconsider  mas Nat by LTT4;
      Rcon in 10-tuples_on (4-tuples_on (8-tuples_on BOOLEAN));
      then   uniqueness
      st Rcon = v & len v = 10;
then dom Rcon =Seg byFINSEQ_1:def 3
then Rcon. in  let text Element of -tuples_on(-uples_on (-uples_on BOOLEAN))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      reconsiderT3=.as
      Element of (4-tuples_on (8-tuples_on BOOLEAN));
      Op-WXOR(SubWord(SBT,RotWord(w)),T3) is  func AES-DECA2:for ibeElement   m holds H2i=OpOR(s.,.i)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
      of (4-tuples_on (-tuples_on BOOLEAN);
hence thesis;
    end;
    thus m = 8 & (i mod 8) = 4 implies ex A being
Element  -tuples_on 8uples_on BOOLEAN) st A =SubWord(SBT,w);
    thus not ((i mod m) = 0) & not (m = 8 & P2: ex  be Element of (-tuples_on BOOLEAN & ($3.j
    ex A being Element of (4-tuples_on (8-tuples_on BOOLEAN)) st A = w;
  ;
ss

nd;

definition
  let SBT;
  let m be Nat;
  assume AS: (m = 4 or m = 6 or mexjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
Function m4(-java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 61
(*7+)-tuples_on 4tuples_on 8tuples_on BOOLEAN)means
for  <*<*,,,*><0010><0000>^0000>
  holds (for i be Element of NAT st i < m holds (it.Key).(i+1) = Key.(i+1))
  & (for i be Element of NAT st m <= i & i < 4*(7+m) holds
  ex P be Element of (-(-java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 57
  Q be Element of 4-tuples_on (8-tuples_on BOOLEAN)
  st P = (it.Key).((i-m)+      zk.j=OpXOR(,keyij);
(.Key.i) -(,KeyExTemp(BT,iQ));
  existence
  proof
    defpred P0Element of-tuples_on4tuples_on (8-tuples_on BOOLEAN)),
Element  ( it. = *    java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 33
 of sti<mholds2.i1 =$.i    then reconsider Nr = 7+m-1 as Nat;
    (for i be Element of NAT st m <= i & i < 4*(7+m) holds
    ex P be Element of (4-tuples_on (8-tuples_on BOOLEAN then
    Q be Element of 4-tuples_on (8-tuples_on BOOLEAN)
  2.(-)1)&Q ($). &
    $2.(i+1) = Op-WXOR(P,KeyExTemp(SBT,m,i,Q)));
A1: for x being Element of m-    (Nr+1)-tuples_on(4-tuples_on4-tuples_on (-tuples_on BOOLEAN));
      be)-tuples_on(-tuples_on (8-tuples_onBOOLEAN)
    P0,java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    proof
      let x be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
      defpred PP[Nat,set,set]   =((KSBTm)().1+)&
      ex r,t be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
      st r =$&t =$ java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      (ex P0,Q0 be Element of 4-tuples_on (8-tuples_on BOOLEAN)
r1&Q0 = r. &t1=Op-(P0KeyExTemp(SBT,m,m*$1,Q0))) &
         =i &i   holds
      ex P be Element of 4-tuples_on (8-tuples_on BOOLEAN),
      Q be Element of 4-tuples_on (8-tuples_on BOOLEAN)
        it.5 = <* <*0,0,01*>    then Keyi1=(eyExpansionSBT).(ey) 
     t.(+)=Op-WXOR(P,eyExTemp(SBT      ment (- (8tuples_onBOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      0+ <=7+m by XREAL_1:6;
      then
MMLT47M:1m< 4*(+m)by :;
      reconsider N2 = (4*(7+m) div m )+1 as Nat;
YY1:for being Nat  1 < k & k < N2
      for s being Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
      ex y being Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
      st PP[k,s,y]
      ,0,,0*><0000><*,00>*>      [,,y]
        let k be  it9=< <0001><1,0,,*,<0000><000,0*,
         1<  & k <N2;
        let s be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
          it.10 = *<*,0,,*><011,*><00,,*><*,,,0>java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
ex,Qbe Element  -tuples_on (tuples_on BOOLEAN)
        st P = s.($1+1) & Q = $2 &
        $3 = Op-WXOR(P,KeyExTemp(SBT,m,m*k+$1,Q));
inm-4tuples_on(tBOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
         (8-tuples_on BOOLEAN)*
        st s = v & len v = m;
        then
QQ3:   s =  m FINSEQ_1:def 3;
XX1:    for i then reconsiderthen
       z of      java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 64
        ex w being Element of (4-tuples_on (8-tuples_on BOOLEAN))
        st PX[i,z,w]
        proof
               PP6 =< *0,0,,*^<0,,1*,<0000><0,,*,
          assume
AA1Element of 4-tuples_on(-tuples_on BOOLEAN) P1,2,;
          let     reconsider  =< <0,00><0,10><*000><000 st key. = s  s = 4;
          1 <= i+1 & i+1 <= m by NAT_1:13,AA1;
           + inSeg m;means
          then s of 4-    reconsider PP8 *<,0*<01,0,00,0^00,*,
 seq.Nr in rng seq by FUNCT_1:3;
Elemento -    then reconsider seq10 = seq java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
          reconsider Q = z as Element of 4-tuples_on (8-tuples_on BOOLEAN);
          Op-WXOR(P,KeyExTemp(SBT,m,m*k+i,Q)) is
          Element of (4-tuples_on (8-tuples_on BOOLEAN));
          hence thesis;
        endjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
    ASQ
        then s.1 in rng s by FUNCT_1:3;<0,000><0,,0*><*,,,><*0,,,* >as
        then reconsider P0 = s.1 as
of4- (-tuples_onBOOLEAN;
        m in dom s by AS,QQ3;
        then s    w=(K
       reconsider  =s.java.lang.StringIndexOutOfBoundsException: Range [32, 1) out of bounds for length 33
        Element of 4-tuples_on (8-tuples_on BOOLEAN);
        reconsider A0 = Op-WXOR(P03inSeg5;
        Element of 4-tuples_on (8-tuples_on BOOLEAN);
        consider y being FinSequence java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 36
        that
A2:     len y = m    then
        i < m holds PX[i,y.i,y.(i+1)] from RECDEF_1:sch 4 (XX1);
        y in (4-    ex KeyNr be Element4(tuples_on8)
        then y in m-tuples_on (4-tuples_on (8st =((SBTm)())7m) &
        hence thesis by AS,A2;
      end;
      consider z being
      FinSequence of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) such that
A2    or=0 &kbe   = java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
      k < N2 holds PP[k,z.k,z.(k+1)] from RECDEF_1:sch 4 (YY1);

      ex i,j be Element of NAT,
      zi be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
      st (($1 mod m) <> 0 implies i = ($1 div m)+1    then
      (($1 mod m) = 0 implies i = ($1 div m) & j = m) & zi = z.i & $2 = zi.j;
 Nat  in 4+)
      ex w being Element of (4-tuples_on (8-tuples_on BOOLEAN)) st Q0[ then     i1 
      proof
be;
        assume
A1:     k  =((,).Key))).(7+m) &
QQ1:    1 <= k & k <= 4*(7+m) by java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 8
        then
:div <(*7+))div  byNAT_224;
       ;
        suppose
C1:       (k mod m) <> 0;C1:       (k mod m) <> 0A1,FINSEQ_1: 7
          reconsider j = (k mod m) as Element of NAT;
           i=( div5  byFINSEQ_1:ef ,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
          1 <= i & i     exKeyi java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 72
          then i in Seg N2;
          then i in dom z by A2,FINSEQ_1:def 3;
          then z.i in rng z by FUNCT_1:    
          hen    (InvSubBytes(SBT)*).java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 76
Element  4(java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 68
          inm-(tuples_on(- BOOLEAN));
          then ex v be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
          st zi = v & len v = m;
          then
Q0:       dom zi = Seg m by FINSEQ_1:def 3;
          1 <= j & j <= m by C1,INT_1:58,AS,NAT_1:14;
           jin  zi  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
          then zi.j in rng zi by FUNCT_1:3;
          then reconsider w = zi.j as
Element 4- (-uples_on);
          ((k mod m) <> 0 implies.=PP15;
          k mod     KeyibeElementof4tuples_on4-tuples_on BOOLEAN))
          w = zi.j by C1;
          hence  uniqueness
        end;
             
C2by      of4-4    1= **00*><,,,*<0,*^*000,
reconsider    asElement of NAT ORDINAL1def 12;
          reconsider i = (k     R1.  *<00,0,0*^00,*,*,,,0><0000       [
           244(-BOOLEANjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
          (k div m)+0 <= ((4*(7+m)) div m)+1:  <*0,00,,*<,0,ex,E8 =
           iinSegN2  QQ3;
          then i in dom z by A2,FINSEQ_1:def 3;
          then z.i in rng z java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
          then reconsider zi = z.i as
          Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))holds  keyij Element*,,0*>* &
          zi in m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
          exbeof4tuples_on(-uples_on BOOLEAN)
          zi= v     ;
           
:dom  C1      ;
          j in Seg m by<0000><,,,*,*,,,*^*0,0>    ndjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
          then zi.j in rng zi by Q0,FUNCT_1:3;
          then reconsider w = zi.j as
          Element of (4-tuples_on (8-tuples_on BOOLEAN));
          (k m >then
          XX1:1=&  by   2 *<,00^*00,*,0,*<0,,0>java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
           = zi.by C2
          
        end;
      end;
      consider u being
      such that
:tF1,F2 Function :--java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 78
      Q0k.  : 5    4-tuples_on(        Keyi=((,)().i1 java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
      4*(<0000A:for text,key   --tuples_on 8-
then
=4*7m         P2X1;
u (-(-BOOLEAN))  11;
      then u in (4*(7+m))-tuples_on ( ((.text,)i.j = Op-XOR(textij,         .i1  +)
      by YY4;
      then reconsider u as
      Element of (4end;
      take u;
LX3:  for i be     for ibeNat  EQi]from : 2(    (F2.(ext,ey)i)j=Op-textij,keyij)
      proof
        et    hence    y141,;
        assume k < m;
        then
:1< 1 + =mN11AT_113java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
then =kjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 34
        then consider    00holds CFunc.java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 40
         Element m-tuples_on(tuples_on 8thus ((F1.(text,key)).i).j = ((F2.(text,key)).i).j A5java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
        that
 i =(k+)  m)+1 &
  j = (1  m) & ((+)modm)=implies
        i = ((k+1) div m) & j    61
        pert
        suppose
C1:       ((k+1) mod m) <> 0;
C11:      (k+1) < m
          proof
            assume not (k+1) < m;
            then (k+1) = m by XXREAL_0:1,LX31;
 contradiction NAT_D:25C1;
end
           (k+1) div m = 0 by thus(.M)()=(M)output:java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
hence u.(k+1)    by FUNCT_261
;
        suppose
(+  )=0;
          (k+1) = m
          proof
            assume not (k+1) = m;
            then k+1 < m by LX31,XXREAL_0            then k+1 < m
            hence contradiction by NAT_D:24,C2;
          end;
          hence    [k]
        end;
      end;
      for k be Element of NAT st m <= k & k  mi be Nat,w      
      ex P be Element of (4-tuples_on ( x in 4-tuples_on (8-tuples_on BOOL);
java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 55
stP=u(km+1)   = u.k  tuples_on ) et  java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 15

        let k       SBT.(xk) iof-
        assume
AS1:    m <= k & k consider(SBT*java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 68
        then 1 <= k & k P3 domp=Seg 4&  bebeNat st k in Seg 4 holds
        then k in Seg (4*(7+m));
        then consider i,j be Element of NAT,
nt m-tuples_on4tuples_on(-BOOLEAN)
        such that
LX34:   ((k mod m) <> 0 implies i = (k div m)+1 & j = k mod m) &
d)    k )   )&=. java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
end
NLX32:  1 <= k+1 & k+1 <= 4*(7+m) by AS1,NAT_1thenp -java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 48
        1in(*7m);
        then consider i1,j1 be Element of NAT,
         -java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 73
        such that
NLX34:  (((k+1) mod m) <> 0  ()  
        j1 =        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        j1 = m) & zi1 = z  proof
        reconsider km0 = k(4tuples_on(-)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
reconsiderkm1    eing of(4-uples_on(tuples_on )
1m < *7m-  XREAL_1;
then A: iElement   . = SBT.(x.);
        then km1 in Seg (4*(7+m));
        then consider i2, be  java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
        zi2 be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
        such that
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        ((km1 mod m) = 0 implies i2 = (km1 div m) & j2 = m) &
        zi2 = z.i2 & u.km1 = zi2.j2 by YY3;
         ;
        suppose
C1:       (      /m< 10
          reconsider i0 = k div m as Element of NAT;
DD1:      ((4*(7+m)) div m)+0 < ((4*(7+m)) div m)+1 by java.lang.StringIndexOutOfBoundsException: Range [0, 62) out of bounds for length 8
          k div m <= (4*(7+m)) div m by AS1,NAT_2:24;
          then 1 <= i0 & i0 < N2 by DD1,XXREAL_0:2,AS,NAT_2:13,AS1;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
theoremLAST03:
C16:      r = z.i0 & t = z.(i0+1) &
ex,   -  or   ,
          st P0 = r.1 & Q0 = r.m & t.1 = Op-WXOR(P0,KeyExTemp(SBT,m,m*i0,Q0)))
&  be  LTT5,:
          ex P be Element java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 14
           Elementof  dkeyi,ekeyi be Element oftuples_on(4        java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
          st P = r.(n+1) & Q = t.n &
         .+) -Ke tiof-java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 75
,LX34C1N14java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
          then consider P be Element of 4-tuples_on  4tuples_on(-BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
          Q be Elementst   &  =;
:P=r.+1  Q =t. &
          t.(j+1) = Op-WXOR(P,KeyExTemp(SBT,m,i0*m+j,Q)) by C16;
          per cases;
          suppose
:k)>
         NLX34NC1)T)is
.1  .+),,       k   FINSEQ_1def Ahence 
:=k1-;
LC12:       i2 = ((k+1)((m.key8) A=(w)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
.byC1
LC13     A being Elementof(tuples_on 8tuples_on 
C19        .m1  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
             (,).)   s      -
C22:        kC22:        k 8java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
            thus ex P be Element of (4-tuples_on (8-tuples_on BOOLEAN)),
            Q be Element of 4-tuples_on (8-tuples_on BOOLEAN)
            st P = u.((k-m)+1) & Q = u.k &
            .1  -PSBT,k)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
             C19
          end;
          suppose
MC1:        ((k+1) mod m) = 0;
NC13:       j1 = m-1+1 by NLX34,MC1
. +1 ASXLMOD02XMC1;
C21    take java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
C22X:       km1 = (k+1)-m;
LC12:       i2 = ((k+1) div  Q beof4-tuples_on(tjava.lang.StringIndexOutOfBoundsException: Range [50, 42) out of bounds for length 51
              .=  it.)(+2 java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 68
              .= i0;
C19:        u.(k-m+1) = r.(j+1m  java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
C22:        k = i0*m+j by AS,INT_1:59,LX34,C1H1.  -(sj,.)by 
            thus ex P be Element of (4-tuples_on (8-tuples_on BOOLEAN)),
Qb of4(8-java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
               (km+   =.k&
            u.(k+1) = Op-WXOR(P,KeyExTemp(SBT,m   =(()KeyNr
 ,,C16C1ASm= m   8&  (SBTm)().&
          endekeyi=
        end;
        suppose
C2  (+)tuples_on(-tuples_on4- 8tuples_on ))java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
DD1:      ((4*(7+m)) div m)+0 < ((DD1: ((4*(7+m)) div m)+0 < ((4
          k div m <= (4*(7+m)) divLMMLT47M: 1* < *7m)by:;
          then 1 <= i & i < N2 by DD1,XXREAL_0:2,C2,LX34,AS,NAT_2:13,AS1;
           r
          Element of m-tuples_on       s beingElementof m-(tuples_on(8-tuples_on BOOLEAN)
          such that
C16:      r = z.i & t = z.(i+1) &
          (ex P0,Q0 be Element of 4-java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 38
           ekeyi=p.(en)-7m+1)by,FINSEQ_5:,B1
          & for n be Nat st 1 <= n & n < m holds
          ex P be Element of 4-tuples_on (8-tuples_on BOOLEAN),
          Q be Element of 4-tuples_on (8-tuples_on BOOLEAN)
          st P = r.(n+1) & Q = t.n &
R2 <0011>is   (-BOOLEAN)by ,X0X1
NC1XR3: *,,,*is (tuples_on BOOLEAN)by ,,X1
            .= 1 by NAT_D:14,AS;
C21:      u.(k+1) = t.1 by NLX34,NC1X,AS,XLMOD01,C2,LX34,C16;
C22X:     km1 = (k+1)-m;
LC12:     i2 Element of-tuples_on 8tuples_on   P1,P2,LMGSEQ16;
           . iby ,XLMOD01,NC1X,C2,LX34;
:ukm1r by LLX34X,,LC12,NC1X;
C22:      k = (k div m)*m+(k mod m) by AS,INT_1:59
            .= i*m by C2,LX34let be  Element  ( OOLEAN ,3,java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
          thus ex P be Element:dtextij  (java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 71
          Q be Element of 4-tuples_on (8-tuples_on BOOLEAN)
          stP=u((k-)+)&Q    Element of 4-tuples_on (-tuples_on BOOLEAN)by ,P4,;
          u        defpred XNat,set,et means
          by C19,X34,C21,C22;
        end;
      end;
      hence P0[x,u] by LX3;
    end
    consider t (-java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 70
    4*(m)  Keyi1,KeyNr be ElementK  4java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 75
    such that
A2: for x being Element : Q0   .1= &Q0.;
   holds[        end;
    take        1indom s by AS,QQ3java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    thus thesis by A2;
  end;
  uniqueness
  proof
    let H1,H2 be Function of m        then. in  sbyFUNCT_13
  AddRoundKey.otextKeyi1)  ShiftRows*ubBytes(    then
    
AA1: Key beElement P0K(BT,*Q0)
     be   NATsti m holds consider y FinSequence 4tuples_on(-
    &foribe Element of stmA2     len =  y1=Ao m=)fortheorem java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
exPbeElement of 4-uples_on (R3:.   by F:7
QbeElementof4tuples_on(tuples_onBOOLEAN
    st P = (H1.Key).((i-m)+1) & Q = (H1.Key).i &
    (H1.Key).(i+1) = Op-WXOR(P,KeyExTemp(java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 22
    assume
AA2 Element  m4--BOOLEAN)
    holds (A2        z1=x or N2  )&for k  st 1 <k&
    fori lementofNAT stm<i&i<7m holds
      Q0[t,set
   beElementof - (8- BOOLEANjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    st P = (H2.Key).(( .(ext, java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
    (H2.java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
be
Element m-(4-        ;
      H.input) ((7+)-C2:(modm) ;
     
            reconsider= ( divm asElement of ;
      st (H1.input) = s & len s = (4*(7+m));
      reconsider H1i = (H1.input) as
      Element of (4-tuples_on (8-    (i. ,,:java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
      (H2.input) in (4*(7+m))-tuples_on endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      then
XX2:  ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
      st (H2.input) = s & len s = (4*(7+m));
      reconsider H2i = (H2.input) as
       of    m-(java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 67
      []means
      (m <= $1 & $1 <= 4*(7+m)) implies for k be Element of NAT
      st 1 <= k & k <= $1 holds (H1dKeyi=((,)K).7mjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
PN0:  PN[0];
PN1:  for i be Nat sttext Element4tuples_on4( )
      proof
        let i         let i be,,,*^*,,1,*,<00,00>*,0,00>KeyidKeyi 44-tuples_on8tuples_onBOOLEAN)
        
A1:     PN[i];
        assume
A2:     m <= i+1 & i+1 <= 4*(7+m);
        per cases;
        suppose
 m +
*,,,*^*,,,0><0,0t i  +1;
          P2 =(Km)().7+-) 
          proof
            let k be Element of NAT;
            
B1:         1    8 =endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
            k-1 < k by XREAL_1:  form beNatjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
            then0000><0000><*00,* >
B2:         k-1 < m by C10,B1,XXREAL_0
            reconsider k1 = k-1 as ElementholdsAES-(,-ENCtjava.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 15
            thus (H1.input).k = input.(k1+1    beElement  4tuples_on(- 8tuples_onBOOLEAN);
              =H2.input) by,AA2;
          end;
        end;
        suppose m <> i+1;
          then
C10X:     m < i+1 by A2,XXREAL_0:1;
          i < i+1 by XREAL_1:29;
          then
C11Z:     i < 4*(7+m) by          then i in Seg N2 by QQ3;
          thus for k be Element of NAT st 1 <= k & k <= i+1 holds
          (H1.input).k = (H2.input).k
          proof
            let k be Element of NAT;
            assume
 <=i+;
            then reconsider k1 =           in-(- 8 ))java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
            per cases;
            suppose
C14:          k1 < m;
              thus (H1.input).k = input.(k1+1) by C14,AA1
                .= (H2.input).k by C14,AA2;
            end;
           suppose
C15:          m <= k1;
              k-1 <= i+1-1 by C13,XREAL_1:9;
              thenN1: 0 <7+1by :java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
C16:          m <  func KeyExTemp(BTm, - Elementof(-tuples_on (- BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
              then consider PP1 be
              Element of (4-tuples_on (8-tuples_on BOOLEAN)),
 Element of4tuples_on (      holds Q0[,]from
:eseq=Nrjava.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
              (H1.input).(k1+1) = Op-WXOR(PP1,KeyExTemp(SBT,m,k1,QQ1)) by AA1;
              consider PP2 be Element of (4-tuples_on (8-tuples_on BOOLEAN)),
              QQ2  1  java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 77
)(+)&QQ2=(input. &
              (H2.input).(k1+1) = Op-WXOR(PP2,KeyExTemp(SBT,m,k1,QQ2))
               / =by72;
C190LTT4 / NAT  INT_1,
         kbe ofi/ < 10
C191:         1 <= k1 & k1 <= i by C15,AS,XXREAL_0:2;
C24X:         0 <= k1-m by C15,XREAL_1:48;
              then
y XREAL_1:;
              k1-(m-1) <= k1 by AS,XREAL_1:43;
              then
C25:          1 <= (k1-m)+1 & (k1-m)+1 <= i by C190,XXREAL_0:2,C25X;
              java.lang.StringIndexOutOfBoundsException: Range [36, 24) out of bounds for length 75
C21:          
              thus (H1.input).k = ((Keyi1of-java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 72
              by C21,C17,C18,C191,A2,C10X,NAT_1:13,A1;
            end;
        then
        end;
      end;
L10:  for i be Nat holds PN[i] Q0:   i/m in Seg 10by AS,LTT2,TT4;
L1:   now let i      reconsider j = i/m  st  = ((KeyExpansion(,)).(ey))1&
        assume
A1:     m <=i & i <= 4*(7+m);
        1 <= i & i <= i by AS,A1,XXREAL_0:2;
        hence (H1.input).i = (H2.input).i by L10,A1;
      endjava.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
     nowleti0java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        assume
:1< i0 & i0< lenthen Rcon=  10  :   dseq(+ 
        then reconsider i =  (InvSubBytes()InvShiftRows*(CFunc").AddRoundKey.dseq.,Keyi) &
        now per cases;
        suppose
C1:       i0  st KeyNr = (Rev((KeyExpansion(SBTm)())).7+)&
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
          hen
C11:      i < m by C1,XXREAL_0:2;
          thus H1i.i0 = input.(i+1) by C11,AA1
            .= H2i.i0 by C11,AA2;
        end;
        suppose
C3:       m < i0;
          i+1 in Seg len H1i by P13;
          hence H1i.i0 = H2i.i0 by L1,C3,XX1,P13;
        endjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
      end;
      hence   AS eyi1 of -(4tuples_on (-tuples_on))
    end;
    hence H1.input = H2.input by XX1,XX2,FINSEQ_1:def 18;
  end;
   H1 =H2 byFUNCT_2:java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
end;
end;

definition
  let SBT;
  let m be Nat;
  func KeyExpansion(SBT,m) ->
  Function of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  (7+m)-tuples_on(4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))) means
  for Key be Element m-uples_on4tuples_on (- BOOLEAN)holds
  ex w be Element of (4*(7+m))-tuples_on (4-tuples_on (8-tuples_on BOOLEAN))
  st w = (KeyExpansionX(SBT,m)).Key & for i be Nat st i < 7+m
  holds (it.Key).(i+1) = <*w.(4*i+1),w.(4*i+2),w.(4*i+3),w.(4*i+4)*>;
  existence
  roof
    defpredP0[lement of m-tuples_on(4- 8tuples_on ),
    Element of (7+m)-tuples_on(4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)))]
    means
    ex w be Element of (4*(7+m))-tuples_on (4-tuples_on (8-tuples_on BOOLEAN))
    st w = (KeyExpansionX(SBT,m)).$1 & for i be Nat st i < 7+m holds
    $2.(i+1) = <*w.(4*i+1),w.(4*i+2),w.(4*i+3),w.(4*i+4)*>;
A1: for x being Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    ex z be
    Element of (7+m)-tuples_on(4-tuples_on(4-( ibe Element of  st m<   i<4(+m) holds
    st P0[+)divtuples_on 8tuples_on BOOLEAN)
    proof
      let x be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN    $.i1  -(P,KeyExTemp(SBT,m,i,Q)));
      reconsider w =(KeyExpansionX(SBT,))x as
      Element of (4*(7+m))-tuples_on (4-tuples_on (8-tuples_on BOOLEAN));
      w in (4*(7+m))-tuples_on  $1 <Nr  dseq(11  .N-$1);
      then
XX1:  ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
      st w = s & len s = (4*(7+m));
      reconsider w0 = w as
      Element of (4-tuples_on (8-tuples_on BOOLEAN))* by XX1;
      reconsider m7 = 7+m as Element of NAT by ORDINAL1:def 12;
      reconsider m47 = (4*(7+m)) as Element of NAT by ORDINAL1:def 12;
      defpred P[Nat,set] means
AT st =11&
      $2 = <*w.(4*n+1),w.(4*n+2),w.(4*n+3),w.(4*n+4)*>;
P1:   for k be Nat st k in Seg m7
      ex z being Element of 4-tuples_on (4-    =eseq()
      st P[k,z]
      proof
        let     st P0,java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        assume k in Seg m7;
  then
ZZ1:1 < k  k<  by FINSEQ_1:1;
        then       for i be Nat st 1=   
ZZ3:    4*(n+1) <= 4*m7 by ZZ1,XREAL_1:64;
java.lang.StringIndexOutOfBoundsException: Range [28, 3) out of bounds for length 34
:4*n1< *+4byXREAL_1:;
ZZ8:    4*n+2 <= 4*n+4 by XREAL_1:7;
ZZ9:    4*n+3 <= 4*n+4 by XREAL_1:7;
        4n+ < 4*m7 byZZ7,
        then
X1:     (4*n+1) in Seg m47X11   (+1  A2X:50;
Z10    =4n+  ZZ4,XREAL_1:;
        4*n+2 <= 4*m7 by ZZ8,ZZ3,XXREAL_0:2;
        then
X2:     (4*n+2) in Seg m47 by ZZ10;
ZZ11:   1 <= 4*n+3 by ZZ4,XREAL_1:7;
        4*+<4byZZ9ZXXREAL_0;
        then
X3:     (4*n+3) in ex  beingElement of m-tuples_on(4-tuples_on (8tuples_on BOOLEAN))
ZZ12:   1 <= 4*n+4 by ZZ4,XREAL_1:7;
X4:     (4*n+4) in Seg m47 by ZZ3,ZZ12;
X5:     dom w = Seg m47 by FINSEQ_1:def 3,XX1;
        w.(4*n+1) in rng w by X5,X1,FUNCT_1:3;
        then reconsider w1 = w.(4*n+1) as
                st PX[iz]
        w.(4*n+2) in rng w by X5,X2,FUNCT_1:3;
        then reconsider w2 = w.(4*n          assume
        Element of (4-tuples_on (8-tuples_on BOOLEAN));
        w.(4*n+3) in rng w by X5,X3,FUNCT_1:3;
        then reconsider w3 = w.(4*n+3) as
        Element of (4-tuples_on (8-tuples_on BOOLEAN));
        w.(4*n+4) in rng w by X5,X4,FUNCT_1:3;
        then reconsider w4 = w.(4*n+4) as
        Element of (4-tuples_on (8-tuples_on BOOLEAN));
        reconsider z = <*w1,w2,w3,w4*> as
        Element of 4-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)) by LMGSEQ4;
        z = <*w.(4*n+1),w.(4*n+2),w.(4*n+3),w.(4*n+4)*>;
        hence thesis;
      end;
      consider p being
      FinSequence of 4-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)) such that
P3:   dom p = Seg m7 & for k be Nat st k in Seg m7 holds P[k,p.k]
      from FINSEQ_1:sch 5(P1);
:lenp=by,FINSEQ_1 3;
      p in (4-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)))*
      by FINSEQ_1:def 11;
      then p in m7-tuples_on (4-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)))
      by P4;
      then reconsider p as Element of
      (7+m)-tuples_on(4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)));
      take p;
      now let i be Nat;
        assume i < 7+m;
        then
AA2:    i+1 <= 7+m by NAT_1:13;
        1 <= i+1 by NAT_1:11;
        then i+1 in Seg m7 by AA2;
        then ex n be Element of NAT st n = (i+1)-1 &
        p.(i+1) = <*w.(4*n+1),w.(4*n+2),w.(4*n+3),w.(4*n+4)*> by P3;
        p.i1  *4i+)w(4i3)w(*4>
      end;
      hence thesis;
    end;
    consider I besch4 (;
    (7+m)-tuples_on(4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN            thenk1   LX31,XREAL_01
A2: for x being Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    holds P0[x,I.x] from FUNCT_2:sch 3(A1);
   take I;
    thus thesis by A2;
  end;
  
ojava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
    let H1,H2 be Function of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
    (7+m)-tuples_on(4-tuples_on(4-tuples_on QQ1:1< k& < *(7m by A1,FINSEQ_1: stP  u.(k-m)1)&Q=u&nbsp;&u(+  -WXOR,eyExTemp(BTmk,)
         then
A1: for        per cases;
    ex w be Element of (4*(7+m))-tuples_on (4-tuples_on (8-tuples_on BOOLEAN))
    st w = (KeyExpansionX(SBT         1< k   (k mod ma  AT;
          in 47+)
    assume
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 53
wbeElement 4(+))-tuples_on (-tuples_on (8-tuples_on BOOLEAN))
    st w = (KeyExpansionX(SBT,m)).Key & for i be Nat st i <7+m holds
(Key)(+1)=<w(*+1,.4i+2),.4i+3)w(*i4)>;
now be Elementofm-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
      consider w1 
      (4*(7+m))-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)) such that
P1:   w1 = (KeyExpansionX(SBT,m)).input &
      for i be Nat st i 
      (H1.input).(i+1) = <*w1.(4*i+1),w1.(4*i+2),w1.(4*i+3),w1.(4*i+4)*> by A1;
     java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 31
     4(m))tuples_on(- (8- ))suchthat
P2:   w2 = (KeyExpansionX(SBT,m)).input &
oribe Natsti 7+m holds
      (.)(i+1) = <*w2.(4*i+1),w2.(4*i+2),w2.(*+3,.(4i4*   en1in P1,INSEQ_1def 3java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
      (H1.input) in
  ;
      then
  exs   (-uples_on 4tuples_on 8tuples_on ))java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
      st (H1.input) = s & len s = (7+m);
      (H2.input) in
      (7+m)-tuples_on (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)));
      then
P4:   ex s be Element of (4-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)))*
      st (H2.input) = s & len s = (7+m);
        (kmod m < 0 implies i =(k div m)1 &j =kmod m) &
        assume
 (H1input)
        then i-1 in NAT  thusAES-(,CFuncAES-ENCS, 
        then reconsider i0 = i-1 as Nat;
        i < (7+m)+1 by P3,P5,NAT_1:13;
       java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
P6:     i-1 < (7+m)+1-1 by XREAL_1:14;
        .input).=(H1input)(0+1java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
          .= <*w2.(4*i0+1),w2.(4*i0+2),w2.(4*i0+3),w2.(4*i0+4)*> by P6,P1,P2
          .=  r Element java.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 12
          .= (H2.input).i;
     ;
      hence
      (H1.input) = (H2.input) by P3,P4,FINSEQ_1:def 18;
    end;
    hence H1 = H2 by FUNCT_2:63;
  ;
end;

begin :: Encryption and Decryption

reserve MCFunc for Permutation of
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));

 4tuples_on   beElementofD such 

definition
  let SBT;

java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
  etthesisby         1 <&m1<4*+ by
  let Key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  func AES-ENC(SBT,MCFunc,text,Key) ->
  Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
  :defENC:
  ex seq be FinSequence of (4-tuples_on(4-tuples_on (  r be  of ntuples_on D st 8 =n&8 =n-  16< n&
  st lenseq = 7+-  e Keyi1be Element of
  -4tuples_on (- BOOLEAN)
  st Keyi1 = ((KeyExpansion(SBT,m)).(Key)).1 &
y.text,Keyi1) &
f   < &   +-1
Keyiof(    be empty  be zeroElementofjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  st Keyi = ((KeyExpansion(SBT,m)).(Key)).(ithen1<   i0  DD1XXREAL_02AS,NAT_2:13,S1;
  seq.(i+1) = AddRoundKey.((MCFunc*ShiftRows*SubBytes(SBT)).(seq.i),Keyi)) &
   KeyNr  Element  tuples_on(tuples_on(- BOOLEANElementof-(tuples_on (8-tuples_on ) 
  st KeyNr = ((KeyExpansion(SBT,m)).(Key)).(7+m) &
  it = AddRoundKey.((ShiftRows*SubBytes(SBT)).(seq.(7+m-1)),KeyNr);
e
  suppose
    1+0 < 7+m by XREAL_1:8;
    then
N1: 0 < 7+m-1 by XREAL_1:50;
    then 7+m-1 in NAT by INT_1:3;
 java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 38
ZZ1: (KeyExpansion(SBT,m)).(Key) in
    (Nr+1)-tuples_on(4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)));
SBTm)( Elementof
    (+1-tuples_on(4tuples_on(4tuples_on 8tuples_on ))java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
XX12: ex s be Element of (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)))*
    st kky = s & len s = (Nr+1) by ZZ1;
    defpred P[Nat,set,set] means
    ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)C21:        u.k1 =
    st Keyi = ((KeyExpansion(SBT,m)).(Key)).($1+1) &
    $3 = AddRoundKey.((MCFunc*ShiftRows*SubBytes(SBT)).$2,Keyi);
    1+0 <= 7+m by XREAL_1:7;
    then 1 in Seg (Nr+1);
    then 1 in dom (kky) by FINSEQ_1:def 3,XX12;
    then ((KeyExpansion(SBT,m)).(Key)).1 in rng kky by FUNCT_1:3;
    then reconsider Keyi1 = ((KeyExpansion(SBT,m)).(Key)).1 as
Element  -java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 62
    reconsider I0 = AddRoundKey.(text,Keyi1) as
));
n  X1: for n being NatbyAS,NT_159LX34,1java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    for z being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    holds ex y being Element of 4-tuples_on(4-java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 42
   P,,]
    proof
      bejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      assume
X11:  1 <= n & n < Nr;
      let z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
X111:n < + XREAL_1        .(k+)=t(++1)by,,java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 61
      0+1 <= n+1 by XREAL_1:7;
      then +1inS(Nr)byX111;
       n+in   FINSEQ_1:def3,X12;
then KSBT,)(Key).n1 nkkyby :3;
   (eyExpansion(,m)().n) 
      Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
y =AddRoundKey((CFunc**z,)as
      Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
       ;
            Q Element of 4tuples_on (8-tuples_on BOOLEAN)
    end;
   java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 19
    FinSequence of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) such that
X2: len seq = Nr & (seq.1 = I0 or Nr = 0) &
    for i be Nat st 1 <= i &       thenconsideri2,2be lement  NAT,
    fromsuppose
     inSeg by FINSEQ_1:,N1
    then
    Nr in dom seq         zi2 =z.2 &ukm1=zi2.j2 byYY3
    then seq.Nr in rng seq by FUNCT_1:3;
   then  seq10 seqNras
ples_on (8tuples_on BOOLEAN));
    Nr+1 in Seg (Nr+1) by FINSEQ_1:3;
    then Nr+1 in dom (kky) by FINSEQ_1:def 3,XX12;
    then ((KeyExpansion(SBT,m)).(Key)).(Nr+1) in rng kky by FUNCT_1:3            <=i0&i0<N2 by DD1,XXREAL_0:2
    then reconsider KeyNr = ((KeyExpansion(SBT,m)).(Key)).(Nr+1) as
    Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
reconsider w  AddRoundKey.(ShiftRows*ubBytes (  , be Elementof -tuples_on (8-uples_on BOOLEAN)
    Element of 4-          st P0 = r.1 & Q0 . &t.1=Op-P0,SBT,mm*i0)))
*SubBytes()(.Nr,KeyNr)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    java.lang.StringIndexOutOfBoundsException: Range [27, 9) out of bounds for length 33
  end;
  uniqueness
    8  =l    be -
    let s1,s2 be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    1+0 < 7+m by XREAL_1:8;
    then 0 < 7+m-1 by XREAL_1:50;
java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 33
    then reconsider Nr =+-1asNat;
    
A1: ex seq be FinSequence of (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)))
    st len seq =ukm+1=r+)
    (ex Keyi1 be C22:        k = i0*m+j by AS,INT_1:59,LX34,C1;
    st Keyi1 = ((KeyExpansion(SBT,m  r be  ofn-;
    seq.1 = AddRoundKey.(text,Keyi1))             java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 61
 beof4tuples_on4tuples_on(BOOLEAN)

      -Left-1:       ((k1 m  0;
    ex KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on= j+ by AS,MC1,java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    st KeyNr = ((LC12:       i2 = ((k+1div m)-1 byMC1,LMOD03,AS,
    s1 = AddRoundKey.((ShiftRows*SubBytes(SBT)).(seq.(7+m-1)),KeyNr);
    C19.k-1  r(1byLLX34,,NLX34LC12C16NC13;
: A2: ex    Q Element of4tuples_on (- )
               P =r.(+1) & Q = t.n &
s_on(4tuples_on 8-uples_on BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
         =(KeyExpansion(SBT,m)).(ey). java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    seq.1  8<n-    +16&p =    =n-    +   =n &8=n-
    holds ex Keyi be Element of 4-            byeftOpRightrm,8),Op-Left(OpRightrl,),
    st Keyi = ((KeyExpansion(SBT,mC21:     u.(k+1) = t.1 by NLX34,NC1X,AS,XLMOD01,C2,LX34,C16;
    seq.(i+1) = AddRoundKey.((MCFunc*ShiftRows*SubBytes(SBT)).(seq.i),Keyi)) &
    ex KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
)).+)&
    s2 = AddRoundKey.((ShiftRows*SubBytes(SBTthen =i < DD12,,LX34,,NAT_2:,;
    consider seq1 be
FinSequence (4-(4-tuples_on(-tuples_onBOOLEAN)) such that
P1: len seq1 =             .= i  ,NC1XC2java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
   e Keyi1 beElement of-tuples_on(4-tuples_on (8-            . i* by,java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    st Keyi1 = ((KeyExpansion(SBT,m)).(Key)).1 &
    seq1.1 = AddRoundKey.(text,Keyi1)) & (for i be Nat st 1 <= i & i < Nr
    holds ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    st Keyi = ((KeyExpansion(SBT,m)).(Key)).(i+1) &
    seq1.(i+1) = AddRoundKey.((MCFunc*ShiftRows*SubBytes(SBT)).(seq1.i),Keyi))
    & ex KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    st KeyNr = ((KeyExpansion(SBT,   .(-)+1)C16:r=z.  (+ 
    s1 = AddRoundKey.((ShiftRows*SubBytes          & forn be Nat st 1 < n & n   
seq2java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
FinSequence (-          st P = r.(n+1) & Q = t
P2: len seq2 = Nr &
    (ex Keyi1 be Element of 4-tuples_on(4-tuples_on (8-tuples_onNC1X:(k1  )=(0 Nat)1 m  endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    st Keyi1 = ((KeyExpansion(SBT,m)).(Key)).1      .k1)  .  NC1X,,XLMOD01C2,;
    seq2.1 = AddRoundKey.(text,Keyi1)) & (for i be Nat st 1 <= i & i < Nr
    holds ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    st Keyi = ((KeyExpansion(SBT,m)).(Key)).(i+1) &
    seq2.(i+1) = AddRoundKey.((java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 27
    &  letr be Element of 128- ;
    st KeyNr = ((KeyExpansion(SBT,m)).(Key)).(Nr+1) &
    s2 = AddRoundKey.((ShiftRows*SubBytes(SBT)).(seq2.(Nr)),KeyNr) by A2;
    defpred EQ[Nat] means
    1 <= $1 & $1 <= len seq1 implies seq1.$1 = seq2.$1;
Q50: EQ[0];
Q51: for i be Nat st EQ[i] holds EQ[i+1]
    proof
      let i be Nat;
      assume
  EQi;
  assume 1<  +1<  eq1;
      then
Q54:  1-1 <= i+1-1 & i+1-1of -java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 59
Q550: (len seq1)1 =(seq1)0byjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 49
     per casesjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      suppose
C1:     i = 0;
        thus seq1.(i+1) = seq2.(i+1) by C1,P1,P2;
      end;
      suppose
Q560:   i <> 0;
        Nr-1 < Nr-0 by XREAL_1AA2  Key mjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 73
        then
XX1:    1 <= i & i < Nr by Q560,NAT_1:14,P1,Q54,XXREAL_0:2;
        
Q60:    ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
        st Keyi =  (Key.i)=Op-XOR(PKeyExTempSBTmiQ);
        AddRoundKey.((MCFunc*ShiftRows*SubBytes(SBT)).(seq1.i),Keyi) by P1;
        ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
        st Keyi = ((KeyExpansion(SBT,m)).(Key)).(i+1) & seq2.(i+1) =
        AddRoundKey.((MCFunc*ShiftRows*SubBytes(SBT)).(seq2.i),Keyi) by P2,XX1;
ence seq1.+1 = seq2.(i+1)
        that
      end;
    end;
    for i be Nat holds EQ[ Element (- (-tuples_onBOOLEAN)*by XX1;
    hence s1 = s2 by P1,P2,FINSEQ_1:14;
  end;
end;

      -(-(r)8,LeftRight56,)*;
  let SBT;
  let MCFunc;
  let      pLeftOp-Right(,)8,Left(OpRight(88,)*;
  let text be Element of 4-tuples_on(4-tuples_on (8-    set  =< Op-Left(-Right(,)8,Op-Left(p-(,)8),      proof
      Op-Left(Op-ightr)8,-Rightr, >
   AESDEC,,,)-java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
  :defDEC:
  ex seq be FinSequence of (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)))
  st len         let  be Nat;
  (ex Keyi1 be Element   proof
 = (,).). &
  seq.1 = (InvSubBytes(SBT)*InvShiftRows).(AddRoundKey.(text,Keyi1))) &
  (for i be Nat st 1 <= i & i < 7+m-1 holds
  ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  st Keyi = (Rev((KeyExpansion(SBT,m)).(Key))).(i+1) &
  seq.(i+1) =
  (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(AddRoundKey.(seq.i,Keyi))) &
  ex KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  st KeyNr =Rev(eyExpansion(,).Key)).7+m)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  it = AddRoundKey.(seq.(7+m    setT  T;
  existence
  proof
    1+0 < 7+m by XREAL_1:8;
    then
N1: 0 < 7+m-1 by XREAL_1:50;
    then +-1in byjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
    then reconsider Nr = 7+m-1 as Nat;
 Rev(KeyExpansionSBT,m nthen reconsider T as Element of
    (Nr+1)-tuples_on(4-tuples_on(4-tuples_on    4-tuples_on(4-tuples_on (-uples_on BOOLEAN)) by FINSEQ_2:92      = H2Key.(im+1  =(H2.Key).i &
    reconsider kky = Rev((KeyExpansion(SBT,m)).(Key)) as Element of
        of -tuples_on(4-tuples_on 8tuples_on BOOLEAN));
XX12: ex s be Element of (-tuples_on(4tuples_on (8-tuples_on BOOLEAN)))*
    st kky = s & len s = Nr+1 by ZZ1;
    defpred P[Nat,set,set] means
    ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    st Keyi = 
    $3 = (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(AddRoundKey.($2,Keyi));
    1+0 <= 7+m      Element of (4-tuples_on (8-tuples_on BOOLEAN))* by XX2;
    then 1 in Seg (Nr+1);
    then 1 in dom (kky) by FINSEQ_1:def 3,XX12;
    then (Rev((KeyExpansion(SBT,m)).(). in rngkky by:3;
     reconsider Keyi1=(ev((SBT,m).Key))1as
    Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    reconsider1 <k XREAL_1:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    as Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
X1:fornbeing Natst  =n &n <Nr
    for z being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    holds ex y being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    st P[n,z,y]
    proof
      let n be Nat;
      assume
X11:  1 <= n & n < Nr;
      let z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
X111: n+1 <= Nr+1 by XREAL_1:7,X11;
      0+1 <= n+1 by XREAL_1:7;
      then n+1 in Seg (Nr+1) by X111;
      then n+1 in dom (kky) by FINSEQ_1:def 3,      then n+1 in dom (kky) by FINSEQ_1:def 3,XX12
 (((m)().+)in 3
      then reconsider Keyi = (Rev((KeyExpansion(SBT,m)).(Key))).(n+1) as
      Element of C10:     m < i by,XXREAL_0:;
      reconsider y =
      (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(AddRoundKey.(z,Keyi)) as
      oftuples_on(tuples_on (8t );
      take y;
       P[n,,]java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    end;
considerseqbe
    FinSequence of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) such that
X2          e Element of(-tuples_on (8-tuples_on BOOLEAN))*st p = v &
    for i be Nat st 1 <= i & i < Nr holds P[i            -1   XREAL_1:4;
1sch(X1);
 N;
then   domassume
    seqNrin seq:;
    then reconsider seq10 = seq.Nr as
    Element of 4-tuples_on(4-tuples_on (8per cases;
    Nr+1 in Seg (Nr+1) by FINSEQ_1:3 for  be1<    =   . .
    then Nr+1 in dom (kky) by FINSEQ_1:def 3,XX12;
    then (Rev((C10X:m < 1 A2,XREAL_0:;
    then reconsider KeyNr = (Rev((KeyExpansion(SBT,m)).(Key))).(Nr+1) as
    Element C11Z:     i < *(+)by,:;
    reconsider w = AddRoundKey.((seq10),KeyNr) as
Elementof4tuples_on(-tuples_on 8tuples_onBOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    w = AddRoundKey.(seq.Nr,KeyNr);
    hence thesis by X2,XREAL_1:8;
  end;
  uniqueness
   OpLeft(pRight(16,)Op-(OpRight(,24,)*> &
-tuples_on );
    1+0 < 7+m by XREAL_1:8;
    then 0 < 7+m-1 by XREAL_1:50;
    then 7+m-1 in NAT by INT_1:3;
    then reconsider Nr   .  *Op(-java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 64

A1: ex seq be FinSequence of (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)))
    st    7+-&
    (ex Keyi1               th   
st=R((eyExpansion(SBT,m)).(Key))).1 &
=(nvSubBytesSBT)InvShiftRows)A.(ext,))&
      . *LeftOpRightr,)8OLeftOp(r,)8,
    ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    st Keyi = (Rev((KeyExpansion(SBT,m)).(Key))).(i+1) &
    seq.(i+1) =
    (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(AddRoundKey.(seq.i,Keyi))) &
    ex KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
ansion(BT
     ((+-,KeyNr)
    assume
A2: ex seq be FinSequence of (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)))
C25           <k-m)1&(-+ =i XXREAL_02;
    (xKeyi1 Element of -4tuples_on 8-BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
    40=8  48  32+16&56=3224java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    seq.1 = (InvSubBytes(SBT)*InvShiftRows).(AddRoundKey.(text,Keyi1))) &
    (for i be Nat st 1 <= i & i < 7+m-1 holds
    ex Keyi be         assume
    st Keyi = (Rev((KeyExpansion(SBT,m)).(Key))).(i+1) &
    seq.(i+1) =
    (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(AddRoundKey.(seq.i,Keyi))) &
      java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 6
  st KeyNr = (Rev(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 7
        s2 p,q Element of4-(-tuples_on);
    consider seq1 be
    FinSequence of (4-  holds (it.Key).(i+1) = <*w.(4+)w.(*+)w(*i3)w(*)>java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
P1: len seq1 = Nr &
         of(+m-      end
   KeyExpansionSBT,))()1
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 74
    for i beP13:1< java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 32
ex be Element  4-uples_on(-tuples_on (8tuples_on BOOLEAN))    Element of (+m)-tuples_on(p.4= < OpLeft(Op-Right(r,96),),Op-Left(Op-Right(r,104),)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    st Keyi = (Rev((KeyExpansion(SBT,m))      Op-(pRight(,)8,pLeftO-(,120,)* &
    seq1.(+)=
    (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(AddRoundKey.(seq1.i,Keyi))) &
    ex       -O-ightr,,)Op-LeftORight(,)8)* &
    st KeyNr = (Rev((KeyExpansion(SBT,m)).(Key)) Elementof p  < Op-(Right,160,)OpLeftight(r168,)java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
    s1 = AddRoundKey.(seq1.(7+m-1),KeyNr) by A1;
    consider seq2 be
    FinSequence of (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))) such that
P2: len seq2 = Nr &
    Keyi1 Element of uples_on(t(tuples_on BOOLEAN))
    st Keyi1 = (Rev((KeyExpansion(SBT,m)).(Key))).1 &
    seq2            = H2i by,A2java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    (for i be Nat st 1 <= i & i     .3= * Op-eft(Op-(,)8,-LeftOp-Right(,)8,
    ex Keyi be Element of 4-tuples_on(4-les_on(8-BOOLEAN)
    st  =(Rev(eyExpansionSBT,)).Key)).i) 
    seq2.(i+1) =
*CFunc").,)) &
    ex KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN        end;
    st KeyNr = (Rev((KeyExpansion(SBT,m)).(Key))).(7+m) &
    s2 = AddRoundKey.(seq2.(7+m-1),KeyNr) by A2;
    defpred EQ[Nat] means
    1 <= $1 & $1 <= len seq1 implies seq1.$1 = seq2.$1;
Q50: EQ[0];
Q51: for i be Q51: for i be Nat
    proof
      let i be Nat;
      assume
Q52:  EQ[i];
      assume 1 <= i+1 & i+1 <= len seq1ZZ8    4*2 < 4*n4by :7;
      then
Q54:  1-1 <= i+1-1 & i+1        4n1=* ZZ7,:;
:seq1- =(X1     4n1    java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
      per cases;
      suppose
C1:     i = 0;
        thus seq1.(i+1) = seq2.(i+1) by C1,P1,P2;

     
Q560:   i <> 0;
        Nr-1 < Nr-0 by XREAL_1:15;
        
XX1:w.(*n1 inlenv =;
        then
Q60:    ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
        st Keyi = (Rev((KeyExpansion(SBT,m)).(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 46
        seq1.(i+1) =
        (InvSubBytesjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 55
        by P1;
        ex  hence  byA6A7;
        st Keyi = (Rev((KeyExpansion(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 8
        .i+1)=
        (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 10
        by P2,XX1;
        java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
EAL_0:,,60;
      end;
    end;
   ibeNat holds EQ[i]from NAT_1:sch 2(
    hence s1 = s2 by FINSEQ_1:14,P1,P2;
e;
end;

theorem INV01:
  for input be         java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 23
  holds (MCFunc").(it.2 = <* Op-Left(Op-Right)8,java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 29
proof
  let input be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEANp(i1)= <(4n+)w.(4n+2,.  it.3  *Op-Left(Op-r,64,)OpO-(,)8,
  thus (MCFunc").(MCFunc.(input end
    .      hence thesis;
    endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    .= input;
end;

theorem
  for     take      of(4**(+m)-tuples_on 4-uples_on (-tuples_on  it.6 =*Op-(Op-Right(r,),8)pLeft(-Right(,,8)
holds MCFunc.((MCFunc").    Op-Left(Op-Right(r,176),8-OpRightr1)8 *
proof
  let output be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
Func(MCFunc".(output)) = (CFunc*MCFunc))outputby FUNCT_2:5
    .= (id (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)))A1:for    mjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 78
    by FUNCT_2:61
    .= output;
end;

theorem LAST01:
  for m be Nat,
  text be Element-(-Rightr,16)8,-(Op      Op-Left(Op-Right(r,16),8),Op-Left(Op-Right(8BOOLEAN;
  (InvSubBytes(SBT)*InvShiftRows).((ShiftRows*SubBytes(SBT)).text) = text
proof
l  be Natjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  thus (InvSubBytes(SBT)*InvShiftRows).((ShiftRows*SubBytes      Element of (4Left(Op-(,))pOp(,))*java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  (InvSubBytes(SBT)*InvShiftRows).(ShiftRows.((SubBytes(SBT)).    set R5=< Op-Left(Op-Rightr1288O-Op(136)8)java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
  by FUNCT_2:15
    .= (InvSubBytes(SBT)).(InvShiftRows.(ShiftRows.((SubBytes(SBT)).text)))
    by FUNCT_2:15
    .= InvSubBytes().((SBT))Op--r,76,,-Left,)8 >
    .= text by INV07;
end;

theorem LAST02:
      setR8=<OpLeften (.input;
  text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) holds
  (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).
  ((MCFunc*ShiftRows*SubBytes(SBT)).text) = text
proof
   then reconsiderR1 as Element of 4tuples_on (-uples_on BOOLEAN) by Lm1;
  text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  thus (nvSubBytes(SBT)InvShiftRows*(MCFunc")).
  ((MCFunc*ShiftRows*SubBytes(SBT)).text) =
  (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).
  (*.()ext 15
)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    (MCFunc.(ShiftRows.((SubBytes(SBT)).text))) by FUNCT_2:15
    .= (InvSubBytes(SBT)*InvShiftRows).((MCFunc").
    (MCFunc.(ShiftRows.((SubBytes(SBT)).text)))) by FUNCT_2:15
    .= (InvSubBytes(SBT)*InvShiftRows).(ShiftRows.((SubBytes(SBT)).text))
    by    8< -  8 =104 &8 < 256   =256-&
    .= (InvSubBytes(SBT)).(InvShiftRows.(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 15
    by FUNCT_2:15
    .= (InvSubBytes(SBT)).((    then reconsider R4 as Element of (-BOOLEAN)byLm2
    .= text by INV07;
end;

theorem LAST03:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)  let MCFunc;
  Key be Element of   letm  Nat;
dkeyi,  of4-uples_on4tuples_on(8- java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 74
  st (m = 4 or m = 6 or m = 8) & dkeyi = (Rev((KeyExpansion(SBT,m)).(Key))).1 &
  ekeyi = ((KeyExpansion(SBT,m)).(Key)).(7+m)
 (.textekeyi)djava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 59
4tuples_on(-uples_on(-BOOLEAN)
  let m be Nat,
  text be     then reconsiderR6 asElement  4-(8tuples_onBOOLEAN  java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
  key be Element of    ZZ9:4n3< *n4byXREAL_17java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  dkeyi,ekeyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  assume
:( =4 orm=6orm=8  dkeyi=((KeyExpansionSBTm).k)
,m)key)(+)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
     (m.;
  (KeyExpansion   reconsiderR7as of-tuples_on( java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
  (7+m)-tuples_on(4-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)));
  then
B0: ex         .4n+)inrng w by X5,X2,UNCT_1:;
  st (KeyExpansion         of(-tuples_on(-tuples_on BOOLEAN);
  1+0 < 7+m by XREAL_1:8;
  then 1 in Seg (7+m);
  then
B1: 1 in dom p by FINSEQ_1:def 3,B0;
A0: dkeyi = p.((len p)-1+1) by AS,FINSEQ_5:58,B1
    .= ekeyi by B0,AS;
  now let i,j be Nat;
    

         = *,R6R7,*>
A4: etextij = (text.i).j & P4:   len p = m7 by P3,FINSEQ_1:d
    ((AddRoundKey.(text,ekeyi)).i).j = Op-XOR(etextij     T
    by DefAddRoundKey;
    consider dtextij,dkeyij be Element of 8-tuples_on BOOLEAN such that
A5: dtextij = ((AddRoundKey.(text,ekeyi)).i    P[Nat      ;
    ((AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi)).i).j =
    Op-XOR(dtextij,dkeyij) by DefAddRoundKey,A3;
    thus ((AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi)).ithus  
    by A4,  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  end;
  hence AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi) = text by LM01;
end

LAST04:
  for m be Nat,
 4tuples_on(4tuples_on (8-tuples_on BOOLEAN),
  Key be X1 for n being Nat st 1 < n   java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
Keyi1KeyNr be   4-uples_on4tuples_on (-BOOLEAN)
  st (m = 4 or m = 6 or m = 8) & Keyi1 = (Rev    assume
  KeyNr  (KeyExpansion(SBTm)(Key))(+m)&
  otext =     xw be of(*(+))-tuples_on (4tuples_on (8-tuples_on BOOLEAN))
  holds (InvSubBytes(SBT)*InvShiftRows).(AddRoundKey.(otext,Keyi1)) = text
proof
  let m be Nat,
  ,be java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 74
Element mjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 67
  Keyi1,KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));

:(= or = 6  m=8 &Keyi1  (ev(KeyExpansion(SBT,).K))1&
sionmentof
  otext = AddRoundKey.((ShiftRows*java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 37
  A.otext,)= java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 76
  hence (InvSubBytes(SBT)*InvShiftRows    p.  *Op-Left       ((KeyExpansion(SBT,m)).(Key)).n      H2)i1  *(*).*+)(*+)2(44>byjava.lang.StringIndexOutOfBoundsException: Range [79, 80) out of bounds for length 79
  = text by LAST01;
end;Op-LeftRight,)8,Op-LeftOp(r,),)* &

theorem LAST05:
  for m be Nat,
 be Element  4-java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 66
  key be Element of m-tuples_on(4-      Op-Left(Op-Right(r,112),8),Op-Left-ight(r120)8 >&
  dkeyi,ekeyi be Element     p.5 = <* Op-Left(Op-Right,128,8)Op-(Op-Right(,)8,
    seqbe
thenhence
  holds AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi) = text
proof
  Nat
  text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  dkeyi,ekeyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  assume
AS: java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
  SBT
  set p = (KeyExpansion(SBT,m)).(key);
  (KeyExpansion(SBT,  end;
(7-Leftr4)Rightr)8  java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
B0: ex s be Element of (4-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)))*
  st (KeyExpansion(SBT,m)).(key) = s & len s  :efENC
   seq beFinSequence  4-tuples_on(4-tuples_on (8tuples_on ))
  then 7+m in Seg (7+m);
  then
bFINSEQ_13B0java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
0 =p.(enp)(7+)+)by ASFINSEQ_558B1
    .= dkeyi by B0,AS;
  now let i,j    q. =<Op-(Op-Right(r128,)Op   (8-uples_onBOOLEAN))
    assume
A3:i Seg 4    . =*-O-(r,))p-eft-Right(168)8java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    consider,        eft-Right(,)8)-Left-Right(,),8)*  &
A4: etextij = (text.i).j & ekeyij = (ekeyi.i).j &
    ((AddRoundKey.(text,ekeyi)).i).j = Op-XOR(etextij,ekeyij)
    by DefAddRoundKey;
rdkeyij java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 71
A5: dtextij = ( (r1-uples_on(-(-(- BOOLEAN);
    ((AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi)).i).j =
    Op-XOR(dtextij,dkeyij) by :   Element of (-java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 74
    thus ((AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi)).i).j =
exKeyibe Element of tuples_on((- BOOLEANjava.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
  end;$3 =AddRoundKey.(MCFunc**ubBytesS)$,eyi;
  hence AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi) = text by LM01;
end;

theorem
  for  be Nat,
  text,beElement of-tuples_on(- (8-tuples_on ))
  Key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  Keyi1,KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  st (m = 4 or m = 6 or m = 8) & Keyi1 = ((KeyExpansion(SBT,m)).(Key)).1 &
 ((KeyExpansion(SBT) stKeyi then
  otext    for zbeing    4(- (8tuples_on BOOLEAN)
  holds (InvSubBytes(SBT)*InvShiftRows).(AddRoundKey.(otext,Keyi1)) = text
proof
   m be Nat,
  text,otext be Element of 4-      et beNatjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  Key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  Keyi1,KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  assume
AS: (m = 4 or m = 6 or m = 8) & Keyi1 = ((KeyExpansion(SBT,m)).(Key)).1 &
  KeyNr = (Rev((KeyExpansion(SBT,m)).(Key))).(7+m) &
 .(hiftRowsSubBytes(BT)).text,KeyNr);
  (      then (KeyExpansionSBTm)K).n)kkyby:;
).(()  java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
  by LAST01;
nd

theorem LAST08:
  for m,i be Nat,
  text be Element    end;
  Key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  eKeyi,dKeyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  st (m = 4 or m = 6 or m = 8) & i <= 7+m-1 &
      st  = (java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 8
      NrinSeg NrbyFINSEQ_1:3,N1;
  holds    holds ex  beElement   then
proof
   letm,iat
  text be Element of 4-tuples_on(4-tuples_on (8-java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 40
   beElement of m-tuples_on(4- 8tuples_on BOOLEAN)),
  ekeyi,dkeyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  assume
AS m   6 or =8)& i <7m-&
  ekeyi = ((KeyExpansion(SBT,m)).(key)).(7+m-i) &
  (Rev(KeyExpansion(SBT,m))())(+)
  set p = (KeyExpansion(SBT,m)).(key);
(SBT)(ey
(+-(tuples_on(4tuples_on(    0 m8
  then
 s of (-tuples_on (4-tuples_on(8-tuples_on BOOLEAN))java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  st (KeyExpansion(SBT,m)).(key) = s & len s = (7+m);
1 =7+m-1+1 by AS,XREAL_17
 =+1 +1 +  11java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  thenexbe  44-java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 74
  
B1: i+1 in dom p by FINSEQ_1:def 3,B0;
   ()(i++1)byAS:8Bjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    .= ekeyi by B0,AS;
  now let i,j be Nat;
     )unction of
:   in  4;
then  be java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
A4: etextij
R(java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 61
    by DefAddRoundKey;
    consider dtextij,dkeyij be Element of 8-tuples_on BOOLEAN such that
A5: dtextij = ((AddRoundKey.(text,ekeyi)).i).j & dkeyij = (dkeyi.i).j &
    ((AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi)).i).j =
    Op-XOR(dtextij,dkeyij) by DefAddRoundKey,A3;
    thus ((AddRoundKey.(AddRoundKey.(text,ekeyi),dkeyi)).i).j =
    (text.i).j by A4,A5,A0,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  end;
  .t,,)=text  ;
end;

LAST07:
  for m be Nat,
  text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  Key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  eKeyi,dKeyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
st= or      8  java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 74
  dKeyi = (Rev((KeyExpansion(SBT,m)).(Key))    st  = (KeyExpansion(SBT,m)).(Key)).(i+1) &
  holds AddRoundKey.(AddRoundKey.(text,eKeyi            seq2.i) =AddRoundKey.((MCFunc*SubBytes(SBT))(seq2.i)Keyi))

  let m be Nat,
  text be Element of 4-    s2 =(*        EQ[]from sch2;
ybeElement of m-tuples_on(4- (8-tuples_on BOOLEAN))
eKeyi,dKeyi (-java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 75
  assume
:m=4or =6or =8 & eKeyi (KeyExpansion(BT,).(Key))1&
dKeyi let MCFunc;
  1+0 <       let ibe Nat;
  then 0 < 7+m-1 by XREAL_1:50;
  then 7+m-1 in NAT by INT_1:3;
  then reconsider i = 7+m-1 as Nat;
Q54  1- <=i11&i+-1 < len seq1-1 yXREAL_1:java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  dKeyi = (Rev((Q550: (len seq1)-1 <= (lenseq1)- byXREAL_113java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
  hence thesis by AS,P2,LAST08;
end;

theorem LASTXX:
  for m be Nat,
  text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  Key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  st (m = 4 or m = 6 or m = 8)
  holds AES-DEC(SBT,MCFunc,AES-ENC(SBT,MCFunc,text,Key),Key) = text
proof
  let m be Nat;
  let text  Elementof 4tuples_on4 8-tuples_onQ560   i >0java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
  let Key be Element of m-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)  yFUNCT_2;
  1+0 < 7+m byXX1:    1 < ii  Nr ,:P1Q54:;
  then
:50;
m-    :java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  hen +1as ;
A0  =Nrby 14,;
  assume
 m =4orm 6orm= 8)
  consider eseq be
  FinSequence of (4-tuples_on(4-        by Q560,NAT_1:14,Q550,Q54,XXREAL_0,AT_114Q550,Q54,:,52,60;
P1: len eseq = Nr &
  (xbe Element of -tuples_on(4-uples_on (-BOOLEAN))
  stthen
eseq1=AddRoundKey.(,)  f ibe st <      holds
  ex Keyi    then 7m injava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  stKeyi=((KeyExpansion(SBT,).Key).(+1)& (KeyExpansion((java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 10
  AddRoundKey.((MCFunc*ShiftRows*SubBytes(SBT)).(eseq.i),Keyi)) &
  ex KeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  st KeyNr = ((KeyExpansion(SBT,m)).(Key)).(7+m) &
  XX12:ex  Element  (4tuples_on(4tuples_on (-BOOLEAN)))*
  .(ShiftRows*(BT).(eseq.Nr)KeyNr    of -tuples_on(4tuples_on 8tuples_on BOOLEAN))means
  consider dseq be
   (-)      Keyibe 4tuples_on4 8-)
P2: len   st len seq = 7+m-1 &
  (ex Keyi1 be Element  AES128-SBT,AES128ENC(MixColumnsmessage,) 
  st Keyi1 = (Rev((KeyExpansion(SBT  st  + < +byXREAL_17java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  dseq.1 = (InvSubBytes(SBT)*InvShiftRows).
    oof
  (for i be Nat st 1 <= i & i < Nr holds
  ex Keyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  Keyi =(ev(KeyExpansion(m)())(i+1) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  dseq.(i+1) =
  (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(  KeyNr  (Rev(KeyExpansionSBT,).K)).m)&
exKeyNr  Element of4-(- (8tuples_on BOOLEAN)
  tKeyNr = (Rev((KeyExpansion(SBT,m)).(Key))).(7+m) &
  AES-DEC(SBT,MCFunc,AES-ENC(SBT,MCFunc,text,Key),Key) =
  AddRoundKey.(dseq.Nr,KeyNr) by defDEC;
  consider eKeyi1N1:0  +1by :50;
  such that
P11: eKeyi1 = ((KeyExpansion(SBT,m)).(Key)).1 &
  eseq.1ZZ1:Rev((SBT,).Key)) 
  consider eKeyNr be Element     Nr1-4tuples_on(4tuples_on(8tuples_onBOOLEAN);
  suchthat
P12: eKeyNr = ((KeyExpansion(SBT,m)).(Key)).(7+m) &
  AES-ENC(SBT,MCFunc,text,Key) =
  AddRoundKey.((ShiftRows*SubBytes(SBT)).(eseq.Nr),eKeyNr) by P1;
 dKeyi1 be Element of -tuples_on(-tuples_on 8-uples_onBOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
  uch that
P21: dKeyi1 = (Rev((KeyExpansion     Key)as
  dseq.1 = (InvSubBytes(SBT)*InvShiftRows).
  (AddRoundKey.(AES-ENC    3 = InvSubBytes()*nvShiftRows(MCFunc").A.(2Keyi)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  consider dKeyNr be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
  such that
P22: dKeyNr = (Rev((KeyExpansion(SBT,m)).(Key))).(7+m) &
  AESDEC(BTMCFunc,ES-NC(SBT,CFunct,ey,) =
  AddRoundKey.Nr)byP;

  $1 < Nr implies dseq.($1+1) = eseq.(Nr-$1);
    SegNr by A0java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
  java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 39
  then eseq.Nr in rng eseq by FUNCT_1:3;
  then reconsider esqm = eseq.Nr as
  Element of 4-tuples_on      st Pnzyjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  dseq.(1+0) = esqm by P12,P21,AS        beNat;
    .= eseq.(Nr-0);
  then
PN1: PQ[0];
PN2:  n++< 1byXREAL_17X11;
  proof
    let i be Nat;
    assume
A1: PQ[i];
    assume
A2: i+1 < Nr;
 i <= i+by NAT_1:1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    consider dKeyi be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    such that
on(BTm).))(+1+)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    dseq.(+)1 =
esSBT)*InvShiftRows*(")(..i,Keyi))
     ,AT_111;
X11: 0 < Nr-(i+1) by A2    end
    then Nr-(i+1) in NAT by INT_1:3;
    then reconsider m7i1 = Nr-(i+1) as Nat;
    1 <= m7i1 by NAT_1:14,X11;
   java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
: =Nr(+)& Nr-(+1)<Nr byXREAL_1:;
considereKeyibeof4-(- (- BOOLEANE of4-tuples_on(-tuples_on (tuples_on BOOLEAN);
    such that
0 = ((SBT,m))().mi1+1)&
    java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 19
.MCFuncSbBytesSBT)(java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
then AESStatearray)   java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
    m7i1 in Seg Nr by A9;
    :def 3;
m7i1  :;
        thenthen 0 <+-1by XREAL_1:50java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    reconsider MSSesq7mi1 = (MCFunc*ShiftRows*SubBytes(SBT)).esq7mi1 as
    Element of 4-(or  be st1< &i< +-1 holds
:eKeyi= ((,m).(Key).7m-i) byA10;
A12: AddRoundKey.(eseq.(Nr-i),dKeyi) = MSSesq7mi1 by A10,A2,AS,A6,XXX,LAST08;
    thus dseq.((i+1)+1) = eseq.(Nr-(i+1)) by A6,A4,A2,XXREAL_0:2,A1,A12,LAST02;
  end;
P30: for k be Nat holds PQ[k] from NAT_1:sch 2(PN1,PN2);
  5+m < 6+m by XREAL_1:8;
  then
P31: dseq.(5+m+1) = eseq.(Nr-(5+m)) by P30Key)).&
  1 <= 1 & 1 <= 1+(5+m) by NAT_1:11;

  1java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
  then eseq.1 in rng eseq by FUNCT_1:3;
  then reconsider esq1 = eseq.1 as
  Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
       ((S,m).ey). java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  22java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 27
end;

theorem  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  for D be non empty set, n,m be non zero Element of         (InvSubBytes(SBT)*InvShiftRows*(MCFunc")).(AddRoundKey.(seq2.i,Keyi))
  r be Element of n-java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 18
-(-m,)is 8tuples_on D
proof
   D emptysetjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
  n,m be non zero Element of NAT,
  r be Element of n-tuples_on D;
  assume
A1: m <= n & 8 <= n-m;
  r in { s where s is Element of D*:      byend;
  then consider s be Element of D* such that
en s = njava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  len Op-Right(r,m) = n - m by A1,A2,RFINSEQ:def 1;
  then len(Op-Left(Op-Right(r,m),8)) = 8 by A1,FINSEQ_1:59;
  hence thesis by FINSEQ_2:92;
end

Lm1:
  for D non empty set,n be non zero Elementof NAT,
  r be Element of n-tuples_on D java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 19
  8= n-&24 =n &8< n-24
  holds< Op-eftr8end;
  Op-Left(Op-Right(r,24),8) *>  let be java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 10
proof INV07
  let D be non empty set, n be non zero Element of NAT,
  r be java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      =output;
  then Key  Element--java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 67
  Op-Left(Op-Right(r,8),8) is Element of 8-tuples_on D &
  Op-Left(Op-Right(r,16),8) is Element offor m Nat
  text beElementof 4-uples_on(4tuples_on (8-tuples_on BOOLEAN)) holds
  hence thesis by LMGSEQ4;
end;

Lm2:
  for D be non empty set, n,m,l,p,q be non zero Element of NAT,
  r be Element of n-tuples_on D st m <= n & 8 <= n-m & l = m+8 & l <= n &
  8 <= n-l & p = m+16 & p <= n & 8 <= n-p & q = m+24 & q <= n & 8 <= n-q
  holds <* Op-Left(Op-Right(r,m),8),Op-Left(Op-Right(r,l),AS by:
 OpLeftOp-Right(r),8)OpLeftOpRightrq,8) > is
   of4tuples_on(-tuples_on)
proof
  let D be   (KeyExpansionSBT,m).k 
  r be Element of n-tuples_on D;
  assume m <= n & 8 <= n-m & l = m+8 & l <= n & 8 <= n-l &
  p = m+16 & p theorem LAST02:
B0:exs  (4tuples_on(8-tuples_on BOOLEAN)))*
  Op-Left(java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 44
  Op-Left(Op-Right(r,  hen   java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 15
  Op-Left(Op-Right(r,q),8) is Element of 8-tuples_on D by LR8D1;
hence   **().text java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
end;

Lm3:MCFunc.S.(().text))byjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 61
       ekeyij  ofsuchjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
rElementof-D   m+8&l<n &
  b ;
  (ddRoundKey.(ekeyi)dkeyi)..  texti.j
  Op-Left(Op-r)8)Op-Right(r,q) * is
  Element of 4-tuples_on (8-tuples_on D)
proof
  let D be non empty set, n,m,l,p,java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 4
  r be Element of n-tuples_on D;
  assume m <= n & 8 <= n-m & l = m+8 & l <= n & 8 <= n-l &
  p = m+16 & p <= n & 8 <= n-p & q = m+24 & q <= n & 8 = n-q;
  then Op-Left(Op-Right(r,m),8) is Element of 8-tuples_on D &
Left(p(l,8  of -java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 56
  Op-Left(Op-Right(r,p),8) is Element of 8-tuples_on D &
  Op-Right(r,q) is Element of 8-tuples_on D by DESCIP_1:2,LR8D1;
  hence thesis by LMGSEQ4;
end;

definition
  let r be Element of 128-tuples_on BOOLEAN;
   AESKeyInitState128r) >
  Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
  it.1 = <* Op-Left(r,8),Op-Left(Op-Right(r,8),8),
    -((16)8,-(Right(r,24)8)* &
  it.2 = <* Op-Left(Op-Right(r,32),8),Op-Left(Op  (SubBytesSBT).textjava.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 15
    Op-Left(Op-Right(r,48  henceInvSubBytes(*.AddRoundKey.(Keyi1)
  it.3 = <* Op-Left(Op-Right(r,64),8java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *> &
  it.4 = <* Op-  for m beNat,
    Left(Right(r)O-,);
  existence  (+)tuples_on(-tuples_on (  java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 67
  
setR1 =< -r8,-OpRight(,)8,
      Op-Left(Op-Right(r,16),8),Op-Left(Op-Right(r,24),8) *>;
    set R2 = <* Op-Left(Op-Right(r,32),8),Op-Left(Op-Right(r,40),8),
      Op-Left(Op-Right(r,48),8),Op-Left(Op-Right(r,56),8) *>;
    set R3 = <* Op-Left(Op-Right(r,64),8),Op-Left(Op-Right(r,72),8),
      Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *>;
ight(,)8,OpLeft(Op-Right(,104),8,
      Op-Left(Op-Right(r,112),8),Op-Right(r,120) *>;
    8 <= 128-8 & 8 <= 128-16 & 8 <= 128-24;
    then reconsider java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
    8 <= 128-32 & 8 <= 128-40 & 8 <= 128-48 & 8 <= 128-56  beElement fm-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    40 = 32+8 & 48 = 32+16 & 56 = 32+24;
 (-java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 78
    8 <= 128-64 & 8 <= 128-72 & 8 <= 128-80 & 8 <= 128-88 &
    72 = 64+8 & 80 = 64+16 & 88 = 64+24;
    then reconsider R3 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm2;
    8 <= 128-96 &A0 keyi exbe java.lang.StringIndexOutOfBoundsException: Range [23, 19) out of bounds for length 73
    104 = 96+8 & 112 = 96+16 & 120 = 96+24 & 8 = 128-120;
    then reconsider R4 as Element of 4-tuples_on (8      assume
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 23
    set T2 = <*R3,R4*>;
    set T = T1^T2;
 T1=T1.1 &.. T. = T1.2 by FINSEQ_3:154java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
   let,beNat
    len T = 4 & T is FinSequence of 4-tuples_on (8java.lang.StringIndexOutOfBoundsException: Range [50, 10) out of bounds for length 10
    by CARD_1:def 7;
    then reconsider T as Element of
    4-tuples_on(-tuples_on (8-tuples_on BOOLEAN)) by FINSEQ_2:92java.lang.StringIndexOutOfBoundsException: Range [65, 58) out of bounds for length 58
    take T;
    thus thesis by A4,A5;
  end;
  uniqueness
  proof
    let p,q be  ((AddRoundKey.(,dkeyi.)j=
    assume
A6: p.1 = LAST04:
      Op-Left(    texti.  ,  ormbeNat,
    p2  * Op-eft(-RightRight(,32)8,p-,40),8),
      Op-Left(Op-Right(r,48),8),Op-Left(Op-Right(r,56),8) *>  Key be Element of m-tuples_on(4tuples_on (-tuples_on BOOLEAN),
p. = < Op-Left(-Right(r,)8),Op-Left(Op-(,72),8)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
      Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *> &
    p.4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
      Op-holds (InvSubBytes(SBT)*InvShiftRows).(AddRoundKey.(otext,Keyi1)) = text
    assume
 q.=< -Left(,8,-(-Rightr8,)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
      Op-Left(Op-Right(r,16),8)end  otext =AddRoundKey.(ShiftRows**(SBT.,eyNrjava.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
    qjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      Op-Left(Op-Right(r,48),8),Op-Left(Op-Right(r,56),8) *> &
    q.3 = <* Op-Left(Op-Right(r,64),8)  text be Elementof 4-tuples_on(4tuples_on (8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 0
f mibe ,
    q.4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
      Op-Left(Op-Right(r,112),8),Op-Right(r,120) *>;
    p in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    then
A8: ex v be   dKeyi = (Rev(java.lang.StringIndexOutOfBoundsException: Range [32, 28) out of bounds for length 50
    len v = 4;
    q in 4-tuples_on(4-tuples_on (8-    eyiekeyibeElement  4-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 17
    then
9: ex vbeElement of4tuples_on (8tuples_on )*stq=vjava.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
    len v = 4;
    for i be Nat st 1 <= i & i <= len p holds p.i = q.i
    proof
      let i be Nat;
      assume 1 <= i & i <= len p;
      then i = 1 or ... or i = 4 by A8;
      hence thesis by A6,A7;
    end;
hencep=qby ,A9FINSEQ_1:;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
end;

definition
  let r be Element B1: i indompbyFINSEQ_1:def 3,B0;
  func AES-KeyInitState192(r) ->
  Element of 6-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
  it.1 = <* Op-B0  sbe       B0AS
    -Left(Op-Right(r,16),8,-Left(OpRight(,24)8 >&
  it.2 = <* Op-Left(Op-Right(r    assume
    Op-Left(pRight(,48,),-(-r,)8 >java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  it.3 = <* Op-Left(Op-Right(r,64),8),Op-Left(Op-Right(r,72),8),
    Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *> &
  it.4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
    Op-Left(Op-Right(r,112),8),Op-Left(Op,dkeyijbeElement of -BOOLEAN suchjava.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
  it.5 = <* Op-Left(Op-Right(r,128),8),Op-Left(Op-Right(r,136),8),
    Op-Left(Op-Right(r,144),8),Op-Left(Op-Right(r,152),8) *> &
  it.6 = <* Op-Left(Op-Right(r,160),8),Op-Left(Op-Right(r,168),8),
    Op-Left(Op-Right(r,176),8),Op-Right(r,184) *>;
  existence
  proof
    set    java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 68
      Op-Left(Op-Right(r,16),8end 0<+ by8
    set R2 = <* Op-Left(Op-Right(  then +in 7m)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
      Op-Left(Op-Right(r,48),8),Op-Left(Op-Right(r,56),8) *>;
    set R3 = <* Op-Left(Op-Right(r,64),8),Op-Left(Op-Right(r,72),8),
      Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *>;
    set R4 = <* Op-Left( let ,jbe Nat
      Op-Left(Op-Right(r,112),8),Op-Left(Op-Right(r,120),8) *>;
    set R5 = <* Op-Left(Op-Right(r,128),8),Op-Left(Op-Right(r,136),8),
           (-java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 63
    set R6 = <* Op-Left(Op-Right(r,160),8),Op-Left(Op-Right(r,168),8.)ij  OpXOR(,ekeyij)
DefAddRoundKeydkeyij be Element of 8-tuples_on BOOLEAN such that
    8 < text beElementof -4tuples_on(tuples_on java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 58
    then reconsider R1 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm1;
    8ajava.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
    40 = 32+8 & 48 = 32+16  end
    then reconsider R2 as Element of 4  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    8 <= 192-64 & 8 <= 192-72 & 8 <= 192-80 & 8 <= 192-88 &
    72 = 64+8 & 80 = 64+16 & 88 = 64+24;
    then reconsider R3 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm2;
    8 <= 192-96 & 8 <= 192-104 & 8 <= 192-112 & 8 <= 192-120 &   = Rev(KeyExpansionSm)(ey))(i) byAS;
    104 = 96+8 & 112 = 96+16 & 120 = 96+24;
    then reconsider R4 as Element of 4-tuples_on (8-tuples_on BOOLEAN
    8 <= 192-128 & 8 <= 192-136   otext = AddRoundKey(ShiftRows*SBT)textKeyNr
     textElement4-4tuples_on(-tuples_on)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    then reconsider R5 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm2;
    8 <= 192-160 & 8 <= 192-168 & 8 <= 192-176 & 8 = 192-184 &
    168 = 160+  AddRoundKey  v(eyExpansion((BT,)(Keyi)
    then reconsider
    T1 *R1R2,*>;
    set T2 = <*R4,R5,R6*>;
    set T = T1^T2;
A4: T.1 = T1.1 & ... & T.3 = T1.3 by FINSEQ_3:154;
.&T.3)=. 155java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    len T = 6 & T is FinSequence of 4-tuples_on (8-tuples_on BOOLEAN)
    by CARD_1:def 7  ex Keyi be Element of 4tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    then reconsider T as Element of
    6-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) by FINSEQ_2:92;
    T
    thus thesis by A4,A5;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6

  proof
qElement of6-tuples_on(4tuples_on (-tuples_on java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 52
    assume
A6: p.1 = <* Op-Left(r,8),Op-Left(Op-Right(r,8),8),
      Op-Left(Op-Right(r,16),8),Op-Left(Op-java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 11
    p.2 = <* Op-Left(Op-Right(r,32),8),Op-Left(Op-Right(r,40),8),
      Op-Left(Op-Right(r,48),8),Op-Left(Op-Right(r,56A4 etextij = (text.i).j & ekeyij = (ekeyi.i).j &
        (.text,).java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      -((,80))OpOp-Rightr)8 >java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62

      Op-Left(Op-Right(r      (java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 58
    p.5 = <* Op-Left(Op-Right(r,128),8),Op-Left(Op-Right(r,136),8),
      Op-Left(Op-Right(r,144),8),Op-Left(Op-Right      OpXOR( DefAddRoundKeyA;
p   -(-(r,,-(Op(,))
OpLeft(-Right(,))pight(,)*;
    assume
A7: q.1 = <* Op-Left(r,8),Op-Left(Op-Right(r,8),8),
OpOpRightr,,,-(Op-ightr), >&
    q.2 =   then  eseqNr as
      Op-Left(Op-Right(r,48),8),Op-Left(Op-Right(r,56),8) *> &
    q.3 = <* Op-Left(Op-Right(r,64),8),Op-Left(Op-Right    . eseq.(0;
      Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *> &
    q.4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
      Op-Left(Op-Right(r,112),8),Op-Left(Op-Right(r,120),8) *> &
    q.5 = <* Op-Left(Op-A1 PQi]
      Op-Left(Op-Right(r,144),8),Op-Left(Op-Right(r,152),8) *> &
    q.6 = <* Op-LeftA4 =i  java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 25
OpLeft(-Right(,,8)Op-Right(,184)*>
    p 6-4tuples_on8dseq.((1+)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    then
A8: ex v be Element of (4-tuples_on (8-tuples_on BOOLEAN))* st p = v &
  6java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    q in 6-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    then
A9: ex v be ElementA9:1< Nr-i+(SBT,).Key).7m;
    len v = 6;
for st 1 =i&i =len  holds    for i be Nat st 1 <= i & i <= len p holds p
    proof
let ibeN;
A10  henjava.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 35
  = 1 or..     A8
      hence thesis by A6,A7;
    end;
    hence p = q by A8,A9,FINSEQ_1:14;
  end;
end;

definition
  let r be Element of 256-tuples_on BOOLEAN;
yInitState256() >
Element of 8tuples_on(-tuples_on 8tuples_on OOLEAN) means
=< -    )+ =eseq.Nr(1)  A4A2,XREAL_0:,,A12;
    Op-Left(Op-Right(r,16),8),Op-Left(Op-Right(r,24),8) *> &
  it.2 = <* Op-Left(Op-Right(r,32),8),Op-Left(Op-Right(r,40),8),
      text  oftuples_on4-(8-tuples_on BOOLEAN)
  it.3 = <* Op-Left(Op-Right(  letKey- < &  ++)11java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *> &
  it.4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
Op-(Op-Right(,)8,-LeftOpm- inNAT  INT_1:;
  it.5 = <* Op-Left(Op-Right(r,128),8),Op-Left(Op-Right(r,136),8),
    Op-Left(Op-Right(r,144),8),Op-Left(Op-Right(r,152),8) *> &
  it.6 = <* Op-Left(Op-Right(r,160),8),Op-Left(Op-Right(r,168),8),
   -LeftOp-ight(r176,8)OpLeft(Op-Right(r,184),8) *> &
  it.7 = <* Op-Left(Op-Right(r,192),8),Op-Left(Op-Right(r,200),8),
    Op-Left(Op-Right(r,208),8),Op-Left(Op-Right(
  it.8 = <* Op-Left(Op-Right(r,224),8),Op-Left(Op-Right(r,232),8),
    Op-  let D be java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 25
  existence
    assum
R1  * -r8,Left(p-Right(,))java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
      Op-Left(Op-Right(r,16),8),Op-Left(Op-Right(r,24),8) *>;
    set R2 = <* Op-Left(Op-Right(r,32),8),Op-Left(Op-Right(r,40),8),
     Op-Left(Right(,)8,OpLeftOp(,)8 >
    setR3 = < Op-(Op-Right(r,)8,Op-(-Rightr,72,)
      Op- then(-(OpRight(,)) =8byA1FINSEQ_1:59;
    set R4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
      Op-Left(Op-Right(r,112java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
    set R5 =< Op-Left(Op-Right(,128)8,Op-Left(p-(r,136)8),
      Op-Left(Op-Right(r,144),8),Op-Left(Op-Right(r,152),8) *>;
    etR6 *OpLeft(-Rightr160),),-LeftOpRight((,168))java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
     Op-Op-Right(,),Op-Op-java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 63
     =<*OpLeft-Right(,192,8)Op-(Op-(,),8),
      Op-Left(Op- AddRoundKey.(CFuncOp-Left(Op-Right(r,24),8) * Element-tuples_on8tuples_on D
    set R8ex beof4tuples_onjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 71
      Op-Left(Op-Right(   java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 32
     = 56
    then reconsider R1 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm1;
    8 <= 256-32 & 8 <= 256-40 & 8 <= 256-48 & 8 <= 256-56 &
    40 = 32+8 & 48 = 32+16 & 56 = 32+24;
    then reconsider R2 as Element of 4-tuples_on (  Op-Left(OpRightr24),)is  of 8-uples_on D by DESCIP_1:1,LR8D1;
    8 <= 256-64 & 8 <= 256-72 & 8 <= 256-80 & 8 <= 256-88 &
    72 = 64+8 & 80 = 64+16 & 88 = 64+24;
    then reconsider R3 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm2;
     <= 256-96-104&8 = -112&8< 256-120 &
    104 = 96+8 & 112 = 96+16 & 120 = 96+24;
    then reconsider R4 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm2;
    8 <= 256-128 & 8 <= 256-136 & 8 <= 256-144 & 8 <= 256-152 &
    136 = 128+8 & 144 = 128+16 & 152 = 128+24;
    then reconsider   Op-Left(Op-Right(r,p,Left(-rq,8 *is
<= 256-  8<256176  8< 256-&
    168 = 160+8 & 176 = 160+16 & 184 = 160+24;
    then reconsider R6 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm2;
    8 <= 256-192 & 8 <= 256-200 & 8 <= 256-208 & 8 <= 256-216 &
  1928&208=192+ &216  (orjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 40
    then reconsider R7 as Element of 4-tuples_on (8-tuples_on BOOLEAN) by Lm2;
    8 <= 256-224 &    8 <= 256-224 & 8 <trm,8) lementof -java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 61
    232 = 224+8 & 240 = 224+16 & 248 = 224+24 & 8 = 256-248;
    then reconsider R8 as Element of 4-tuples_on (8-java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 26
    set T1 = <*R1,R2,R3,R4*>;
    set T2 = <*R5,Lm3
    set T = T1^T2;
:T1=T114 by154such
 (+  T2.1&.&T( 4 java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 58
    len  . .(text,eKeyi1) by P1;
    by CARD_1:def 7;
    then reconsider T as Element of
    8-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) by FINSEQ_2:92;
    take T;
    thus thesis by A4,A5;
 end;
  uniqueness
  proof
let p, beElement of8-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    assume
A6: p.1 = <* Op-Left(r,8),Op-Left(Op-Right(r,8),8),
      Op-Left(Op-Right(r,16),8),Op-Left(Op-Right(r,24),8) *> &
    p.2 = <* Op-Left(Op-Right(r,32),8),Op-Left(Op-Right(r,40),8),
      Op-Left(Op-Right(r,48),8),Op-Left(Op-Right(r,56),8) *> &
    p.3 = <* Op-Left(Op-Right(r,64),8),Op-Left(Op-Right(r,72),8),
      Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *> &
    p.4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
      OpP12:eKeyNr  (KeyExpansionSBT,)).(Key)) of44 -java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 65
p5=< LeftOpRightr,)8)OpLeft(p-(,)8)  AES-(TMCFuncextKey)java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
Op(p-)Op-Left(-(r,)8 >&
    .6  < Op-Left(-Right(r,)8,-(OpRight(,tuples_on ))
      Op-Left(Op-Right(r,176),8),Op-Left(Op-Right(r,184),8) *> &
p7  *Op-LeftOpRight(,92)8,Op-Left(Op-Right(r,200,)
      Op-Left(Op-Right(r,208),8),Op-Left(Op-Right(r,216),8) *> &
p.  *Op-LeftO-Rightr224,)OpLeftOp-(such that
      -Left(Opr,,,)-r248 *;
    assume
:q1 =<*Op-r8,Op-Left(Op-(r8,)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
      Op-Left(Op-Right(r,16),8),Op-Left(Op-Right(r,24),8) *> &
   q2=< ORight(,32,,--4,)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
Op(OpRight(,,)OpLeft(Op-Right(r56,)* java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    q.3 = <* Op-Left(Op-Right(r,64),8),Op-Left(Op-Right(r,72),8),
      Op-Left(Op-Right(r,80),8),Op-Left(Op-Right(r,88),8) *> &
    q.4 = <* Op-Left(Op-Right(r,96),8),Op-Left(Op-Right(r,104),8),
    -Opr,112),8),OpLeftO-Rightr,20),8)*>&
 < -O-(r8,-Opr136,)
Op(-Right(r144,)Op-(Op-
    q.6 = <* Op-Left(Op-Right(r,160),8),Op-Left(Op-Right(r,168),8),
      Op-Left(Op-Right(r,176),8),Op-Left(Op-Right(r,184),8) *> &
    q.7 = <* Op-Left(Op-Right(r,192),8),Op-Left(Op-Right(r,200),8
      Op-Left(Op-Right(r,208),8),Op-Left(Op-Right(r,216),8) *> &
    q.8 = A2:i+1 ;
A4: i< y :;
    p in 8-tuples_on(4-    consider dKeyi be Element oftuples_on4tuples_on(- BOOLEAN))
    then
:ex  beElement  4-(-BOOLEAN)*st p = v&
    len v = 8;
    q in 8-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
    then
A9: ex v be Element of (4-tuples_on (8-tuples_on BOOLEAN))* st q = v &
    len v = 8;
    for i be Nat st 1 <= i & i <= len p holdsp. =.

 be;
assume1<=  &i<  p;
      then i = 1 or    by P2,,NAT_111;
      hence thesis by A6,A7;
    end;
    hence p = q by A8,A9,FINSEQ_1:14;
  end;
end;

definition
BT,ixColumns;
  let message be Element of 128-java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 20
  let Key be Element of 128-tuples_on BOOLEAN;
  func AES128-ENC(SBT,MixColumns,message,Key) ->
  Element of 128-tuples_on BOOLEAN equals
  (AES-Statearray)".(AES-ENC(SBT,MixColumns,AES-Statearray.message,
  AES  proof
  correctness
  proof
    rng AES-Statearray = 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    by FUNCT_2:def 3;
    then (AES-Statearray)" is Function of
    4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),128-tuples_on BOOLEAN
    by FUNCT_2:25;
 by FUNCT_2:5;
  end;
end;

definition
  let SBT,MixColumns;
  let cipher be Element of 128-tuples_on BOOLEAN;
  let Key be  Element 128- BOOLEAN;
  func AES128-DEC     eKeyi  of4-tuples_on- 8tuples_onBOOLEAN)
  Element of 128-tuples_on BOOLEAN equals
  (AES-Statearray)".(AES-DEC(SBT,MixColumns,AES-Statearray.cipher,
  AES-KeyInitState128(Key)));
  correctness
proof
java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 71
        m7i1 inSeg Nr A9
    then (AES-Statearray)" is
    Function of 4-tuples_on(4-tuples_on (8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 44
-  25
    hence thesis    4tuples_on4 8)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
e;
end;

theorem
  for SBT be Permutation of (8-tuples_on BOOLEAN),
  MixColumns be Permutation of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  message,Key be Element of 128-tuples_on BOOLEAN holds
  AES128-DEC(SBT,MixColumns,AES128-ENC(SBT,MixColumns,message,Key),Key) =
  message
proof
  let SBT be Permutation of (8-tuples_on BOOLEAN),
  MixColumns be Permutation of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  message,Key be Element of 128-tuples_on BOOLEAN;
  reconsider text = AES-Statearray.message as
  Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  reconsider sKey = assume 1 <= i & ilenp
  Element of 4-tuples_on(4-tuples_on (8-tuples_on  thus AESDEC,,-(SBTtextKey,ey  text
  reconsider cipher = AES  by P22,31,11AS,LAST07;
  Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 8
 tuples_on;
  AES128-DEC(SBT,MixColumns,CBLOCK,Key) =
  (AES-Statearray)".(AES-DEC(SBT,  let be non  ,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  hence thesis by FUNCT_2:26;
end;

definition
  let SBT,MixColumns;
 let b Element   let message be Element of
Key beElementof192- BOOLEANjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  func AES192-ENC(SBT,MixColumns,message,Key) ->
  Element of 128-tuples_on BOOLEAN equals
-"(-ENC(M,Statearrayjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  AES-KeyInitState192(Key)));
  correctness
  proof
    rng AES-Statearray  existence
    by FUNCT_2:def 3;
    then (AES-Statearray)" is Function of
    4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),128-tuples_on BOOLEAN
   :;
    hence thesis by FUNCT_2:5;
  end;
end;

definition
  let SBT,MixColumns;
  let cipher be Element of 128-end
  8 =19296   =192104 & 8 < -   =192-20 java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
f AES192-(SBT,MixColumns,cipher,ey ->
  Element of 128-tuples_on   r be Element of n-tuples_on Dst m<    =92   < - 8<< 192-4 8 = 
  (AES-Statearray)".(AES-DEC(SBT,MixColumns,AES-Statearray.cipher,
  AES-KeyInitState192(Key)));
  correctness
 
    rng AES-Statearray = 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    by FUNCT_2:def 3;
then(ES    setT=T1^;
   Functionof -tuples_on4-java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 63
    128-tuples_on BOOLEAN by FUNCT_2:25;
 thesis  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  end;
end;

theorem
  for SBT be Permutation of (8-tuples_on BOOLEAN),
  be 4tuples_on4(tuples_on),
  message be Element of 128-tuples_on BOOLEAN,
  Key be Element of 192-tuples_on BOOLEAN holds
  AES192-DEC(SBT,MixColumns,AES192-ENC(SBT,MixColumns,message,Key),Key) =
  message
proof
  let SBT      O-(r112,)Op-LeftOp-Rightr,120),8) *> &
  MixColumnsp5=<* Op-eft(Op-ight(,)8,Op-(-r136,),
  message be Element of 128-tuples_on BOOLEAN,
  Key be Element of 192-tuples_on BOOLEAN;
 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 45
  32,),pLeft(Right(r40,)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  reconsider       Op-Left(Opr)8),-p= +16   = &  = &q   m24 q<=n &8 =java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
Elementof6tuples_on(-tuples_on (-tuples_onBOOLEAN);
  reconsider cipher = AES-ENC(SBT,MixColumns,text,sKey) as
      q.4 =*OpLeft(Op-,96),8,-Op-Rightr104)8,
  reconsider CBLOCK = AES192-ENC(SBT,MixColumns,message,Key) as
  Element of 128-tuples_on BOOLEAN;
  AES192-DEC(SBT,MixColumns,CBLOCK,Key) =
  (AES-Statearray)".(AES-DEC(SBT,MixColumns,cipher,sKey)) by LMINV1
    .=(AES-Statearray)".text by LASTXX;
  hence thesis by FUNCT_2:26;
end;


  let SBT,MixColumns       ;
  let message    for ibe  1<  =ppi=.
  let Key be Element of 256-tuples_on BOOLEAN;
  func AES256-ENC(SBT,MixColumns,message,Key) ->
 BOOLEANjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  (AES-Statearray)".(AES-ENC(SBT,MixColumns,AES-Statearray.message,
  AES-KeyInitState256(Key)));
  correctness
  proof
    rng AES-Statearray = 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    by FUNCT_2:def 3;
    then (AES-Statearray)" is Function of
    4tuples_on((-tuples_on (8-tuples_on BOOLEAN),-BOOLEAN
    by FUNCT_2:25;
    hence thesis by FUNCT_2:5;
  end;
end;

definition
  let SBT,MixColumns;
  let cipher be       Op-Left(Op-Right(rLeft-Right(,)8,Op-Left(Op-Right(,24)8 >
   beElementof 256-tuples_on BOOLEAN;
  func AES256-DEC(SBT,MixColumns,cipher    then      Op-Right,))Op(Op-Right(56,)*;
  Element of 128-   set   < -Op-(,)8,java.lang.StringIndexOutOfBoundsException: Range [68, 44) out of bounds for length 68
  (AES-Statearray)".(AES-DEC(SBT,MixColumns,AES-Statearray.cipher,
yInitState256();java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  correctness
  proof
    rng AES-Statearray = 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
    by FUNCT_2:def 3;
    then (AES-Statearray)" is
    Function of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
-by:25;
    hence thesis by FUNCT_2:5;
  end;
end;

theorem
  for SBT be Permutation    set T2=<*3R4>
xColumns be Permutation of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  message be Element of A:p.1=< Left(r,8,-Op(8,8)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
KeyElement of256-BOOLEAN holds
  AES256-DEC(SBT,MixColumns    p.2 = <* Op-Left(Op-Right(r,32),8),Op-Left(Op-Right(r,40),8),
  message
proof
  let SBT be Permutation of (8-tuples_on BOOLEAN),
  MixColumns be Permutation of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
  messagep  <*Op-OpRightr96,)OpLeft(OpRight(r104,8java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
  Key be Element of 256-tuples_on BOOLEAN;
  reconsider text = AES-Statearray.message as
  Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
  reconsider sKey = AES-KeyInitState256(Key) as
  Element of 8-tuples_on      OpLeft(OpRight(,176))OLeft(-Rightr,184)8)* 
reconsidercipher =ENC,,textsKey)
      Op-(Op-(,208208,)Op-Op-Right(r,216)8 >&
  reconsider CBLOCK = AES256-ENC(SBT,MixColumns,message,Key) as
  Element of 128-tuples_on BOOLEAN;
  AES256-DEC(SBT,MixColumns,CBLOCK,Key) =
  (AES-Statearray)".(AES-DEC(SBT,MixColumns,cipher,sKey)) by LMINV1
    .=(AES-Statearray)".text by LASTXX;
  hence thesis by FUNCT_2:26;
end;

Messung
CHZG
8010010093

¤ Dauer der Verarbeitung: 0.475 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,058
#Domains=861,616