Eine aufbereitete Darstellung der Quelle

 
     
 
 
 


Quelle  scpqsort.miz   Sprache: Mizar

 

:: Quick Sort on SCMPDS
::  by JingChao Chen
::
:: Received June 14, 2000
:: Copyright (c) 2000-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 NUMBERS, SCMPDS_2, SUBSET_1, FSM_1, SCMPDS_4, AMI_1, TURING_1,
      SCMFSA8A, SCMFSA_7, AMI_3, INT_1, SCMFSA8B, CARD_1, ARYTM_3, FUNCT_1,
      XXREAL_0, UNIALG_2, SCMFSA7B, SCMFSA6B, RELAT_1, FUNCT_4, AMI_2,
      SCMFSA_9, ARYTM_1, VALUED_1, TARSKI, GRAPHSP, CIRCUIT2, MSUALG_1, NAT_1,
      FUNCOP_1, CARD_3, FINSEQ_1, GRAPH_2, SCPISORT, SCMP_GCD, CLASSES1,
      SCPQSORT, EXTPRO_1, SCMFSA6C, COMPOS_1, MEMSTR_0;
 notations TARSKI, XBOOLE_0, FUNCT_2, SUBSET_1, CARD_1, ORDINAL1, NUMBERS,
      XXREAL_0, RELAT_1, FUNCT_1, PARTFUN1, FUNCT_4, PBOOLE, VALUED_1,
      XCMPLX_0, RECDEF_1, INT_1, NAT_1, STRUCT_0, COMPOS_1, MEMSTR_0, EXTPRO_1,
      AMI_2, FUNCT_7, SCMPDS_2, SCMPDS_4, SCMPDS_5, SCMPDS_6, SCMP_GCD, CARD_3,
      FINSEQ_1, SCMPDS_8, GRAPH_2, CLASSES1, SCPISORT, FINSEQ_6;
 constructors REAL_1, RECDEF_1, NEWTON, MESFUNC1, SCM_1, SCMPDS_4, SCMPDS_5,
      SCMPDS_6, SCMP_GCD, SCMPDS_8, SCPISORT, CLASSES1, GRAPH_2, VALUED_1,
      AMI_2, SCMPDS_1, PRE_POLY, AMISTD_1, AMISTD_2, SCMPDS_7, PBOOLE,
      AMISTD_5, MEMSTR_0, FINSEQ_6;
 registrations RELSET_1, XXREAL_0, XREAL_0, NAT_1, INT_1, SCMPDS_2, SCMPDS_4,
      SCMPDS_5, SCMPDS_6, SCMPDS_8, ORDINAL1, VALUED_0, COMPOS_1, AFINSQ_1,
      MEMSTR_0, EXTPRO_1, FUNCT_4, FUNCT_7, PRE_POLY, AMI_3, COMPOS_0;
 requirements NUMERALS, REAL, SUBSET, ARITHM;
 definitions SCPISORT;
 equalities SCMPDS_2, SCMP_GCD, COMPOS_1, EXTPRO_1, MEMSTR_0;
 expansions SCPISORT;
 theorems AMI_3, NAT_1, TARSKI, FUNCT_4, SCMPDS_2, FUNCT_7, GRFUNC_1, SCMPDS_4,
      SCMPDS_5, SCMPDS_7, SCMPDS_8, FINSEQ_1, FINSEQ_2, RFINSEQ, SCPISORT,
      XBOOLE_1, XREAL_1, XXREAL_0, GRAPH_2, MEMSTR_0, CLASSES1, SCMPDS_6,
      SCMP_GCD, INT_1, COMPOS_1, AFINSQ_1, EXTPRO_1, FINSEQ_6, PBOOLE;
 schemes NAT_1, SCMPDS_8;

begin :: The Several Properties of "while" Program and Finite Sequence

reserve x for Int_position,
  n,p0 for Nat;

registration
  let I,J be shiftable Program of SCMPDS, a be Int_position,k1 be Integer;
  cluster if>0(a,k1,I,J) -> shiftable;
  correctness
  proof
    set i = (a,k1)<=0_goto (card I + 2), G =Goto (card J+1);
    I ';' G ';' J = I ';' Load (goto (card J+1)) ';' J by SCMPDS_6:def 1;
    then reconsider IJ=I ';' G ';' J as shiftable Program of SCMPDS;
    if>0(a,k1,I,J) = i ';' I ';' G ';' J by SCMPDS_6:def 5
      .=i ';' (I ';' G) ';' J by SCMPDS_4:14
      .=i ';' IJ by SCMPDS_4:14
      .=Load i ';' IJ by SCMPDS_4:def 2;
    hence thesis;
  end;
end;

reserve P,Q,V for Instruction-Sequence of SCMPDS;

theorem Th1: :: see SCMPDS_6:87
  for s being 0-started State of SCMPDS,I being halt-free shiftable Program
  of SCMPDS, J being shiftable Program of SCMPDS,a,b be Int_position,k1 being
  Integer st s.DataLoc(s.a,k1) > 0 & I is_closed_on s,P & I is_halting_on s,P
   holds
  IExec(if>0(a,k1,I,J),P,s).b = IExec(I,P,s).b
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, J be
  shiftable Program of SCMPDS,a,b be Int_position,k1 be Integer;
  assume that
A1: s.DataLoc(s.a,k1)>0 and
A2: I is_closed_on s,P and
A3: I is_halting_on s,P;
A4: not b in dom Start-At((card I+card J+2),SCMPDS) by SCMPDS_4:18;
  IExec(if>0(a,k1,I,J),P,s) = IExec(I,P,s) +*
   Start-At((card I+card J+2),SCMPDS)
   by A1,A2,A3,SCMPDS_6:70;
  hence thesis by A4,FUNCT_4:11;
end;
set A = NAT, D = SCM-Data-Loc;

Lm1: for a be Int_position,i be Integer,I be Program of SCMPDS holds while>0(a
,i,I)= ((a,i)<=0_goto (card I +2)) ';' (I ';' goto -(card I+1))
proof
  let a be Int_position,i be Integer,I be Program of SCMPDS;
  set i1=(a,i)<=0_goto (card I +2), i2=goto -(card I+1);
  thus while>0(a,i,I) = i1 ';' I ';' i2 by SCMPDS_8:def 3
    .= i1 ';' (I ';' i2) by SCMPDS_4:15;
end;

Lm2: for I being Program of SCMPDS,a being Int_position,i being Integer holds
Shift(I,1) c= while>0(a,i,I)
proof
  let I be Program of SCMPDS,a be Int_position,i be Integer;
  set i1=(a,i)<=0_goto (card I+2), i2=goto -(card I+1);
A1: while>0(a,i,I) = i1 ';' I ';' i2 by SCMPDS_8:def 3
    .= i1 ';' I ';' Load i2 by SCMPDS_4:def 3
    .= Load i1 ';' I ';' Load i2 by SCMPDS_4:def 2;
  card Load i1=1 by COMPOS_1:54;
  hence thesis by A1,SCMPDS_7:3;
end;

theorem Th2:
  for s,sm be State of SCMPDS,I be halt-free shiftable Program of
  SCMPDS, a be Int_position,i be Integer, m be Nat st
  I is_closed_on s,P & I is_halting_on s,P & s.DataLoc(s.a,i) > 0 &
   m=LifeSpan(P +* stop I,Initialize s)+2 &
 sm=Comput(P +* stop while>0(a,i,I),Initialize s,m)
 holds DataPart sm = DataPart IExec(I,P,Initialize s) &
   Initialize sm=sm
proof
  let s,sm be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a
  be Int_position,i be Integer,m be Nat;
  set b=DataLoc(s.a,i);
  set WH =while>0(a,i,I), iWH= stop WH, IsI= stop I;
  set i1=(a,i)<=0_goto (card I+2), i2=goto -(card I+1);
  set s2 = Initialize s, P2 = P +* stop I,
  s3 = Initialize s, P3 = P +* stop WH,
  s4 = Comput(P3,s3,1), P4 = P3;
  assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P and
A3: s.b > 0 and
A4: m=LifeSpan(P2,s2)+2 and
A5: sm= Comput(P3,s3,m);
A6: IsI c= P2 by FUNCT_4:25;
A7: iWH c= P3 by FUNCT_4:25;
  WH c= iWH by AFINSQ_1:74;
  then
A8: WH c= P3 by A7,XBOOLE_1:1;
  Shift(I,1) c= WH by Lm2;
  then
A9: Shift(I,1) c= P4 by A8,XBOOLE_1:1;
A10: WH = i1 ';' (I ';' i2) by Lm1;
A11: Comput(P3,s3,0+1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
    .= Exec(i1,s3) by A10,SCMPDS_6:11;
  set m2=LifeSpan(P2,s2), s5= Comput(P4, s4,m2), P5 = P4,
  l1=
(card I + 1);
A12: IC s3 = 0 by MEMSTR_0:def 11;
A13:   not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
   not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
   then
A14: s3.DataLoc(s3.a,i)= s3.b by FUNCT_4:11
    .= s.b by A13,FUNCT_4:11;
  set m3=m2 +1;
  set s6= Comput(P3, s3,m3), P6 = P3;
A15: s6=s5 by EXTPRO_1:4;
  set s7= Comput(P3,s3,m3+1);
  card I + 1 < card I + 2 by XREAL_1:6;
  then
A16: l1 in dom WH by SCMPDS_8:18;
A17: I is_closed_on s2,P2 by A1,SCMPDS_6:24;
  for x holds s2.x = s4.x by A11,SCMPDS_2:56;
  then
A18: DataPart s2 = DataPart s4 by SCMPDS_4:8;
A19: P2 halts_on s2 by A2,SCMPDS_6:def 3;
  P2+*stop I halts_on Initialize s2
     by A2,SCMPDS_6:def 3;
  then
A20: I is_halting_on s2,P2 by SCMPDS_6:def 3;
A21: IC s4 = 0+1 by A3,A12,A11,A14,SCMPDS_2:56;
  then DataPart Comput(P2, s2,m2) = DataPart s5 by A6,A20,A17,A18,A9,
SCMPDS_7:18;
  then
A22: DataPart s5 = DataPart(Result(P2,s2)) by A19,EXTPRO_1:23
    .= DataPart IExec(I,P,Initialize s) by SCMPDS_4:def 5;
A23: IC s5=l1 by A6,A20,A17,A21,A18,A9,SCMPDS_7:18;
  then
A24: CurInstr(P6,s6)=P5.l1 by A15,PBOOLE:143
    .=WH.l1 by A16,A8,GRFUNC_1:2
    .=i2 by SCMPDS_8:19;
A25: s7 = Following(P3,s6) by EXTPRO_1:3
    .= Exec(i2,s6) by A24;
  now
    let x;
    thus sm.x=s6.x by A4,A5,A25,SCMPDS_2:54
      .=s5.x by EXTPRO_1:4;
  end;
  hence DataPart sm = DataPart IExec(I,P,Initialize s) by A22,SCMPDS_4:8;
  IC s7 =ICplusConst(s6,0-(card I+1)) by A25,SCMPDS_2:54
    .= 0 by A23,A15,SCMPDS_7:1;
  hence thesis by A4,A5,MEMSTR_0:46;
end;

theorem Th3:
  for s be State of SCMPDS,I be Program of SCMPDS st
   for t be 0-started State of SCMPDS, Q st DataPart t = DataPart s
    holds I is_halting_on t,Q
  holds I is_closed_on s,P
proof
  let s be State of SCMPDS,I be Program of SCMPDS;
  assume
A1: for t be 0-started State of SCMPDS,Q st DataPart t = DataPart s holds I
  is_halting_on t,Q;
  set pI=stop I, sI=Initialize s, PI = P +* pI;
  defpred X[Nat] means not IC Comput(PI,sI,$1) in dom pI;
A2: for a be Int_position holds s.a = sI.a
   proof let a be Int_position;
      not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
    hence thesis by FUNCT_4:11;
   end;
  assume not I is_closed_on s,P;
  then ex k be Nat st X[k] by SCMPDS_6:def 2;
  then
A3: ex k be Nat st X[k];
  consider n be Nat such that
A4: X[n] and
A5: for m be Nat st X[m] holds n <= m from NAT_1:sch 5(A3);
  reconsider n as Nat;
  set s2 = Comput(PI,sI,n), P2 = PI,
  Ig = ((IC s2,IC s2 + 1) --> (goto 1,goto -1));
  reconsider P0 = PI +* Ig as Instruction-Sequence of SCMPDS;
  reconsider P1 = P2 +* Ig as Instruction-Sequence of SCMPDS;
  reconsider P3 = PI +* (IC s2,goto 1) as Instruction-Sequence of SCMPDS;
    reconsider P4 = P3 +* (IC s2 + 1,goto -1)
         as Instruction-Sequence of SCMPDS;
A6:   P0 = P4 by FUNCT_7:139;
A7: for m be Nat st m < n holds IC( Comput(PI, sI,m))
   in dom pI by A5;
A8: stop I c= PI by FUNCT_4:25;
  pI c= P3 by A4,FUNCT_4:25,FUNCT_7:89;
  then
A9: stop I c= P0 by A6,A4,AFINSQ_1:73,FUNCT_7:89;
  then
A10:  Comput(P0,sI,n) =  s2 by A8,A7,SCMPDS_4:21;
  DataPart sI = DataPart s by A2,SCMPDS_4:8;
  then I is_halting_on sI,P0 by A1;
  then
A11: P0+*pI halts_on Initialize sI
   by SCMPDS_6:def 3;
A12: not P0 halts_on s2 by SCMPDS_4:20;
   P0 +* pI=P0 by A9,FUNCT_4:98;
  hence contradiction by A12,A10,A11,EXTPRO_1:22;
end;

theorem Th4:
  for i1,i2,i3,i4 be Instruction of SCMPDS holds
  card (i1 ';' i2 ';' i3 ';' i4) = 4
proof
  let x1,x2,x3,x4 be Instruction of SCMPDS;
  thus card (x1 ';' x2 ';' x3 ';' x4)=card (x1 ';' x2 ';' x3)+1 by SCMP_GCD:4
    .=card (x1 ';' x2 )+1+1 by SCMP_GCD:4
    .=2+1+1 by SCMP_GCD:5
    .=4;
end;

theorem Th5:
  for s being 0-started State of SCMPDS,I being halt-free shiftable Program
  of SCMPDS, a,x,y be Int_position, i,c be Integer st s.x >= c+s.
DataLoc(s.a,i) &
(for t be 0-started State of SCMPDS,Q st t.x >= c+t.DataLoc(s.a,i) & t.y=s
.y & t.a=s.a & t.DataLoc(s.a,i) > 0
 holds IExec(I,Q,t).a=t.a & I is_closed_on t,Q &
I is_halting_on t,Q & IExec(I,Q,t).DataLoc(s.a,i) < t.DataLoc(s.a,i)
 & IExec(I,Q,t).x
  >= c+IExec(I,Q,t).DataLoc(s.a,i) & IExec(I,Q,t).y=t.y)
 holds while>0(a,i,I) is_closed_on s,P & while>0(a,i,I) is_halting_on s,P &
 (s.DataLoc(s.a,i) > 0 implies
  IExec(while>0(a,i,I),P,s)
   =IExec(while>0(a,i,I),P,Initialize IExec(I,P,s)))
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, a,x1,
  y1 be Int_position, i,c be Integer;
  set b=DataLoc(s.a,i);
  assume s.x1 >= c+s.b;
  then
A1: for x st x in {x1} holds s.x >= c+s.b by TARSKI:def 1;
  assume
A2: for t be 0-started State of SCMPDS,Q st t.x1 >= c+t.b &
 t.y1=s.y1 & t.a=s.a & t.b > 0
  holds IExec(I,Q,t).a=t.a & I is_closed_on t,Q & I is_halting_on t,Q
 & IExec(I,Q,t).b < t.b & IExec(I,Q,t).x1 >= c+IExec(I,Q,t).b &
  IExec(I,Q,t).y1=t.y1;
  now
    let t be 0-started State of SCMPDS, Q;
    assume that
A3: for x st x in {x1} holds t.x >= c+t.b and
A4: for x st x in {y1} holds t.x=s.x and
A5: t.a=s.a and
A6: t.b > 0;
    y1 in {y1} by TARSKI:def 1;
    then
A7: t.y1=s.y1 by A4;
    x1 in {x1} by TARSKI:def 1;
    then
A8: t.x1 >= c+t.b by A3;
    hence
    IExec(I,Q,t).a=t.a & I is_closed_on t,Q
     & I is_halting_on t,Q & IExec(I,Q,t).
    b < t.b by A2,A5,A6,A7;
    hereby
      let x;
      assume
A9:  x in {x1};
      IExec(I,Q,t).x1 >= c+IExec(I,Q,t).b
       by A2,A5,A6,A8,A7;
      hence IExec(I,Q,t).x >= c+IExec(I,Q,t).b
       by A9,TARSKI:def 1;
    end;
      let x;
      assume
A10:  x in {y1};
      hence IExec(I,Q,t).x=IExec(I,Q,t).y1
       by TARSKI:def 1
        .=t.y1 by A2,A5,A6,A8,A7
        .=t.x by A10,TARSKI:def 1;
  end;
  hence thesis by A1,SCMPDS_8:27;
end;

theorem Th6:
  for s being 0-started State of SCMPDS,I being halt-free shiftable Program
  of SCMPDS, a,x,y be Int_position, i,c be Integer st s.x >= c & (
for t be 0-started State of SCMPDS,Q
 st t.x >= c & t.y=s.y & t.a=s.a & t.DataLoc(s.a,i) > 0
  holds IExec(I,Q,t).a=t.a & I is_closed_on t,Q
   & I is_halting_on t,Q & IExec(I,Q,t).
DataLoc(s.a,i) < t.DataLoc(s.a,i) & IExec(I,Q,t).x >= c
 & IExec(I,Q,t).y=t.y) holds
while>0(a,i,I) is_closed_on s,P & while>0(a,i,I) is_halting_on s,P
 & ( s.DataLoc(s.a,i) > 0
   implies IExec(while>0(a,i,I),P,s)
   =IExec(while>0(a,i,I),P,Initialize IExec(I,P,s)))
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, a,x,y
  be Int_position, i,c be Integer;
  set b=DataLoc(s.a,i);
  defpred P[set] means ex t be State of SCMPDS st t=$1 & t.x >= c & t.y=s.y;
  consider f be Function of product the_Values_of SCMPDS,NAT such that
A1: for s be State of SCMPDS holds (s.b <= 0 implies f.s =0) & (s.b > 0
  implies f.s=s.b) by SCMPDS_8:5;
  deffunc F(State of SCMPDS) = f.$1;
A2: for t be 0-started State of SCMPDS st P[t] & F(t)=0 holds t.b <= 0 by A1;
  assume
A3: s.x >= c;
A4: P[s] by A3;
  assume
A5: for t be 0-started State of SCMPDS,Q
      st t.x >= c & t.y=s.y & t.a=s.a & t.b > 0
holds IExec(I,Q,t).a=t.a & I is_closed_on t,Q & I is_halting_on t,Q
 & IExec(I,Q,t).b <
  t.b & IExec(I,Q,t).x >= c & IExec(I,Q,t).y=t.y;
A6: now
    let t be 0-started State of SCMPDS, Q;
    assume that
A7: P[t] and
A8: t.a=s.a and
A9: t.b > 0;
    set It=IExec(I,Q,t), t2=Initialize It;
    thus
    IExec(I,Q,t).a=t.a & I is_closed_on t,Q & I is_halting_on t,Q
     by A5,A8,A9,A7;
    thus F(t2) < F(t)
    proof
A10:  F(t)=t.b by A1,A9;
      assume
A11:  F(t2) >= F(t);
      then t2.b > 0 by A1,A9,A10;
      then F(t2)=t2.b by A1
        .=It.b by SCMPDS_5:15;
      hence contradiction by A5,A8,A9,A7,A11,A10;
    end;
    thus P[Initialize It]
    proof
      take v=Initialize It;
      thus v=Initialize It;
      It.x >= c by A5,A8,A9,A7;
      hence v.x >= c by SCMPDS_5:15;
      It.y=t.y by A5,A8,A9,A7;
      hence thesis by A7,SCMPDS_5:15;
    end;
  end;
  while>0(a,i,I) is_closed_on s,P & while>0(a,i,I)
  is_halting_on s,P from SCMPDS_8:sch 3(A2,A4,A6);
  hence while>0(a,i,I) is_closed_on s,P & while>0(a,i,I) is_halting_on s,P;
  assume
A12: s.b > 0;
  IExec(while>0(a,i,I),P,s)
   = IExec(while>0(a,i,I),P,Initialize IExec(I,P,s))
    from SCMPDS_8:sch 4(A12,A2,A4,A6);
  hence thesis;
end;

theorem Th7:
  for s being 0-started State of SCMPDS,I being halt-free shiftable Program
of SCMPDS, a,x1,x2,x3,x4 be Int_position, i,c,md be Integer st s.
x4=s.x3-c+s.x1 & md <= s.x3-c &
 (for t be 0-started State of SCMPDS,Q st t.x4=t.x3-c+t.x1 &
md <= t.x3-c & t.x2=s.x2 & t.a=s.a & t.DataLoc(s.a,i) > 0
 holds IExec(I,Q,t).a=t.
  a & I is_closed_on t,Q & I is_halting_on t,Q
   & IExec(I,Q,t).DataLoc(s.a,i) < t.
DataLoc(s.a,i) & IExec(I,Q,t).x4=
IExec(I,Q,t).x3-c+IExec(I,Q,t).x1
 & md <= IExec(I,Q,t)
.x3-c & IExec(I,Q,t).x2=t.x2) holds while>0(a,i,I) is_closed_on s,P
 & while>0(a,i,I) is_halting_on s,P & ( s.DataLoc(s.a,i) > 0
   implies IExec(while>0(a,i,I),P,s) =
  IExec(while>0(a,i,I),P,Initialize IExec(I,P,s)) )
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, a,x1,
  x2,x3,x4 be Int_position, i,c,md be Integer;
  set b=DataLoc(s.a,i);
  defpred P[set] means ex t be State of SCMPDS st t=$1 & t.x4=t.x3-c+t.x1 & md
  <= t.x3-c & t.x2=s.x2;
  assume that
A1: s.x4=s.x3-c+s.x1 and
A2: md <= s.x3-c;
  consider f be Function of product the_Values_of SCMPDS,NAT such that
A3: for s be State of SCMPDS holds (s.b <= 0 implies f.s =0) & (s.b > 0
  implies f.s=s.b) by SCMPDS_8:5;
  deffunc F(State of SCMPDS) = f.$1;
A4: for t be 0-started State of SCMPDS st P[t] & F(t)=0 holds t.b <= 0 by A3;
  assume
A5: for t be 0-started State of SCMPDS,Q
   st t.x4=t.x3-c+t.x1 & md <= t.x3-c & t.x2=s
.x2 & t.a=s.a & t.DataLoc(s.a,i) > 0 holds IExec(I,Q,t).a=t.a
 & I is_closed_on t,Q
& I is_halting_on t,Q & IExec(I,Q,t).DataLoc(s.a,i) <
t.DataLoc(s.a,i)
 & IExec(I,Q,t).x4=IExec(I,Q,t).x3-c+IExec(I,Q,t).x1
  & md <= IExec(I,Q,t).x3-c & IExec(I,Q,t).x2=t.x2;
A6: now
    let t be 0-started State of SCMPDS, Q;
    assume that
A7: P[t] and
A8: t.a=s.a and
A9: t.b > 0;
    set It=IExec(I,Q,t), t2=Initialize It;
    consider v be State of SCMPDS such that
A10: v=t and
A11: v.x4=v.x3-c+v.x1 and
A12: md <= v.x3-c and
A13: v.x2=s.x2 by A7;
A14: t.x2=s.x2 by A10,A13;
A15: t.x4=t.x3-c+t.x1 by A10,A11;
A16: md <= t.x3-c by A10,A12;
    thus IExec(I,Q,t).a=t.a & I is_closed_on t,Q & I is_halting_on t,Q
     by A5,A8,A9,A15,A13,A10,A12;
    thus F(t2) < F(t)
    proof
A17:  F(t)=t.b by A3,A9;
      assume
A18:  F(t2) >= F(t);
      then t2.b > 0 by A3,A9,A17;
      then F(t2)=t2.b by A3
        .=It.b by SCMPDS_5:15;
      hence contradiction by A5,A8,A9,A15,A16,A10,A13,A18,A17;
    end;
    thus P[Initialize It]
    proof
      take v=Initialize It;
      thus v=Initialize It;
      It.x4=It.x3-c+It.x1 by A5,A8,A9,A15,A16,A14;
      then v.x4=It.x3-c+It.x1 by SCMPDS_5:15;
      then v.x4=v.x3-c+It.x1 by SCMPDS_5:15;
      hence v.x4=v.x3-c+v.x1 by SCMPDS_5:15;
      md <= It.x3-c by A5,A8,A9,A15,A16,A14;
      hence md <= v.x3-c by SCMPDS_5:15;
      It.x2=t.x2 by A5,A8,A9,A15,A16,A10,A13;
      hence thesis by A10,A13,SCMPDS_5:15;
    end;
  end;
A19: P[s] by A1,A2;
  while>0(a,i,I) is_closed_on s,P & while>0(a,i,I)
  is_halting_on s,P from SCMPDS_8:sch 3(A4,A19,A6);
  hence while>0(a,i,I) is_closed_on s,P & while>0(a,i,I) is_halting_on s,P;
  assume
A20: s.b > 0;
  IExec(while>0(a,i,I),P,s) = IExec(while>0(a,i,I),P,
  Initialize IExec(I,P,s)) from SCMPDS_8:sch 4(A20,A4,A19,A6);
  hence thesis;
end;

theorem Th8:
  for f being FinSequence of INT,m,k1,k,n be Nat st k1=k
  -1 & f is_non_decreasing_on m,k1 & f is_non_decreasing_on k+1,n & (for i be
  Nat st m <= i & i < k holds f.i <= f.k) & (for i be Nat
  st k < i & i <= n holds f.k <= f.i) holds f is_non_decreasing_on m,n
proof
  let f be FinSequence of INT,m,k1,k,n be Nat;
  assume that
A1: k1=k-1;
  assume
A2: f is_non_decreasing_on m,k1;
  assume
A3: f is_non_decreasing_on k+1,n;
  assume
A4: for i be Nat st m <= i & i < k holds f.i <= f.k;
  assume
A5: for i be Nat st k < i & i <= n holds f.k <= f.i;
  now
    let i,j be Nat;
    assume that
A6: m <= i and
A7: i <= j and
A8: j <= n;
    per cases by XXREAL_0:1;
    suppose
      j < k;
      then j+1 <= k by INT_1:7;
      then j <= k1 by A1,XREAL_1:19;
      hence f.i <= f.j by A2,A6,A7,FINSEQ_6:def 9;
    end;
    suppose
A9:   j = k;
        per cases;
        suppose
          i=j;
          hence f.i <= f.j;
        end;
        suppose
          i<>j;
          then i<j by A7,XXREAL_0:1;
          hence f.i <= f.j by A4,A6,A9;
        end;
    end;
    suppose
A10:  j > k;
        per cases by XXREAL_0:1;
        suppose
          i < k;
          then
A11:      f.k >= f.i by A4,A6;
          f.j >= f.k by A5,A8,A10;
          hence f.i <= f.j by A11,XXREAL_0:2;
        end;
        suppose
A12:      i = k;
            per cases;
            suppose
              i=j;
              hence f.i <= f.j;
            end;
            suppose
              i<>j;
              then i<j by A7,XXREAL_0:1;
              hence f.i <= f.j by A5,A8,A12;
          end;
        end;
        suppose
          i > k;
          then i >= k+1 by INT_1:7;
          hence f.i <= f.j by A3,A7,A8,FINSEQ_6:def 9;
        end;
    end;
  end;
  hence thesis by FINSEQ_6:def 9;
end;

Lm3: for s be 0-started State of SCMPDS,
  I be halt-free shiftable Program of SCMPDS, a
be Int_position, i,c be Integer,f,g be FinSequence of INT,
  m,n,m1 be Nat st s.a=c & len f=n & len g=n & f is_FinSequence_on s,m & g
is_FinSequence_on IExec(while>0(a,i,I),P,s),m & 1=s.DataLoc(c,i)
 & m1=m+n+1 & m+1
=s.intpos m1 & m+n=s.intpos(m1+1) &
 (for t be 0-started State of SCMPDS,Q
 for f1,f2 be
FinSequence of INT,k1,k2,y1, yn be Nat st t.a=c & 2*k1+1=t.DataLoc(c
,i) & k2=m+n+2*k1+1 & m+y1=t.intpos k2 & m+yn=t.intpos(k2+1) & (1 <= y1 & yn <=
n or y1 >= yn) holds I is_closed_on t,Q & I is_halting_on t,Q
 & IExec(I,Q,t).a=t.a &
(for j be Nat st (1<=j & j<2*k1+1)
 holds IExec(I,Q,t).intpos(m+n+j)=t.
intpos(m+n+j)) & (y1>=yn implies IExec(I,Q,t).DataLoc(c,i)=2*k1-1
 & (for j be
Nat st (1<=j & j <= n)
 holds IExec(I,Q,t).intpos (m+j) = t.intpos (m+j
))) & (y1<yn implies IExec(I,Q,t).DataLoc(c,i)=2*k1+3
 & (for j be Nat
st 1<=j & j<y1 or yn<j & j <= n
 holds IExec(I,Q,t).intpos(m+j) = t.intpos (m+
j)) & (ex ym be Nat st y1 <= ym & ym <= yn
 & m+y1=IExec(I,Q,t).intpos
k2 & m+ym-1=IExec(I,Q,t).intpos (k2+1) &
m+ym+1=IExec(I,Q,t).intpos (k2+2)
 & m+yn=
IExec(I,Q,t).intpos (k2+3) &
 (for j be Nat st y1 <= j & j < ym holds
IExec(I,Q,t).intpos (m+j) <=
IExec(I,Q,t).intpos (m+ym)) &
 (for j be Nat
st ym < j & j <= yn holds IExec(I,Q,t).intpos (m+j)
 >= IExec(I,Q,t).intpos (m+ym)))
) & (f1 is_FinSequence_on t,m
 & f2 is_FinSequence_on IExec(I,Q,t),m & len f1=n &
len f2=n implies f1,f2 are_fiberwise_equipotent)) holds while>0(a,i,I)
is_halting_on s,P & f,g are_fiberwise_equipotent & g is_non_decreasing_on 1,n
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, a be
  Int_position, i,c be Integer,f,g be FinSequence of INT,
   m,n,m1 be Nat;
A1: Initialize s = s by MEMSTR_0:44;
  set b=DataLoc(c,i);
  assume that
A2: s.a=c and
A3: len f=n and
A4: len g=n;
  set WH =while>0(a,i,I), sWH=stop WH;
  assume
A5: f is_FinSequence_on s,m;
  defpred P[Nat] means
   for t be 0-started State of SCMPDS,Q
   for f1 be FinSequence of INT, k1,k2,y1,yn be Nat
    st t.a=c & 2*k1+1=t.b & k2=m+n+2*k1+1 &
     (1 <= y1 & yn <= n or y1 >= yn) &
     m+y1=t.intpos k2 & m+yn=t.intpos(k2+1) & yn-y1<=$1 &
     f1 is_FinSequence_on t,m & len f1=n
   ex k be Nat,f2 be FinSequence of INT
    st Initialize Comput(Q+*sWH,t,k)
          = Comput(Q+*sWH,t,k) &
    f2 is_FinSequence_on
     Comput(Q+*sWH,t,k),m & len f2=n &
    f1,f2 are_fiberwise_equipotent &
    f2 is_non_decreasing_on y1,yn &
    (for j be Nat st y1<yn & (1<=j & j<y1 or yn<j & j<= n)
      holds f2.j= t.intpos(m+j)) &
    (for j be Nat st y1>=yn & 1<=j & j<= n
     holds f2.j= t.intpos(m+j)) &
    (for j be Nat st 1<=j & j<2*k1+1
     holds Comput(Q+*sWH,t,k).intpos(m+n+j)=t.intpos(m+n+j)) &
    Comput(Q+*sWH,t,k).b=t.b-2 & Comput(Q+*sWH,t,k).a=c;
  assume
A6: g is_FinSequence_on IExec(while>0(a,i,I),P,s),m;
  assume
A7: 1=s.b;
  assume that
A8: m1=m+n+1 and
A9: m+1=s.intpos m1 and
A10: m+n=s.intpos(m1+1);
A11: m1=m+n+2*0+1 by A8;
  assume
A12: for t be 0-started State of SCMPDS,Q
 for f1,f2 be FinSequence of INT, k1,k2,y1,yn
be Nat st t.a=c & 2*k1+1=t.b & k2=m+n+2*k1+1 & m+y1=t.intpos k2 & m+
yn=t.intpos(k2+1) & (1 <= y1 & yn <= n or y1 >= yn)
 holds I is_closed_on t,Q & I is_halting_on t,Q & IExec(I,Q,t).a=t.a &
  (for j be Nat st (1<=j & j<2*k1+1)
  holds IExec(I,Q,t).intpos(m+n+j)=t.intpos(m+n+j)) &
  (y1>=yn implies IExec(I,Q,t).b=2*k1-1 &
    for j be Nat
  st 1<=j & j <= n
 holds IExec(I,Q,t).intpos (m+j) = t.intpos (m+j) ) &
  (y1<yn implies IExec(I,Q,t).b=2*k1+3 &
   (for j be
Nat st 1<=j & j<y1 or yn<j & j <= n
 holds IExec(I,Q,t).intpos (m+j) = t.intpos (m+j)) &
   ex ym be Nat st y1 <= ym & ym <= yn & m+y1=
  IExec(I,Q,t).intpos k2 & m+ym-1=
  IExec(I,Q,t).intpos (k2+1)
   & m+ym+1=IExec(I,Q,t).intpos (k2+2) & m+yn=IExec(I,Q,t).intpos (k2+3) &
 (for j be Nat st y1<= j & j < ym holds IExec(I,Q,t).intpos(m+j) <=
IExec(I,Q,t).intpos(m+ym))
 & for j be Nat st ym < j & j <= yn
 holds IExec(I,Q,t).intpos(m+j) >=
 IExec(I,Q,t).intpos(m+ym) )
 & (f1 is_FinSequence_on t,m
 & f2 is_FinSequence_on IExec(I,Q,t),
  m & len f1=n & len f2=n implies f1,f2 are_fiberwise_equipotent);
A13: P[0]
  proof
    let t be 0-started State of SCMPDS,Q;
    let f1 be FinSequence of INT,k1,k2,y1,yn be Nat;
A14: Initialize t = t by MEMSTR_0:44;
    assume that
A15: t.a=c and
A16: 2*k1+1=t.b and
A17: k2=m+n+2*k1+1 and
A18: 1 <= y1 & yn <= n or y1 >= yn and
A19: m+y1=t.intpos k2 and
A20: m+yn=t.intpos(k2+1) and
A21: yn-y1<=0 and
A22: f1 is_FinSequence_on t,m and
A23: len f1=n;
A24: I is_halting_on t,Q by A12,A15,A16,A17,A18,A19,A20;
    take k=LifeSpan(Q+*stop I,t)+2;
    set tk= Comput(Q+*sWH,t,k);
A25: I is_closed_on t,Q by A12,A15,A16,A17,A18,A19,A20;
    then
A26: DataPart tk = DataPart IExec(I,Q,t) by A15,A16,A24,Th2,A14;
    consider f2 be FinSequence of INT such that
A27: len f2=n and
A28: for i be Nat st 1<=i & i <= len f2
 holds f2.i=IExec(I,Q,t) .intpos(m+i) by SCPISORT:1;
    take f2;
    thus Initialize tk =tk by A15,A16,A25,A24,Th2,A14;
    now
      let i be Nat;
      assume that
A29:  1<=i and
A30:  i <= len f2;
      thus f2.i=IExec(I,Q,t).intpos(m+i) by A28,A29,A30
        .=tk.intpos(m+i) by A26,SCMPDS_4:8;
    end;
    hence f2 is_FinSequence_on tk,m;
    thus len f2=n by A27;
    f2 is_FinSequence_on IExec(I,Q,t),m by A28;
    hence
    f1,f2 are_fiberwise_equipotent by A12,A15,A16,A17,A18,A19,A20,A22,A23,A27;
    thus f2 is_non_decreasing_on y1,yn by A21,FINSEQ_6:165,XREAL_1:50;
    thus for j be Nat st y1<yn & (1<=j & j<y1 or yn<j & j<= n)
    holds f2.j= t.intpos(m+j) by A21,XREAL_1:50;
    hereby
      let j be Nat;
      assume that
A31:  y1>=yn and
A32:  1<=j and
A33:  j<= n;
      thus f2.j=IExec(I,Q,t).intpos (m+j) by A27,A28,A32,A33
        .=t.intpos(m+j) by A12,A15,A16,A17,A19,A20,A31,A32,A33;
    end;
    hereby
      let j be Nat;
      assume that
A34:  1<=j and
A35:  j<2*k1+1;
      thus tk.intpos(m+n+j)=IExec(I,Q,t).intpos(m+n+j)
       by A26,SCMPDS_4:8
        .=t.intpos(m+n+j) by A12,A15,A16,A17,A18,A19,A20,A34,A35;
    end;
    y1>=yn implies IExec(I,Q,t).b=2*k1-1 &
    for j be Nat st 1<=j & j <= n
     holds IExec(I,Q,t).intpos (m+j) = t.intpos (m+j)
      by A12,A15,A16,A17,A19,A20;
    hence tk.b=t.b-2 by A16,A21,A26,SCMPDS_4:8,XREAL_1:50;
    IExec(I,Q,t).a=t.a by A12,A15,A16,A17,A18,A19,A20;
    hence thesis by A15,A26,SCMPDS_4:8;
  end;
A36: now
    let k be Nat;
    assume
A37: P[k];
    P[k+1]
    proof
      let t be 0-started State of SCMPDS,Q;
      let f1 be FinSequence of INT, k1,k2,y1,yn be Nat;
A38: Initialize t = t by MEMSTR_0:44;
      assume that
A39:  t.a=c and
A40:  2*k1+1=t.b and
A41:  k2=m+n+2*k1+1 and
A42:  1 <= y1 & yn <= n or y1 >= yn and
A43:  m+y1=t.intpos k2 and
A44:  m+yn=t.intpos(k2+1) and
A45:  yn-y1<=k+1 and
A46:  f1 is_FinSequence_on t,m and
A47:  len f1=n;
      per cases;
      suppose
        yn-y1<=0;
        hence ex kk be Nat,f2 be FinSequence of INT st
         Initialize Comput(Q+*sWH,t,kk)
    = Comput(Q+*sWH,t,kk) &
    f2 is_FinSequence_on
     Comput(Q+*sWH,t,kk),m &
    len f2=n & f1,f2 are_fiberwise_equipotent & f2 is_non_decreasing_on
y1,yn & (for j be Nat st y1<yn & (1<=j & j<y1 or yn<j & j<= n) holds
f2.j= t.intpos(m+j)) & (for j be Nat st y1>=yn & 1<=j & j<= n holds
f2.j= t.intpos(m+j)) & (for j be Nat st (1<=j & j<2*k1+1) holds
Comput(Q+*sWH,t,kk).intpos(m+n+j)
=t.intpos(m+n+j)) &
 Comput(Q+*sWH,t,kk).b=
 t.b-2 & Comput(Q+*sWH,t,kk).a=c
  by A13,A39,A40,A41,A42,A43,A44,A46,A47;
      end;
      suppose
A48:    yn-y1>0;
        set m1=LifeSpan(Q+*stop I,t)+2;
        set t1= Comput(Q+*sWH,t,m1),
            Q1 = Q+*sWH;
A49:    I is_halting_on t,Q by A12,A39,A40,A41,A42,A43,A44;
        y1-1 >= 0 by A42,A48,XREAL_1:47,48;
        then reconsider y0=y1-1 as Element of NAT by INT_1:3;
        set jj=2*k1+1;
A50:    yn-y1-1 <= k+1-1 by A45,XREAL_1:9;
A51:    yn <= y1+(k+1) by A45,XREAL_1:20;
        consider f2 be FinSequence of INT such that
A52:    len f2=n and
A53:    for i be Nat st 1<=i & i <= len f2 holds f2.i=t1.
        intpos( m+i) by SCPISORT:1;
        set It=IExec(I,Q,t);
A54:    y1<yn implies It.b=2*k1+3 & (for j be Nat st 1<=j & j
<y1 or yn<j & j <= n holds IExec(I,Q,t).intpos (m+j)
 = t.intpos (m+j))
 & ex ym
be Nat st y1 <= ym & ym <= yn & m+y1=It.intpos k2 & m+ym-1=It.intpos
(k2+1) & m+ym+1=It.intpos (k2+2) & m+yn=It.intpos (k2+3) &
  (for j be Nat st y1 <= j & j < ym
 holds IExec(I,Q,t).intpos(m+j) <=
 IExec(I,Q,t).intpos(m+ym)
) & for j be Nat st ym < j & j <= yn
 holds IExec(I,Q,t).intpos(m+j) >=
        IExec(I,Q,t).intpos(m+ym) by A12,A39,A40,A41,A42,A43,A44;
        then consider ym be Nat such that
A55:    y1 <= ym and
A56:    ym <= yn and
A57:    m+y1=It.intpos k2 and
A58:    m+ym-1=It.intpos (k2+1) and
A59:    m+ym+1=It.intpos (k2+2) and
A60:    m+yn=It.intpos (k2+3) and
A61:    for j be Nat st y1 <= j & j < ym
 holds IExec(I,Q,t).
        intpos(m+j) <= IExec(I,Q,t).intpos(m+ym) and
A62:    for j be Nat st ym < j & j <= yn
holds IExec(I,Q,t).
        intpos(m+j) >= IExec(I,Q,t).intpos(m+ym) by A48,XREAL_1:47;
A63:    I is_closed_on t,Q by A12,A39,A40,A41,A42,A43,A44;
        then
A64:    DataPart t1 = DataPart IExec(I,Q,t) by A39,A40,A49,Th2,A38;
        then
A65:    t1.b=2*k1+3 by A48,A54,SCMPDS_4:8,XREAL_1:47;
A66:    ym >= 1 by A42,A48,A55,XREAL_1:47,XXREAL_0:2;
        then reconsider yc=ym-1 as Element of NAT by INT_1:3,XREAL_1:48;
A67:    yc <= yn by A56,XREAL_1:146,XXREAL_0:2;
        then
A68:    yc <= n by A42,A48,XREAL_1:47,XXREAL_0:2;
A69:    t1.b=2*(k1+1)+1 by A48,A54,A64,SCMPDS_4:8,XREAL_1:47;
        IExec(I,Q,t).a=t.a by A12,A39,A40,A41,A42,A43,A44;
        then
A70:    t1.a=c by A39,A64,SCMPDS_4:8;
        set k3=m+n+2*(k1+1)+1, yd=ym+1;
A71:    yd > ym by XREAL_1:29;
        then
A72:    yd >= y1 by A55,XXREAL_0:2;
        then
A73:    yd >= 1 by A42,A48,XREAL_1:47,XXREAL_0:2;
A74:    t1.intpos(k3+1)=m+yn by A41,A64,A60,SCMPDS_4:8;
        ym+(1+k) >= y1+(1+k) by A55,XREAL_1:6;
        then yn <= yd+k by A51,XXREAL_0:2;
        then
A75:    yn-yd<=k by XREAL_1:20;
A76:     t1.intpos k3=m+yd by A41,A64,A59,SCMPDS_4:8;
A77: (Initialize t1).a = t1.a by SCMPDS_5:15;
A78: (Initialize t1).b = t1.b by SCMPDS_5:15;
A79: (Initialize t1).intpos k3 = t1.intpos k3 by SCMPDS_5:15;
A80: (Initialize t1).intpos(k3+1) = t1.intpos(k3+1) by SCMPDS_5:15;
  f2 is_FinSequence_on (Initialize t1),m
   proof let i be Nat;
    assume 1 <= i & i <= len f2;
     then f2.i=t1.intpos(m+i) by A53;
    hence thesis by SCMPDS_5:15;
   end;
   then consider kl be Nat,f3 be FinSequence of INT such that
A81:   Initialize Comput(Q1+*sWH,(Initialize t1),kl)
          = Comput(Q1+*sWH,(Initialize t1),kl) and
A82: f3 is_FinSequence_on
     Comput(Q1+*sWH,(Initialize t1),kl),m and
A83: len f3=n and
A84: f2,f3 are_fiberwise_equipotent and
A85: f3 is_non_decreasing_on yd,yn and
A86: for j be Nat st yd<yn & (1<=j & j<yd or yn<j & j<= n)
      holds f3.j= (Initialize t1).intpos(m+j) and
A87: for j be Nat st yd>=yn & 1<=j & j<= n
     holds f3.j= (Initialize t1).intpos(m+j) and
A88: for j be Nat st 1<=j & j<2*(k1+1)+1
     holds Comput(Q1+*sWH,(Initialize t1),kl).intpos(m+n+j)
     =(Initialize t1).intpos(m+n+j) and
A89:  Comput(Q1+*sWH,(Initialize t1),kl).b=(Initialize t1).b-2 and
A90:  Comput(Q1+*sWH,(Initialize t1),kl).a=c
         by A37,A73,A75,A52,A42,A48,A70,A77,A69,A78,A76,A79,A74,A80,XREAL_1:47;
A91:    Initialize Comput(Q1+*sWH,Initialize t1,kl)
        = Comput(Q1+*sWH,Initialize t1,kl) by A81;
A92:    f3 is_FinSequence_on Comput(Q1+*sWH,Initialize t1,kl),m by A82;
A93:    len f3=n by A83;
A94:    f2,f3 are_fiberwise_equipotent by A84;
A95:    f3 is_non_decreasing_on yd,yn by A85;
A96:    for j be Nat st yd<yn & (1<=j & j<yd or yn<j & j<=n)
         holds f3.j= t1.intpos(m+j)
         proof let j be Nat;
          assume yd<yn & (1<=j & j<yd or yn<j & j<=n);
           then f3.j= (Initialize t1).intpos(m+j) by A86;
          hence thesis by SCMPDS_5:15;
         end;
A97:    for j be Nat st yd>=yn & 1<=j & j<= n
         holds f3.j=t1. intpos(m+j)
         proof let j be Nat;
          assume yd>=yn & 1<=j & j<= n;
           then f3.j= (Initialize t1).intpos(m+j) by A87;
          hence thesis by SCMPDS_5:15;
         end;
A98:    for j be Nat st 1<=j & j<2*(k1+1)+1
         holds Comput(Q1+*sWH,Initialize t1,kl).intpos(m+n+j)
                =t1.intpos(m+n+j)
        proof let j be Nat;
         assume 1<=j & j<2*(k1+1)+1;
          then Comput(Q1+*sWH,Initialize t1,kl).intpos(m+n+j)
                = (Initialize t1).intpos(m+n+j) by A88;
         hence thesis by SCMPDS_5:15;
        end;
        set t2= Comput(Q1+*sWH,Initialize t1,kl),
            Q2 = Q1+*sWH;
A99:    t2.b=t1.b-2 by A89,A78;
A100:    t2.a = c by A90;
A101:    2*k1+3=2*(k1+1)+1;
        then jj < 2*(k1+1)+1 by XREAL_1:6;
        then
A102:    t2.intpos k2=t1.intpos(m+n+jj) by A41,A98,NAT_1:11
          .=m+y1 by A41,A64,A57,SCMPDS_4:8;
A103:    ym <= n by A42,A48,A56,XREAL_1:47,XXREAL_0:2;
A104:    now
          per cases;
          suppose
            yd<yn;
            hence f3.ym= t1.intpos(m+ym) by A71,A96,A66;
          end;
          suppose
            yd>=yn;
            hence f3.ym= t1.intpos(m+ym) by A97,A66,A103;
          end;
        end;
A105:    now
          let i be Nat;
          assume that
A106:      1<=i and
A107:      i<=ym;
A108:      i<=n by A103,A107,XXREAL_0:2;
A109:      i<yd by A71,A107,XXREAL_0:2;
          now
            per cases;
            suppose
              yd<yn;
              hence f3.i= t1.intpos(m+i) by A96,A106,A109;
            end;
            suppose
              yd>=yn;
              hence f3.i= t1.intpos(m+i) by A97,A106,A108;
            end;
          end;
          hence f3.i=f2.i by A52,A53,A106,A108;
        end;
        yc <= yn-1 by A56,XREAL_1:9;
        then yc-y1 <= yn-1-y1 by XREAL_1:9;
        then
A110:    yc-y1<=k by A50,XXREAL_0:2;
A111:    yc < yd by A71,XREAL_1:146,XXREAL_0:2;
        set jj=2*k1+2;
        jj >= 2 by NAT_1:11;
        then
A112:    jj >= 1 by XXREAL_0:2;
        jj < 2*(k1+1)+1 by A101,XREAL_1:6;
        then
A113:      t2.intpos (k2+1)=t1.intpos(m+n+jj) by A41,A98,A112
          .=m+yc by A41,A64,A58,SCMPDS_4:8;
A114:  1 <= y1 & yc <= n or y1 >= yc by A48,A68,A42,XREAL_1:47;
A115: (Initialize t2).a = t2.a by SCMPDS_5:15;
A116: (Initialize t2).b = t2.b by SCMPDS_5:15;
A117: (Initialize t2).intpos k2 = t2.intpos k2 by SCMPDS_5:15;
A118: (Initialize t2).intpos(k2+1) = t2.intpos(k2+1) by SCMPDS_5:15;
   f3 is_FinSequence_on (Initialize t2),m
    proof let i be Nat;
     assume 1 <= i & i <= len f3;
      then f3.i= t2.intpos(m+i) by A92;
    hence thesis by SCMPDS_5:15;
    end;
   then consider km be Nat,f4 be FinSequence of INT such that
A119:  Initialize Comput(Q2+*sWH,(Initialize t2),km)
          = Comput(Q2+*sWH,(Initialize t2),km) and
A120:  f4 is_FinSequence_on
     Comput(Q2+*sWH,(Initialize t2),km),m and
A121: len f4=n and
A122:    f3,f4 are_fiberwise_equipotent and
A123:   f4 is_non_decreasing_on y1,yc and
A124:  for j be Nat st y1<yc & (1<=j & j<y1 or yc<j & j<= n)
      holds f4.j= (Initialize t2).intpos(m+j) and
A125:  for j be Nat st y1>=yc & 1<=j & j<= n
      holds f4.j= (Initialize t2).intpos(m+j) and
A126:  for j be Nat st 1<=j & j<2*k1+1
     holds Comput(Q2+*sWH,(Initialize t2),km).intpos(m+n+j)
     =(Initialize t2).intpos(m+n+j) and
A127:  Comput(Q2+*sWH,(Initialize t2),km).b=(Initialize t2).b-2 and
A128:  Comput(Q2+*sWH,(Initialize t2),km).a=c
         by A37,A110,A93,A114,A41,A115,A100,A116,A65,A99,A117,A102,A118,A113;
A129:    Initialize Comput(Q2+*sWH,Initialize t2,km)
          = Comput(Q2+*sWH,Initialize t2,km) by A119;
A130:    f4 is_FinSequence_on Comput(Q2+*sWH,Initialize t2,km),m by A120;
A131:    len f4=n by A121;
A132:   f3,f4 are_fiberwise_equipotent by A122;
A133:   f4 is_non_decreasing_on y1,yc by A123;
A134:   for j be Nat st y1<yc & (1<=j & j<y1 or yc<j & j
        <= n) holds f4.j= t2.intpos(m+j)
          proof let j be Nat;
           assume y1<yc & (1<=j & j<y1 or yc<j & j <= n);
            then f4.j= (Initialize t2).intpos(m+j) by A124;
           hence thesis by SCMPDS_5:15;
          end;
A135:   for j be Nat st y1>=yc & 1<=j & j<= n
           holds f4.j= t2. intpos(m+j)
         proof let j be Nat;
          assume y1>=yc & 1<=j & j<= n;
           then f4.j= (Initialize t2).intpos(m+j) by A125;
           hence thesis by SCMPDS_5:15;
         end;
A136:   for j be Nat st 1<=j & j<2*k1+1 holds
         Comput(Q2+*sWH,Initialize t2,km).intpos(m+n+j)=t2.intpos(m+n+j)
         proof let j be Nat;
          assume 1<=j & j<2*k1+1;
           then Comput(Q2+*sWH,Initialize t2,km).intpos(m+n+j)
             =(Initialize t2).intpos(m+n+j) by A126;
           hence thesis by SCMPDS_5:15;
         end;
A137:   Comput(Q2+*sWH,Initialize t2,km).b=t2.b-2 by A127,A116;
A138:   Comput(Q2+*sWH,Initialize t2,km).a = c by A128;
A139:   now
          let i be Nat;
          assume that
A140:     yc<i and
A141:     i<=len f4;
A142:     1+0 <= i by A140,INT_1:7;
          now
            per cases;
            suppose
              y1<yc;
              hence f4.i= t2.intpos(m+i) by A131,A134,A140,A141;
            end;
            suppose
              y1>=yc;
              hence f4.i= t2.intpos(m+i) by A131,A135,A141,A142;
            end;
          end;
          hence f4.i=f3.i by A92,A93,A131,A141,A142;
        end;
        then f4.ym=f3.ym by A131,A103,XREAL_1:146;
        then
A143:   f4.ym=IExec(I,Q,t).intpos(m+ym) by A64,A104,SCMPDS_4:8;
A144:   now
          let i be Nat;
          assume that
A145:     yn<i and
A146:     i<=len f3;
A147:     1+0<=i by A145,INT_1:7;
          now
            per cases;
            suppose
              yd<yn;
              hence f3.i= t1.intpos(m+i) by A93,A96,A145,A146;
            end;
            suppose
              yd>=yn;
              hence f3.i= t1.intpos(m+i) by A93,A97,A146,A147;
            end;
          end;
          hence f3.i=f2.i by A52,A53,A93,A146,A147;
        end;
A148:   now
          let i be Nat;
          assume that
A149:     ym < i and
A150:     i <= yn;
          consider j be Nat such that
A151:     ym<j and
A152:     j<=yn and
A153:     f3.i=f2.j by A42,A48,A56,A93,A94,A105,A144,A149,A150,RFINSEQ:32
,XREAL_1:47;
A154:     yc < i by A149,XREAL_1:146,XXREAL_0:2;
A155:     1<=j by A66,A151,XXREAL_0:2;
A156:     j<=len f2 by A42,A48,A52,A152,XREAL_1:47,XXREAL_0:2;
          i<=len f4 by A42,A48,A131,A150,XREAL_1:47,XXREAL_0:2;
          then f4.i=f2.j by A139,A154,A153
            .=t1.intpos(m+j) by A53,A155,A156
            .=IExec(I,Q,t).intpos(m+j) by A64,SCMPDS_4:8;
          hence f4.ym <= f4.i by A62,A143,A151,A152;
        end;
A157:   yn>y1 by A48,XREAL_1:47;
A158:   now
          let i be Nat;
          assume that
A159:     1<=i and
A160:     i<=y0;
          i-1 < y1-1 by A160,XREAL_1:146,XXREAL_0:2;
          then
A161:     i<y1 by XREAL_1:9;
          y1 <= n by A42,A157,XXREAL_0:2;
          then
A162:     i<=n by A161,XXREAL_0:2;
          now
            per cases;
            suppose
              y1<yc;
              hence f4.i= t2.intpos(m+i) by A134,A159,A161;
            end;
            suppose
              y1>=yc;
              hence f4.i= t2.intpos(m+i) by A135,A159,A162;
            end;
          end;
          hence f4.i=f3.i by A92,A93,A159,A162;
        end;
A163:   y0 <= yc by A55,XREAL_1:9;
A164:   now
          let i be Nat;
          assume that
A165:     y1 <= i and
A166:     i < ym;
          i+1 <= ym by A166,INT_1:7;
          then
A167:     i<=yc by XREAL_1:19;
          y0 < i by A165,XREAL_1:146,XXREAL_0:2;
          then consider j be Nat such that
A168:     y0<j and
A169:     j<=yc and
A170:     f4.i=f3.j by A68,A131,A132,A163,A158,A139,A167,RFINSEQ:32;
A171:     1+0 <= j by A168,INT_1:7;
A172:     j<= n by A68,A169,XXREAL_0:2;
A173:     j<yd by A111,A169,XXREAL_0:2;
          now
            per cases;
            suppose
              yd<yn;
              hence f3.j= t1.intpos(m+j) by A96,A171,A173;
            end;
            suppose
              yd>=yn;
              hence f3.j= t1.intpos(m+j) by A97,A171,A172;
            end;
          end;
          then
A174:     f4.i=IExec(I,Q,t).intpos(m+j) by A64,A170,SCMPDS_4:8;
A175:     j < ym by A169,XREAL_1:146,XXREAL_0:2;
          y1-1+1 <= j by A168,INT_1:7;
          hence f4.i <= f4.ym by A61,A143,A175,A174;
        end;
        take mm=m1+(kl+km);
        set tm=Comput(Q+*sWH,t,mm);
        take f4;
        Initialize t1 =t1 by A39,A40,A63,A49,Th2,A38;
        then
A176:   tm = Comput(Q+*sWH,Initialize t1,kl+km) by EXTPRO_1:4
          .= Comput(Q2+*sWH,Initialize t2,km)
          by A91,EXTPRO_1:4;
        hence Initialize tm =tm by A129;
        thus f4 is_FinSequence_on tm,m by A130,A176;
        thus len f4=n by A131;
        now
          let i be Nat;
          assume that
A177:     1<=i and
A178:     i <= len f2;
          thus f2.i=t1.intpos(m+i) by A53,A177,A178
            .=IExec(I,Q,t).intpos(m+i) by A64,SCMPDS_4:8;
        end;
        then f2 is_FinSequence_on IExec(I,Q,t),m;
        then f1,f2 are_fiberwise_equipotent by A12,A39,A40,A41,A42,A43,A44,A46
,A47,A52;
        then f1,f3 are_fiberwise_equipotent by A94,CLASSES1:76;
        hence f1,f4 are_fiberwise_equipotent by A132,CLASSES1:76;
A179:   now
          let j be Nat;
          assume that
A180:     yd<=j and
A181:     j<=yn;
A182:     1<=j by A73,A180,XXREAL_0:2;
A183:     j <= n by A42,A48,A181,XREAL_1:47,XXREAL_0:2;
A184:     yc < j by A111,A180,XXREAL_0:2;
          now
            per cases;
            suppose
              y1<yc;
              hence f4.j=t2.intpos(m+j) by A134,A183,A184;
            end;
            suppose
              y1>=yc;
              hence f4.j=t2.intpos(m+j) by A135,A183,A182;
            end;
          end;
          hence f4.j=f3.j by A92,A93,A183,A182;
        end;
        now
          let i,j be Nat;
          assume that
A185:     yd <= i and
A186:     i <= j and
A187:     j <= yn;
          yd <= j by A185,A186,XXREAL_0:2;
          then
A188:     f4.j=f3.j by A179,A187;
          i <= yn by A186,A187,XXREAL_0:2;
          then f4.i=f3.i by A179,A185;
          hence f4.i <= f4.j by A95,A185,A186,A187,A188,FINSEQ_6:def 9;
        end;
        then f4 is_non_decreasing_on yd,yn by FINSEQ_6:def 9;
        hence f4 is_non_decreasing_on y1,yn by A133,A164,A148,Th8;
        thus for j be Nat st y1<yn & (1<=j & j<y1 or yn<j & j<= n)
        holds f4.j= t.intpos(m+j)
        proof
          let j be Nat;
          assume that
A189:     y1<yn and
A190:     1<=j & j<y1 or yn<j & j<= n;
A191:     1<=j & j<= n
          proof
            per cases by A190;
            suppose
A192:         1<=j & j<y1;
              then j<yn by A189,XXREAL_0:2;
              hence thesis by A42,A48,A192,XREAL_1:47,XXREAL_0:2;
            end;
            suppose
A193:         yn<j & j<=n;
              then y1 < j by A189,XXREAL_0:2;
              hence thesis by A42,A48,A193,XREAL_1:47,XXREAL_0:2;
            end;
          end;
A194:     1<=j & j<yd or yn<j & j<= n
          proof
            per cases by A190;
            suppose
              1<=j & j<y1;
              hence thesis by A72,XXREAL_0:2;
            end;
            suppose
              yn<j & j<=n;
              hence thesis;
            end;
          end;
A195:     now
            per cases;
            suppose
              yd<yn;
              hence f3.j=t1.intpos(m+j) by A96,A194;
            end;
            suppose
              yd>=yn;
              hence f3.j=t1.intpos(m+j) by A97,A191;
            end;
          end;
A196:     1<=j & j<y1 or yc<j & j<= n
          proof
            per cases by A190;
            suppose
              1<=j & j<y1;
              hence thesis;
            end;
            suppose
              yn<j & j<=n;
              hence thesis by A67,XXREAL_0:2;
            end;
          end;
          now
            per cases;
            suppose
              y1<yc;
              hence f4.j=t2.intpos(m+j) by A134,A196;
            end;
            suppose
              y1>=yc;
              hence f4.j=t2.intpos(m+j) by A135,A191;
            end;
          end;
          hence f4.j=f3.j by A92,A93,A191
            .=IExec(I,Q,t).intpos(m+j) by A64,A195,SCMPDS_4:8
            .=t.intpos(m+j) by A12,A39,A40,A41,A42,A43,A44,A189,A190;
        end;
        thus for j be Nat st y1>=yn & 1<=j & j<= n holds f4.j=t.
        intpos(m+j) by A48,XREAL_1:47;
        hereby
          let j be Nat;
          assume that
A197:     1<=j and
A198:     j<2*k1+1;
          2*k1+1 < 2*(k1+1)+1 by A101,XREAL_1:6;
          then
A199:     j < 2*(k1+1)+1 by A198,XXREAL_0:2;
          thus tm.intpos(m+n+j)=t2.intpos(m+n+j) by A136,A176,A197,A198
            .=t1.intpos(m+n+j) by A98,A197,A199
            .=IExec(I,Q,t).intpos(m+n+j) by A64,SCMPDS_4:8
            .=t.intpos(m+n+j) by A12,A39,A40,A41,A42,A43,A44,A197,A198;
        end;
        thus tm.b=t.b-2 by A40,A65,A99,A137,A176;
        thus tm.a=c by A138,A176;
      end;
    end;
    hence P[k+1];
  end;
A200: for k being Nat holds P[k] from NAT_1:sch 2(A13,A36);
  ex k be Nat,f2 be FinSequence of INT st
   Initialize Comput(P+*sWH,s,k)
   = Comput(P+*sWH,s,k) &
   f2 is_FinSequence_on Comput(P+*sWH,s,k),m &
len f2=n & f,f2 are_fiberwise_equipotent & f2 is_non_decreasing_on 1,n & (for j
be Nat st 1<n & (1<=j & j<1 or n<j & j<= n) holds f2.j= s.intpos(m+j
)) & (for j be Nat st 1>=n & 1<=j & j<= n holds f2.j= s.intpos(m+j))
  & (for j be Nat st (1<=j & j<2*0+1) holds
   Comput(P+*sWH,s,k).
intpos(m+n+j)=s.intpos(m+n+j)) &
Comput(P+*sWH,s,k).b=s.b-2 &
Comput(P+*sWH,s,k).a=c
  proof
    per cases;
    suppose
      n-1<=0;
      hence thesis by A2,A3,A5,A7,A9,A10,A13,A11;
    end;
    suppose
      n-1>0;
      then reconsider nn=n-1 as Element of NAT by INT_1:3;
      P[nn] by A200;
      hence thesis by A2,A3,A5,A7,A9,A10,A11;
    end;
  end;
  then consider k be Nat,f2 be FinSequence of INT such that
A201: Initialize Comput(P+*sWH,s,k)
= Comput(P+*sWH,s,k) and
A202: f2 is_FinSequence_on
    Comput(P+*sWH,s,k),m and
A203: len f2=n and
A204: f,f2 are_fiberwise_equipotent and
A205: f2 is_non_decreasing_on 1,n and
A206: Comput(P+*sWH,s,k).b=s.b-2 and
A207: Comput(P+*sWH,s,k).a=c;
  set sk= Comput(P+*sWH,s,k),
      s1 = Initialize sk, P1 = P+*sWH+*sWH,
      s2 = Comput(P1,s1,1), P2 = P1;
A208: IC s1 = 0 by MEMSTR_0:def 11;
  set i1=(a,i)<=0_goto (card I+2), i2=goto -(card I+1);
A209: card WH=card I+2 by SCMPDS_8:17;
  then
A210: (card I+2) in dom sWH by COMPOS_1:64;
A211: dom g = Seg n by A4,FINSEQ_1:def 3;
  sWH c= P2 by FUNCT_4:25;
  then
A212: P2.(card I+2) = sWH.(card I+2) by A210,GRFUNC_1:2
    .=halt SCMPDS by A209,COMPOS_1:64;
A213: WH = i1 ';' (I ';' i2 ) by Lm1;
A214: Comput(P1,s1,0+1) = Following(P1,Comput(P1,s1,0)) by EXTPRO_1:3
    .= Exec(i1,s1) by A213,SCMPDS_6:11;
  IC s2 = ICplusConst(s1,(card I+2)) by A7,A201,A206,A207,A214,SCMPDS_2:56
    .= 0+(card I+2) by A208,SCMPDS_6:12;
  then
A215: CurInstr(P2,s2) = halt SCMPDS by A212,PBOOLE:143;
A216: s2= Comput(P+*sWH,s,k+1) by A201,EXTPRO_1:4;
A217: P+*sWH halts_on s
 by A215,A216,EXTPRO_1:29;
  hence WH is_halting_on s,P by A1,SCMPDS_6:def 3;
A218: Result(P+*sWH,s)=s2
 by A215,A216,A217,EXTPRO_1:def 9;
  now
    let i be Nat;
    reconsider a = i as Nat;
    set xi=intpos (m+a);
    assume
A219: i in dom g;
    then
A220: 1 <= i by A211,FINSEQ_1:1;
A221: i <= n by A211,A219,FINSEQ_1:1;
    IExec(WH,P,s)=s2 by A218,SCMPDS_4:def 5;
    hence g.i = s2.xi by A4,A6,A220,A221
      .=s1.xi by A214,SCMPDS_2:56
      .=f2.i by A201,A202,A203,A220,A221;
  end;
  hence thesis by A4,A203,A204,A205,FINSEQ_2:9;
end;

Lm4: for s be 0-started State of SCMPDS,
         I be halt-free shiftable Program of SCMPDS, a
be Int_position, i,c be Integer,m,n,m1 be Nat st s.a=c &
1=s.DataLoc(c,i) & m1=m+n+1 & m+1=s.intpos m1 & m+n=s.intpos(m1+1) &
 (for t be 0-started State of SCMPDS,Q
  for f1,f2 be FinSequence of INT, k1,k2,y1,yn be Nat st t
.a=c & 2*k1+1=t.DataLoc(c,i) & k2=m+n+2*k1+1 & m+y1=t.intpos k2 & m+yn=t.intpos
(k2+1) & (1 <= y1 & yn <= n or y1 >= yn) holds I is_closed_on t,Q & I
is_halting_on t,Q & IExec(I,Q,t).a=t.a & (for j be Nat
 st (1<=j & j<2*k1
+1) holds IExec(I,Q,t).intpos(m+n+j)=t.intpos(m+n+j)) & (y1>=yn
 implies IExec(I,Q,t).DataLoc(c,i)=2*k1-1
  & (for j be Nat st (1<=j & j <= n) holds IExec
(I,Q,t).intpos (m+j) = t.intpos (m+j))) & (y1<yn
 implies IExec(I,Q,t).DataLoc(c,i)=
2*k1+3 & (for j be Nat st 1<=j & j<y1 or yn<j & j <= n holds
IExec(I,Q,t).intpos(m+j) = t.intpos (m+j))
 & (ex ym be Nat st y1 <= ym
& ym <= yn & m+y1=IExec(I,Q,t).intpos k2
 & m+ym-1=IExec(I,Q,t).intpos (k2+1) & m+ym
+1=IExec(I,Q,t).intpos (k2+2) & m+yn=
IExec(I,Q,t).intpos (k2+3)
 & (for j be Nat st y1 <= j & j < ym
 holds IExec(I,Q,t).intpos (m+j) <= IExec(I,Q,t).intpos (
m+ym)) & (for j be Nat st ym < j & j <= yn
 holds IExec(I,Q,t).intpos (
m+j) >= IExec(I,Q,t).intpos (m+ym)))) & (f1 is_FinSequence_on t,m
 & f2
is_FinSequence_on IExec(I,Q,t),m & len f1=n & len f2=n implies f1,f2
are_fiberwise_equipotent)) holds while>0(a,i,I) is_halting_on s,P
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, a be
  Int_position, i,c be Integer,m,n,m1 be Nat;
  set b=DataLoc(c,i);
  assume
A1: s.a=c;
  consider f be FinSequence of INT such that
A2: len f=n and
A3: for i be Nat st 1<=i & i <= len f holds f.i=s.intpos(m+i)
  by SCPISORT:1;
A4: f is_FinSequence_on s,m by A3;
  set ss=IExec(while>0(a,i,I),P,s);
  assume
A5: 1=s.b;
  consider g be FinSequence of INT such that
A6: len g=n and
A7: for i be Nat st 1<=i & i <= len g holds g.i=ss.intpos(m+
  i ) by SCPISORT:1;
A8: g is_FinSequence_on ss,m by A7;
  assume that
A9: m1=m+n+1 and
A10: m+1=s.intpos m1 and
A11: m+n=s.intpos(m1+1);
  assume
  for t be 0-started State of SCMPDS,Q
  for f1,f2 be FinSequence of INT, k1,k2,y1,yn be
Nat st t.a=c & 2*k1+1=t.b & k2=m+n+2*k1+1 & m+y1=t.intpos k2 & m+yn=
  t.intpos(k2+1) & (1 <= y1 & yn <= n or y1 >= yn) holds I is_closed_on t,Q & I
is_halting_on t,Q & IExec(I,Q,t).a=t.a & (for j be Nat
 st (1<=j & j<2*k1
+1) holds IExec(I,Q,t).intpos(m+n+j)=t.intpos(m+n+j))
 & (y1>=yn implies IExec(I,Q,t).b=2*k1-1
  & for j be Nat st 1<=j & j <= n
 holds IExec(I,Q,t).intpos (
  m+j) = t.intpos (m+j) ) & (y1<yn implies IExec(I,Q,t).b=2*k1+3
   & (for j be Nat st 1<=j & j<y1 or yn<j & j <= n
 holds IExec(I,Q,t).intpos (m+j
  ) = t.intpos (m+j)) & ex ym be Nat st y1 <= ym & ym <= yn & m+y1=
  IExec(I,Q,t).intpos k2 & m+ym-1=
  IExec(I,Q,t).intpos (k2+1)
   & m+ym+1=IExec(I,Q,t).
intpos (k2+2) & m+yn=IExec(I,Q,t).intpos (k2+3)
 & (for j be Nat st y1 <= j & j < ym
 holds IExec(I,Q,t).intpos(m+j) <=
 IExec(I,Q,t).intpos(m+ym)) & for j be Nat st ym < j & j <= yn
 holds IExec(I,Q,t).intpos(m+j) >=
 IExec(I,Q,t).intpos(m+ym) )
  & (f1 is_FinSequence_on t,m
 & f2 is_FinSequence_on IExec(I,Q,t),
  m & len f1=n & len f2=n implies f1,f2 are_fiberwise_equipotent);
  hence thesis by A1,A5,A9,A10,A11,A2,A4,A6,A8,Lm3;
end;

Lm5: for s be 0-started State of SCMPDS,
         I be halt-free shiftable Program of SCMPDS, a
be Int_position, i,c be Integer,m,n,m1 be Nat st s.a=c &
1=s.DataLoc(c,i) & m1=m+n+1 & m+1=s.intpos m1 & m+n=s.intpos(m1+1) &
 (for t be 0-started State of SCMPDS,Q
  for f1,f2 be FinSequence of INT, k1,k2,y1,yn be Nat st t
.a=c & 2*k1+1=t.DataLoc(c,i) & k2=m+n+2*k1+1 & m+y1=t.intpos k2 &
  m+yn=t.intpos(k2+1) & (1 <= y1 & yn <= n or y1 >= yn)
   holds I is_closed_on t,Q & I
is_halting_on t,Q & IExec(I,Q,t).a=t.a & (for j be Nat
 st (1<=j & j<2*k1
+1) holds IExec(I,Q,t).intpos(m+n+j)=t.intpos(m+n+j))
 & (y1>=yn implies IExec(I,Q,t).DataLoc(c,i)=2*k1-1
  & (for j be Nat st (1<=j & j <= n) holds IExec
(I,Q,t).intpos (m+j) = t.intpos (m+j)))
 & (y1<yn implies IExec(I,Q,t).DataLoc(c,i)=
2*k1+3 & (for j be Nat st 1<=j & j<y1 or yn<j & j <= n holds
IExec(I,Q,t).intpos(m+j) = t.intpos (m+j))
 & (ex ym be Nat st y1 <= ym
& ym <= yn & m+y1=IExec(I,Q,t).intpos k2
 & m+ym-1=IExec(I,Q,t).intpos (k2+1) & m+ym
+1=IExec(I,Q,t).intpos (k2+2) &
m+yn=IExec(I,Q,t).intpos (k2+3)
 & (for j be Nat st y1 <= j & j < ym
 holds IExec(I,Q,t).intpos (m+j) <= IExec(I,Q,t).intpos (
m+ym)) & (for j be Nat st ym < j & j <= yn
 holds IExec(I,Q,t).intpos (
m+j) >= IExec(I,Q,t).intpos (m+ym)))) & (f1 is_FinSequence_on t,m
 & f2
is_FinSequence_on IExec(I,Q,t),m & len f1=n & len f2=n implies f1,f2
are_fiberwise_equipotent))
 holds while>0(a,i,I) is_halting_on s,P & while>0(a,i,I) is_closed_on s,P
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, a be
  Int_position, i,c be Integer,m,n,m1 be Nat;
  set b=DataLoc(c,i);
  assume
A1: s.a=c;
  assume
A2: 1=s.b;
  assume that
A3: m1=m+n+1 and
A4: m+1=s.intpos m1 and
A5: m+n=s.intpos(m1+1);
  assume
A6: for t be 0-started State of SCMPDS,Q
   for f1,f2 be FinSequence of INT, k1,k2,y1,yn be
Nat st t.a=c & 2*k1+1=t.b & k2=m+n+2*k1+1 & m+y1=t.intpos k2 & m+yn=
  t.intpos(k2+1) & (1 <= y1 & yn <= n or y1 >= yn) holds I is_closed_on t,Q & I
is_halting_on t,Q & IExec(I,Q,t).a=t.a & (for j be Nat
 st (1<=j & j<2*k1
+1) holds IExec(I,Q,t).intpos(m+n+j)=t.intpos(m+n+j))
 & (y1>=yn implies IExec(I,Q,t).b=2*k1-1
  & for j be Nat st 1<=j & j <= n
 holds IExec(I,Q,t).intpos (
  m+j) = t.intpos (m+j) ) & (y1<yn implies IExec(I,Q,t).b=2*k1+3
   & (for j be
Nat st 1<=j & j<y1 or yn<j & j <= n
 holds IExec(I,Q,t).intpos (m+j
  ) = t.intpos (m+j)) & ex ym be Nat st y1 <= ym & ym <= yn & m+y1=
  IExec(I,Q,t).intpos k2 & m+ym-1=
  IExec(I,Q,t).intpos (k2+1)
   & m+ym+1=IExec(I,Q,t).
intpos (k2+2) & m+yn=IExec(I,Q,t).intpos (k2+3)
 & (for j be Nat st y1
<= j & j < ym holds IExec(I,Q,t).intpos(m+j) <=
IExec(I,Q,t).intpos(m+ym))
 & for j
be Nat st ym < j & j <= yn
 holds IExec(I,Q,t).intpos(m+j) >=
 IExec(I,Q,t).intpos(m+ym) )
  & (f1 is_FinSequence_on t,m & f2 is_FinSequence_on IExec(I,Q,t),
  m & len f1=n & len f2=n implies f1,f2 are_fiberwise_equipotent);
A7: now
    let v be 0-started State of SCMPDS;
    let V;
    assume
A8: DataPart v = DataPart s;
    then
A9: 1 =v.b by A2,SCMPDS_4:8;
A10: m+n =v.intpos (m1+1) by A5,A8,SCMPDS_4:8;
A11: m+1 =v.intpos m1 by A4,A8,SCMPDS_4:8;
    v.a =c by A1,A8,SCMPDS_4:8;
    hence while>0(a,i,I) is_halting_on v,V by A3,A6,A9,A11,A10,Lm4;
  end;
  hence while>0(a,i,I) is_halting_on s,P;
  thus thesis by A7,Th3;
end;

begin :: Program Partition is to split a sequence into a "smaller" and

::       a "larger" subsequence
:: a5=a7=length  a2=mid(x[1]), a3=x[2], a4=x[n], a6=save

definition
  func Partition -> Program of SCMPDS equals
  ((GBP,5):=(GBP,4) ';' SubFrom(GBP
,5,GBP,2) ';' (GBP,3):=(GBP,2) ';' AddTo(GBP,3,1)) ';' while>0(GBP,5, while>0(
  GBP,5, (GBP,7):=(GBP,5) ';' AddTo(GBP,5,-1) ';' (GBP,6):=(intpos 4,0) ';'
SubFrom(GBP,6,intpos 2,0) ';' if>0(GBP,6, AddTo(GBP,4,-1) ';' AddTo(GBP,7,-1),
Load (GBP,5):=0 ) ) ';' while>0(GBP,7, (GBP,5):=(GBP,7) ';' AddTo(GBP,7,-1) ';'
(GBP,6):=(intpos 2,0) ';' SubFrom(GBP,6,intpos 3,0) ';' if>0(GBP,6, AddTo(GBP,3
,1) ';' AddTo(GBP,5,-1), Load (GBP,7):=0 ) ) ';' if>0(GBP,5,((GBP,6):=(intpos 4
,0) ';' (intpos 4,0):=(intpos 3,0) ';' (intpos 3,0):=(GBP,6) ';' AddTo(GBP,5,-2
  ) ';' AddTo(GBP,3,1)) ';' AddTo(GBP,4,-1) ) ) ';' (GBP,6):=(intpos 4,0) ';' (
  intpos 4,0):=(intpos 2,0) ';' (intpos 2,0):=(GBP,6);
  coherence;
end;

begin :: The Construction of Quick Sort

:: a0=global, a1=stack, a2=stack depth

definition
  let n,p0 be Nat;
  func QuickSort(n,p0) -> Program of SCMPDS equals
  ((GBP:=0) ';' (SBP:=1) ';'
(SBP,p0+n):=(p0+1) ';' (SBP,p0+n+1):=(p0+n)) ';' while>0(GBP,1, (GBP,2):=(SBP,
  p0+n+1) ';' SubFrom(GBP,2,SBP,p0+n) ';' if>0(GBP,2, (GBP,2):=(SBP,p0+n) ';' (
GBP,4):=(SBP,p0+n+1) ';' Partition ';' (((SBP,p0+n+3):=(SBP,p0+n+1) ';' (SBP,p0
  +n+1):=(GBP,4) ';' (SBP,p0+n+2):=(GBP,4) ';' AddTo(SBP,p0+n+1,-1)) ';' AddTo(
  SBP,p0+n+2,1) ';' AddTo(GBP,1,2)), Load AddTo(GBP,1,-2) ) );
  coherence;
end;

set i1= (GBP,7):=(GBP,5), i2= AddTo(GBP,5,-1), i3= (GBP,6):=(intpos 4,0), i4=
SubFrom(GBP,6,intpos 2,0), i5= AddTo(GBP,4,-1), i6= AddTo(GBP,7,-1), i7= Load (
GBP,5):=0, IF1= if>0(GBP,6,i5 ';' i6,i7), WB1= i1 ';' i2 ';' i3 ';' i4 ';' IF1,
WH1= while>0(GBP,5,WB1), j1= (GBP,5):=(GBP,7), j2= AddTo(GBP,7,-1), j3= (GBP,6)
:=(intpos 2,0), j4= SubFrom(GBP,6,intpos 3,0), j5= AddTo(GBP,3,1), j6= AddTo(
GBP,5,-1), j7= Load (GBP,7):=0, IF2= if>0(GBP,6,j5 ';' j6, j7), WB2= j1 ';' j2
';' j3 ';' j4 ';' IF2,
WH2= while>0(GBP,7,WB2),
k1 = (GBP,5):=(GBP,4), k2 =
SubFrom(GBP,5,GBP,2), k3 = (GBP,3):=(GBP,2), k4 = AddTo(GBP,3,1), K4 = k1 ';'
k2 ';' k3 ';' k4, k5 = (GBP,6):=(intpos 4,0), k6 = (intpos 4,0):=(intpos 3,0),
k7 = (intpos 3,0):=(GBP,6), k8 = AddTo(GBP,5,-2), k9 = AddTo(GBP,3,1), k0 =
AddTo(GBP,4,-1), IF3= if>0(GBP,5, k5 ';' k6 ';' k7 ';' k8 ';' k9 ';' k0), WB3=
WH1 ';' WH2 ';' IF3, WH3= while>0(GBP,5,WB3), j8 = (GBP,6):=(intpos 4,0), j9 =
(intpos 4,0):=(intpos 2,0), j0 = (intpos 2,0):=(GBP,6);

set a1=intpos 1, a2=intpos 2, a3=intpos 3, a4=intpos 4, a5=intpos 5, a6=intpos
6, a7=intpos 7;

Lm6: card WB1=9
proof
  thus card WB1= card (i1 ';' i2 ';' i3 ';' i4) + card IF1 by AFINSQ_1:17
    .= 4+card IF1 by Th4
    .= 4+(card (i5 ';' i6)+card i7+2) by SCMPDS_6:65
    .= 4+(2+card i7+2) by SCMP_GCD:5
    .= 4+(2+1+2) by COMPOS_1:54
    .= 9;
end;

Lm7:
 for s being 0-started State of SCMPDS,
md,me be Nat st s.a2=md & s.a4=me
& md >= 8 & me >= 8 & s.GBP=0
 holds IExec(WB1,P,s).GBP=0 &
  IExec(WB1,P,s).a1=s.a1 &
  IExec(WB1,P,s).a2=s.a2 &
  IExec(WB1,P,s).a3=s.a3 &
  (for i be Nat st i >= 8
   holds IExec(WB1,P,s).intpos i=s.intpos i) &
    (s.intpos md < s.intpos me implies
      IExec(WB1,P,s).a5=s.a5-1 &
      IExec(WB1,P,s).a4=s.a4-1 &
      IExec(WB1,P,s).a7=s.a5-1) &
    (s.intpos md >= s.intpos me implies
      IExec(WB1,P,s).a5=0 &
      IExec(WB1,P,s).a4=s.a4 &
      IExec(WB1,P,s).a7=s.a5)
proof
  set a=GBP;
  let s be 0-started State of SCMPDS,md,me be Nat;
  assume that
A1: s.a2=md and
A2: s.a4=me and
A3: md >= 8 and
A4: me >= 8 and
A5: s.a=0;
  set t0=s, Q0 = P,
  t1=IExec(i1 ';' i2 ';' i3 ';' i4,P,s),
      Q1 = P,
      t2=IExec(i1 ';' i2 ';' i3,P,s),
      t3=IExec(i1 ';' i2,P,s),
      Q2 = P,
      t4=Exec(i1, t0), Q4 = Q0;

A6: t0.a=0 by A5;
A7: DataLoc(t0.a,7)=intpos (0+7) by A5,SCMP_GCD:1;
  then
A8: t4.a =0 by A6,AMI_3:10,SCMPDS_2:47;
  then
A9: DataLoc(t4.a,5)=intpos (0+5) by SCMP_GCD:1;
A10: t4.a4 =me by A7,A2,AMI_3:10,SCMPDS_2:47;
A11: t3.a4 =Exec(i2, t4).a4 by SCMPDS_5:42
    .=me by A10,A9,AMI_3:10,SCMPDS_2:48;
  then
A12: DataLoc(t3.a4,0)=intpos (me+0) by SCMP_GCD:1;
A13: t3.a =Exec(i2, t4).a by SCMPDS_5:42
    .=0 by A8,A9,AMI_3:10,SCMPDS_2:48;
  then
A14: DataLoc(t3.a,6)=intpos (0+6) by SCMP_GCD:1;
A15: t4.a2 =md by A7,A1,AMI_3:10,SCMPDS_2:47;
A16: t3.a2 =Exec(i2, t4).a2 by SCMPDS_5:42
    .=md by A15,A9,AMI_3:10,SCMPDS_2:48;
A17: t4.a5 =s.a5 by A7,AMI_3:10,SCMPDS_2:47;
  set t01=Initialize Initialize t1, ii7= (GBP,5):=0, t5=Exec(i5,t01);
A18: t2.a2 =Exec(i3, t3).a2 by SCMPDS_5:41
    .=md by A16,A14,AMI_3:10,SCMPDS_2:47;
A19: t2.a =Exec(i3, t3).a by SCMPDS_5:41
    .=0 by A13,A14,AMI_3:10,SCMPDS_2:47;
  then
A20: DataLoc(t2.a,6)=intpos (0+6) by SCMP_GCD:1;
  DataLoc(t0.a,5)=intpos (0+5) by A6,SCMP_GCD:1;
  then
A21: t4.a7 =s.a5 by A7,SCMPDS_2:47;
A22: t3.a7 =Exec(i2, t4).a7 by SCMPDS_5:42
    .=s.a5 by A21,A9,AMI_3:10,SCMPDS_2:48;
A23: t2.a7 =Exec(i3, t3).a7 by SCMPDS_5:41
    .=s.a5 by A22,A14,AMI_3:10,SCMPDS_2:47;
  t1.a7 =Exec(i4, t2).a7 by SCMPDS_5:41
    .=s.a5 by A23,A20,AMI_3:10,SCMPDS_2:50;
  then
A24: t01.a7=s.a5 by SCMPDS_5:15;
  t1.a2 =Exec(i4, t2).a2 by SCMPDS_5:41
    .=md by A18,A20,AMI_3:10,SCMPDS_2:50;
  then
A25: t01.a2=s.a2 by A1,SCMPDS_5:15;
A26: now
    let i be Nat;
    assume i>=8;
    then i > 7 by XXREAL_0:2;
    hence t4.intpos i = s.intpos i by A7,AMI_3:10,SCMPDS_2:47;
  end;
A27: now
    let i be Nat;
    assume
A28: i>=8;
    then
A29: i > 5 by XXREAL_0:2;
    thus t3.intpos i =Exec(i2, t4).intpos i by SCMPDS_5:42
      .=t4.intpos i by A9,A29,AMI_3:10,SCMPDS_2:48
      .=s.intpos i by A26,A28;
  end;
A30: now
    let i be Nat;
    assume
A31: i>=8;
    then
A32: i > 6 by XXREAL_0:2;
    thus t2.intpos i=Exec(i3, t3).intpos i by SCMPDS_5:41
      .=t3.intpos i by A14,A32,AMI_3:10,SCMPDS_2:47
      .=s.intpos i by A27,A31;
  end;
A33: now
    let i be Nat;
    assume
A34: i>=8;
    then
A35: i > 6 by XXREAL_0:2;
    thus t1.intpos i=Exec(i4, t2).intpos i by SCMPDS_5:41
      .=t2.intpos i by A20,A35,AMI_3:10,SCMPDS_2:50
      .=s.intpos i by A30,A34;
  end;
A36: t4.a3 =s.a3 by A7,AMI_3:10,SCMPDS_2:47;
A37: t3.a3 =Exec(i2, t4).a3 by SCMPDS_5:42
    .=s.a3 by A36,A9,AMI_3:10,SCMPDS_2:48;
A38: t4.a1 =s.a1 by A7,AMI_3:10,SCMPDS_2:47;
A39: t3.a1 =Exec(i2, t4).a1 by SCMPDS_5:42
    .=s.a1 by A38,A9,AMI_3:10,SCMPDS_2:48;
A40: t2.a1 =Exec(i3, t3).a1 by SCMPDS_5:41
    .=s.a1 by A39,A14,AMI_3:10,SCMPDS_2:47;
  t1.a1 =Exec(i4, t2).a1 by SCMPDS_5:41
    .=s.a1 by A40,A20,AMI_3:10,SCMPDS_2:50;
  then
A41: t01.a1=s.a1 by SCMPDS_5:15;
A42: t2.a3 =Exec(i3, t3).a3 by SCMPDS_5:41
    .=s.a3 by A37,A14,AMI_3:10,SCMPDS_2:47;
  t1.a3 =Exec(i4, t2).a3 by SCMPDS_5:41
    .=s.a3 by A42,A20,AMI_3:10,SCMPDS_2:50;
  then
A43: t01.a3=s.a3 by SCMPDS_5:15;
A44: t1.a =Exec(i4, t2).a by SCMPDS_5:41
    .=0 by A19,A20,AMI_3:10,SCMPDS_2:50;
  then
A45: t01.a=0 by SCMPDS_5:15;
  then
A46: DataLoc(t01.a,5)=intpos(0+5) by SCMP_GCD:1;
  a3<>DataLoc(t01.a,4) by A45,AMI_3:10,SCMP_GCD:1;
  then
A47: t5.a3=s.a3 by A43,SCMPDS_2:48;
  a2<>DataLoc(t01.a,4) by A45,AMI_3:10,SCMP_GCD:1;
  then
A48: t5.a2=s.a2 by A25,SCMPDS_2:48;
  a<>DataLoc(t01.a,4) by A45,AMI_3:10,SCMP_GCD:1;
  then
A49: t5.a=0 by A45,SCMPDS_2:48;
  then
A50: DataLoc(t5.a,7)=intpos(0+7) by SCMP_GCD:1;
A51: t2.a6 =Exec(i3, t3).a6 by SCMPDS_5:41
    .=t3.intpos me by A14,A12,SCMPDS_2:47
    .=s.intpos me by A4,A27;
  t1.a6 =Exec(i4, t2).a6 by SCMPDS_5:41
    .=t2.a6-t2.DataLoc(t2.a2,0) by A20,SCMPDS_2:50
    .=t2.a6-t2.intpos(md+0) by A18,SCMP_GCD:1
    .=s.intpos me - s.intpos md by A3,A51,A30;
  then
A52: t1.DataLoc(t1.a,6)=s.intpos me - s.intpos md by A44,SCMP_GCD:1;
  a1<>DataLoc(t01.a,4) by A45,AMI_3:10,SCMP_GCD:1;
  then
A53: t5.a1=s.a1 by A41,SCMPDS_2:48;
A54: now
    per cases;
    suppose
A55:  t01.DataLoc(t01.a,6) <= 0;
      hence IExec(IF1,Q1,Initialize t1).a
      =IExec(i7,Q1,Initialize t1).a by SCMPDS_6:74
        .=Exec(ii7,t01).a by SCMPDS_5:40
        .=0 by A45,A46,AMI_3:10,SCMPDS_2:46;
      thus IExec(IF1,Q1,Initialize t1).a1
      =IExec(i7,Q1,Initialize t1).a1 by A55,SCMPDS_6:74
        .=Exec(ii7,t01).a1 by SCMPDS_5:40
        .=s.a1 by A41,A46,AMI_3:10,SCMPDS_2:46;
      thus IExec(IF1,Q1,Initialize t1).a2
      =IExec(i7,Q1,Initialize t1).a2 by A55,SCMPDS_6:74
        .=Exec(ii7,t01).a2 by SCMPDS_5:40
        .=s.a2 by A25,A46,AMI_3:10,SCMPDS_2:46;
      thus IExec(IF1,Q1,Initialize t1).a3
      =IExec(i7,Q1,Initialize t1).a3 by A55,SCMPDS_6:74
        .=Exec(ii7,t01).a3 by SCMPDS_5:40
        .=s.a3 by A43,A46,AMI_3:10,SCMPDS_2:46;
        let i be Nat;
        assume
A56:    i>=8;
        then
A57:    i > 5 by XXREAL_0:2;
        thus IExec(WB1,P,s).intpos i=
        IExec(IF1,Q1,Initialize t1).intpos i by SCMPDS_5:35
          .=IExec(i7,Q1,Initialize t1).intpos i by A55,SCMPDS_6:74
          .=Exec(ii7,t01).intpos i by SCMPDS_5:40
          .=t01.intpos i by A46,A57,AMI_3:10,SCMPDS_2:46
          .=t1.intpos i by SCMPDS_5:15
          .=s.intpos i by A33,A56;
    end;
    suppose
A58:  t01.DataLoc(t01.a,6) > 0;
      thus IExec(IF1,Q1,Initialize t1).a
      =IExec(i5 ';' i6,Q1,Initialize t1).a
       by A58,SCMPDS_6:73
        .=Exec(i6,t5).a by SCMPDS_5:42
        .=0 by A49,A50,AMI_3:10,SCMPDS_2:48;
      thus IExec(IF1,Q1,Initialize t1).a1
      =IExec(i5 ';' i6,Q1,Initialize t1).a1
       by A58,SCMPDS_6:73
        .=Exec(i6,t5).a1 by SCMPDS_5:42
        .=s.a1 by A53,A50,AMI_3:10,SCMPDS_2:48;
      thus IExec(IF1,Q1,Initialize t1).a2
      =IExec(i5 ';' i6,Q1,Initialize t1).a2
       by A58,SCMPDS_6:73
        .=Exec(i6,t5).a2 by SCMPDS_5:42
        .=s.a2 by A48,A50,AMI_3:10,SCMPDS_2:48;
      thus IExec(IF1,Q1,Initialize t1).a3
      =IExec(i5 ';' i6,Q1,Initialize t1).a3
       by A58,SCMPDS_6:73
        .=Exec(i6,t5).a3 by SCMPDS_5:42
        .=s.a3 by A47,A50,AMI_3:10,SCMPDS_2:48;
        let i be Nat;
        assume
A59:    i>=8;
        then
A60:    i > 7 by XXREAL_0:2;
        i > 4 by A59,XXREAL_0:2;
        then
A61:    intpos i<>DataLoc(t01.a,4) by A45,AMI_3:10,SCMP_GCD:1;
        thus IExec(WB1,P,s).intpos i=
        IExec(IF1,Q1,Initialize t1).intpos i by SCMPDS_5:35
          .=IExec(i5 ';' i6,Q1,Initialize t1).intpos i by A58,SCMPDS_6:73
          .=Exec(i6,t5).intpos i by SCMPDS_5:42
          .=t5.intpos i by A50,A60,AMI_3:10,SCMPDS_2:48
          .=t01.intpos i by A61,SCMPDS_2:48
          .=t1.intpos i by SCMPDS_5:15
          .=s.intpos i by A33,A59;
    end;
  end;
  hence IExec(WB1,P,s).a=0 & IExec(WB1,P,s).a1=s.a1
   & IExec(WB1,P,s).a2=s.a2 & IExec(WB1,P,s).a3=s.a3
    by SCMPDS_5:35;
  thus for i be Nat st i >= 8
  holds IExec(WB1,P,s).intpos i=s.intpos i by A54;
A62: t3.a5 =Exec(i2, t4).a5 by SCMPDS_5:42
    .=t4.a5+ -1 by A9,SCMPDS_2:48
    .=s.a5-1 by A17;
A63: t2.a5 =Exec(i3, t3).a5 by SCMPDS_5:41
    .=s.a5-1 by A62,A14,AMI_3:10,SCMPDS_2:47;
  t1.a5 =Exec(i4, t2).a5 by SCMPDS_5:41
    .=s.a5-1 by A63,A20,AMI_3:10,SCMPDS_2:50;
  then
A64: t01.a5=s.a5-1 by SCMPDS_5:15;
A65: t2.a4 =Exec(i3, t3).a4 by SCMPDS_5:41
    .=me by A11,A14,AMI_3:10,SCMPDS_2:47;
  t1.a4 =Exec(i4, t2).a4 by SCMPDS_5:41
    .=me by A65,A20,AMI_3:10,SCMPDS_2:50;
  then
A66: t01.a4=s.a4 by A2,SCMPDS_5:15;
A67: DataLoc(t01.a,4)=intpos(0+4) by A45,SCMP_GCD:1;
A68: t01.DataLoc(t01.GBP,6) = t01.DataLoc(t1.GBP,6) by SCMPDS_5:15
          .= t1.DataLoc(t1.GBP,6) by SCMPDS_5:15;
  hereby
A69: a5<>DataLoc(t01.a,4) by A45,AMI_3:10,SCMP_GCD:1;
    assume s.intpos md < s.intpos me; then
A70: 0<s.intpos me - s.intpos md by XREAL_1:50;
A71: t01.DataLoc(t01.GBP,6) = t01.DataLoc(t1.GBP,6) by SCMPDS_5:15
          .= t1.DataLoc(t1.GBP,6) by SCMPDS_5:15;
    thus IExec(WB1,P,s).a5=IExec(IF1,Q1,t01).a5 by SCMPDS_5:35
      .=IExec(i5 ';' i6,Q1,t01).a5 by A52,A70,A71,SCMPDS_6:73
      .=Exec(i6,t5).a5 by SCMPDS_5:42
      .=t5.a5 by A50,AMI_3:10,SCMPDS_2:48
      .=s.a5-1 by A64,A69,SCMPDS_2:48;
    thus IExec(WB1,P,s).a4=IExec(IF1,Q1,Initialize t01).a4
     by SCMPDS_5:35
      .=IExec(i5 ';' i6,Q1,Initialize t01).a4 by A52,A71,A70,SCMPDS_6:73
      .=Exec(i6,t5).a4 by SCMPDS_5:42
      .=t5.a4 by A50,AMI_3:10,SCMPDS_2:48
      .=t01.a4+-1 by A67,SCMPDS_2:48
      .=s.a4-1 by A66;
A72: a7<>DataLoc(t01.a,4) by A45,AMI_3:10,SCMP_GCD:1;
    thus IExec(WB1,P,s).a7=IExec(IF1,Q1,Initialize t1).a7
     by SCMPDS_5:35
      .=IExec(i5 ';' i6,Q1,Initialize t1).a7 by A52,A71,A70,SCMPDS_6:73
      .=Exec(i6,t5).a7 by SCMPDS_5:42
      .=t5.a7+ -1 by A50,SCMPDS_2:48
      .=t5.a7-1
      .=s.a5-1 by A24,A72,SCMPDS_2:48;
  end;
    assume s.intpos md >= s.intpos me;
   then
A73: s.intpos me - s.intpos md <= 0 by XREAL_1:47;
    thus IExec(WB1,P,s).a5=IExec(IF1,Q1,Initialize t1).a5
     by SCMPDS_5:35
      .=IExec(i7,Q1,Initialize t1).a5 by A52,A68,A73,SCMPDS_6:74
      .=Exec(ii7,t01).a5 by SCMPDS_5:40
      .=0 by A46,SCMPDS_2:46;
    thus IExec(WB1,P,s).a4
    =IExec(IF1,Q1,Initialize t1).a4
     by SCMPDS_5:35
      .=IExec(i7,Q1,Initialize t1).a4 by A52,A68,A73,SCMPDS_6:74
      .=Exec(ii7,t01).a4 by SCMPDS_5:40
      .=s.a4 by A46,A66,AMI_3:10,SCMPDS_2:46;
    thus IExec(WB1,P,s).a7=IExec(IF1,Q1,Initialize t1).a7
     by SCMPDS_5:35
      .=IExec(i7,Q1,Initialize t1).a7 by A52,A68,A73,SCMPDS_6:74
      .=Exec(ii7,t01).a7 by SCMPDS_5:40
      .=s.a5 by A24,A46,AMI_3:10,SCMPDS_2:46;
end;

Lm8: for s being 0-started State of SCMPDS,
m4,md be Nat st s.GBP=0 & s.a5 > 0
& s.a4=m4+s.a5 & m4>=8 & s.a2=md & md >= 8
 holds IExec(WH1,P,s).GBP=0 & IExec(WH1,P,s).a1=s.a1
  & IExec(WH1,P,s).a5=0 & IExec(WH1,P,s).a2=s.a2 &
  IExec(WH1,P,s).a3=s.a3 &
(for i be Nat st i >= 8
 holds IExec(WH1,P,s).intpos i=s.intpos i)
 & ex mE be Nat st mE=IExec(WH1,P,s).a7
 & IExec(WH1,P,s).a4=m4+mE & mE <= s.a5
& (for i be Nat st m4+mE < i & i <=s.a4
 holds IExec(WH1,P,s).intpos md
< IExec(WH1,P,s).intpos i) &
 (mE = 0 or IExec(WH1,P,s).intpos md >= IExec(WH1,P,s).intpos(m4+mE))
proof
  set a=GBP;
  let s be 0-started State of SCMPDS,m4,md be Nat;
  assume that
A1: s.GBP=0 and
A2: s.a5 > 0 and
A3: s.a4=m4+s.a5 and
A4: m4>=8 and
A5: s.a2=md and
A6: md >= 8;
  s.a5 >=1+0 by A2,INT_1:7;
  then reconsider m5=s.a5-1 as Element of NAT by INT_1:3,XREAL_1:48;
A7: s.a5=m5+1;
  defpred P[Nat] means
   for t being 0-started State of SCMPDS,Q st t.a=0 & t.a5 =$1+1 &
    t.a4=m4+t.a5 & t.a2=md holds IExec(WH1,Q,t).a=0
 & IExec(WH1,Q,t).a1=t.a1 &
  IExec(WH1,Q,t).a5=0 & IExec(WH1,Q,t).a2=t.a2 &
  IExec(WH1,Q,t).a3=t.a3
   & (for i be Nat st i >= 8
   holds IExec(WH1,Q,t).intpos i=t.intpos i) &
   ex mE be Nat st mE=IExec(WH1,Q,t).a7
   & IExec(WH1,Q,t).a4=m4+mE & mE <= t.a5 &
   (for i be Nat st m4+mE < i & i <=t.a4
  holds IExec(WH1,Q,t).intpos md < IExec(WH1,Q,t).intpos i) &
 (mE=0 or IExec(WH1,Q,t).intpos md >= IExec(WH1,Q,t).intpos(m4+mE));
A8: now
    let k be Nat;
    assume
A9: P[k];
    thus P[k+1]
    proof
      set me=m4+(k+1+1);
      let t be 0-started State of SCMPDS;
      let Q;
      set b=DataLoc(t.a,5);
      assume that
A10:  t.a=0 and
A11:  t.a5 =(k+1)+1 and
A12:  t.a4=m4+t.a5 and
A13:  t.a2=md;
      set It= IExec(WB1,Q,t), IT = Q, It0 = Initialize It;
A14:  me>=m4 by NAT_1:11;
      then
A15:  me>=8 by A4,XXREAL_0:2;
      then
A16:  It.a1=t.a1 by A6,A10,A11,A12,A13,Lm7;
A17:  t.intpos md >= t.intpos me implies
      It.a5=0 & It.a4=t.a4 & It.a7=t.a5
       by A6,A10,A11,A12,A13,A15,Lm7;
A18:  b=intpos (0+5) by A10,SCMP_GCD:1;
A19: now let v be 0-started State of SCMPDS;
        let V;
        assume that
A20:    v.a4 >= m4+v.b and
A21:    v.a2=t.a2 and
A22:    v.a=t.a and
A23:    v.b > 0;
A24:    m4+v.b>m4+0 by A23,XREAL_1:6;
        then reconsider ME=v.a4 as Element of NAT by A20,INT_1:3;
        v.a4 >=m4 by A20,A24,XXREAL_0:2;
        then
A25:    ME >= 8 by A4,XXREAL_0:2;
        then
A26:    v.intpos md < v.intpos ME implies IExec(WB1,V,v).a5=v.a5-1 &
        IExec(WB1,V,v).a4=v.a4-1 &
        IExec(WB1,V,v).a7=v.a5-1
        by A6,A10,A13,A21,A22,Lm7;
        thus IExec(WB1,V,v).a=v.a
        by A6,A10,A13,A21,A22,A25,Lm7;
        thus WB1 is_closed_on v,V & WB1 is_halting_on v,V by SCMPDS_6:20,21;
A27:    v.intpos md >= v.intpos ME implies IExec(WB1,V,v).a5=0 &
        IExec(WB1,V,v).a4 =v.a4 & IExec(WB1,V,v).a7=v.a5
        by A6,A10,A13,A21,A22,A25,Lm7;
        hereby
          per cases;
          suppose
A28:        v.intpos md < v.intpos ME;
            hence IExec(WB1,V,v).b < v.b by A18,A26,XREAL_1:146;
            m4+v.b-1=m4+IExec(WB1,V,v).b by A18,A26,A28;
            hence IExec(WB1,V,v).a4 >=
            m4+IExec(WB1,V,v).b by A20,A26,A28,XREAL_1:9;
          end;
          suppose
A29:        v.intpos md >= v.intpos ME;
            hence IExec(WB1,V,v).b < v.b
            by A6,A10,A13,A18,A21,A22,A23,A25,Lm7;
            m4+IExec(WB1,V,v).b < m4+v.b
             by A18,A23,A27,A29,XREAL_1:6;
            hence IExec(WB1,V,v).a4 >=
            m4+IExec(WB1,V,v).b by A20,A27,A29,XXREAL_0:2;
          end;
        end;
        thus IExec(WB1,V,v).a2=v.a2 by A6,A10,A13,A21,A22,A25,Lm7;
      end;
A30:  It.a3=t.a3 by A6,A10,A11,A12,A13,A15,Lm7;
A31:  t.intpos md < t.intpos me implies It.a5=t.a5-1 & It.a4=t.a4-1 & It.
      a7= t.a5-1 by A6,A10,A11,A12,A13,A15,Lm7;
A32:  It.a=0 by A6,A10,A11,A12,A13,A15,Lm7;
      then
A33:  It0.a=0 by SCMPDS_5:15;
A34:  DataLoc(It.a,5)=intpos(0+5) by A32,SCMP_GCD:1;
A35:  It.a2=t.a2 by A6,A10,A11,A12,A13,A15,Lm7;
      then
A36:  It0.a2=t.a2 by SCMPDS_5:15;
      per cases;
      suppose
A37:    t.intpos md < t.intpos me;
        then
A38:    It.a4=m4+It.a5 by A12,A31;
A39:    It0.a4=m4+It.a5 by A12,A31,A37,SCMPDS_5:15
       .= m4+It0.a5 by SCMPDS_5:15;
A40:   It0.a5 = It.a5 by SCMPDS_5:15;
A41:   It0.a1 = It.a1 by SCMPDS_5:15;
A42:   It0.a3 = It.a3 by SCMPDS_5:15;
A43:   It0.a4 = It.a4 by SCMPDS_5:15;
      It.a5 =k+1 by A11,A31,A37;
        then consider mE be Nat such that
A44:    mE=IExec(WH1,IT,Initialize It).a7 and
A45:    IExec(WH1,IT,Initialize It).a4=m4+mE and
A46:    mE <= It.a5 and
A47:    for i be Nat st m4+mE < i & i <=It.a4
        holds IExec(WH1,IT,Initialize It).intpos md <
             IExec(WH1,IT,Initialize It).intpos i and
A48:    mE=0 or IExec(WH1,IT,Initialize It).intpos md >=
         IExec(WH1,IT,Initialize It).intpos (m4+mE)
          by A9,A12,A13,A31,A17,A33,A36,A39,A40;
A49:    IExec(WH1,Q,t)=IExec(WH1,IT,Initialize It)
          by A11,A12,A18,A19,Th5;
        hence IExec(WH1,Q,t).a=0
         by A9,A11,A12,A13,A31,A17,A38,A40,A36,A33,A43;
        thus IExec(WH1,Q,t).a1=t.a1
         by A9,A11,A12,A13,A16,A31,A17,A38,A49,A40,A36,A33,A41,A43;
        thus IExec(WH1,Q,t).a5=0
         by A9,A11,A12,A13,A31,A17,A38,A49,A40,A36,A33,A43;
        thus IExec(WH1,Q,t).a2=t.a2
         by A9,A11,A12,A13,A31,A17,A38,A49,A40,A36,A33,A43;
        thus IExec(WH1,Q,t).a3=t.a3
         by A9,A11,A12,A13,A30,A31,A17,A38,A49,A40,A36,A33,A42,A43;
A50:    now
          let i be Nat;
          assume
A51:      i >= 8;
          hence IExec(WH1,Q,t).intpos i=It0.intpos i
           by A9,A11,A12,A13,A31,A17,A38,A49,A40,A36,A33,A43
            .= It.intpos i by SCMPDS_5:15
            .=t.intpos i by A6,A10,A11,A12,A13,A15,A51,Lm7;
        end;
        hence for i be Nat st i >= 8
         holds IExec(WH1,Q,t).intpos i=t.intpos i;
        take mE;
        thus mE=IExec(WH1,Q,t).a7 by A11,A12,A18,A19,A44,Th5;
        thus IExec(WH1,Q,t).a4=m4+mE by A11,A12,A18,A19,A45,Th5;
        thus mE <= t.a5 by A31,A37,A46,XREAL_1:146,XXREAL_0:2;
A52:    It.a4=t.a4-1 by A6,A10,A11,A12,A13,A15,A37,Lm7;
        hereby
          let i be Nat;
          assume that
A53:      m4+mE < i and
A54:      i <=t.a4;
          per cases;
          suppose
A55:        i=t.a4;
            IExec(WH1,Q,t).intpos me =t.intpos me
             by A4,A14,A50,XXREAL_0:2;
            hence IExec(WH1,Q,t).intpos md < IExec(WH1,Q,t).intpos i
             by A6,A11,A12,A37,A50,A55;
          end;
          suppose
            i<>t.a4;
            then i < t.a4 by A54,XXREAL_0:1;
            then i+1 <= t.a4 by INT_1:7;
            then i <= It.a4 by A52,XREAL_1:19;
            hence IExec(WH1,Q,t).intpos md < IExec(WH1,Q,t).intpos i
             by A49,A47,A53;
          end;
        end;
        thus mE=0 or IExec(WH1,Q,t).intpos md >=
        IExec(WH1,Q,t).intpos (m4+mE) by A49,A48;
      end;
      suppose
A56:    t.intpos md >= t.intpos me;
A57:    now
A58: (Initialize It).GBP = It.GBP by SCMPDS_5:15;
A59: (Initialize It).DataLoc(It.GBP,5) = It.DataLoc(It.GBP,5) by SCMPDS_5:15;
          let x;
          thus IExec(WH1,Q,t).x =IExec(WH1,IT,Initialize It).x
           by A11,A12,A18,A19,Th5
            .=(Initialize It).x by A17,A34,A56,A58,A59,SCMPDS_8:23
           .=It.x by SCMPDS_5:15;
        end;
        hence IExec(WH1,Q,t).a=0 by A32;
        thus IExec(WH1,Q,t).a1=t.a1 by A16,A57;
        thus IExec(WH1,Q,t).a5=0 by A17,A56,A57;
        thus IExec(WH1,Q,t).a2=t.a2 by A35,A57;
        thus IExec(WH1,Q,t).a3=t.a3 by A30,A57;
A60:    now
          let i be Nat;
          assume
A61:      i >= 8;
          thus IExec(WH1,Q,t).intpos i=It.intpos i by A57
            .=t.intpos i by A6,A10,A11,A12,A13,A15,A61,Lm7;
        end;
        hence for i be Nat st i >= 8
         holds IExec(WH1,Q,t).intpos i=t.intpos i;
        take ME=k+1+1;
        thus IExec(WH1,Q,t).a7=ME by A11,A17,A56,A57;
        thus IExec(WH1,Q,t).a4=m4+ME by A11,A12,A17,A56,A57;
        thus ME <= t.a5 by A11;
        thus for i be Nat st m4+ME < i & i <=t.a4
         & not IExec(WH1,Q,t).intpos md < IExec(WH1,Q,t).intpos i
         holds contradiction by A11,A12;
        IExec(WH1,Q,t).intpos me=t.intpos me
        by A4,A14,A60,XXREAL_0:2;
        hence ME=0 or IExec(WH1,Q,t).intpos md
         >= IExec(WH1,Q,t).intpos (m4+ME) by A6,A56,A60;
      end;
    end;
  end;
  A62: P[0]
  proof
    set me=m4+1;
    let t be 0-started State of SCMPDS;
    let Q;
    set It=IExec(WB1,Q,t), IT = Q;
    set b=DataLoc(t.a,5);
    assume that
A63: t.a=0 and
A64: t.a5 =0+1 and
A65: t.a4=m4+t.a5 and
A66: t.a2=md;
A67: me>=m4 by NAT_1:11;
    then
A68: me>=8 by A4,XXREAL_0:2;
    then
A69: t.intpos md < t.intpos me implies It.a5=t.a5-1 & It.a4=t.a4-1 & It.a7
    = t.a5-1 by A6,A63,A64,A65,A66,Lm7;
A70: t.intpos md >= t.intpos me implies It.a5=0 & It.a4=t.a4 & It.a7=t.a5
    by A6,A63,A64,A65,A66,A68,Lm7;
A71: b=intpos (0+5) by A63,SCMP_GCD:1;
A72: now
      let v be 0-started State of SCMPDS,V;
      assume that
A73:  v.a4 >= m4+v.b and
A74:  v.a2=t.a2 and
A75:  v.a=t.a and
A76:  v.b > 0;
A77:  m4+v.b>m4+0 by A76,XREAL_1:6;
      then reconsider ME=v.a4 as Element of NAT by A73,INT_1:3;
      v.a4 >=m4 by A73,A77,XXREAL_0:2;
      then
A78:  ME >= 8 by A4,XXREAL_0:2;
      then
A79:  v.intpos md < v.intpos ME implies IExec(WB1,V,v).a5=v.a5-1 &
     IExec(WB1,V,v).a4=v.a4-1 &
     IExec(WB1,V,v).a7=v.a5-1 by A6,A63,A66,A74,A75,Lm7;
      thus IExec(WB1,V,v).a=v.a by A6,A63,A66,A74,A75,A78,Lm7;
      thus WB1 is_closed_on v,V & WB1 is_halting_on v,V by SCMPDS_6:20,21;
A80:  v.intpos md >= v.intpos ME implies IExec(WB1,V,v).a5=0 &
           IExec(WB1,V,v)
      .a4 =v.a4 & IExec(WB1,V,v).a7=v.a5
       by A6,A63,A66,A74,A75,A78,Lm7;
      hereby
        per cases;
        suppose
A81:      v.intpos md < v.intpos ME;
          hence IExec(WB1,V,v).b < v.b by A71,A79,XREAL_1:146;
          m4+v.b-1=m4+IExec(WB1,V,v).b by A71,A79,A81;
          hence IExec(WB1,V,v).a4 >=
          m4+IExec(WB1,V,v).b by A73,A79,A81,XREAL_1:9;
        end;
        suppose
A82:      v.intpos md >= v.intpos ME;
          hence IExec(WB1,V,v).b < v.b
           by A6,A63,A66,A71,A74,A75,A76,A78,Lm7;
          m4+IExec(WB1,V,v).b < m4+v.b
          by A71,A76,A80,A82,XREAL_1:6;
          hence IExec(WB1,V,v).a4 >=
          m4+IExec(WB1,V,v).b by A73,A80,A82,XXREAL_0:2;
        end;
      end;
      thus IExec(WB1,V,v).a2=v.a2 by A6,A63,A66,A74,A75,A78,Lm7;
    end;
A83: It.a=0 by A6,A63,A64,A65,A66,A68,Lm7;
    then
A84: It.DataLoc(It.a,5)=0 by A64,A69,A70,SCMP_GCD:1;
A85: now
A86: (Initialize It).GBP = It.GBP by SCMPDS_5:15;
A87: (Initialize It).DataLoc(It.GBP,5) = It.DataLoc(It.GBP,5) by SCMPDS_5:15;
      let x;
      thus IExec(WH1,Q,t).x
        = IExec(WH1,Q,Initialize It).x by A64,A65,A71,A72,Th5
        .=(Initialize It).x by A84,A86,A87,SCMPDS_8:23
        .=It.x by SCMPDS_5:15;
    end;
    hence IExec(WH1,Q,t).a=0 by A83;
    It.a1=t.a1 by A6,A63,A64,A65,A66,A68,Lm7;
    hence IExec(WH1,Q,t).a1=t.a1 by A85;
    thus IExec(WH1,Q,t).a5=0 by A64,A69,A70,A85;
    It.a2=t.a2 by A6,A63,A64,A65,A66,A68,Lm7;
    hence IExec(WH1,Q,t).a2=t.a2 by A85;
    It.a3=t.a3 by A6,A63,A64,A65,A66,A68,Lm7;
    hence IExec(WH1,Q,t).a3=t.a3 by A85;
A88: now
      let i be Nat;
      assume
A89:  i >= 8;
      thus IExec(WH1,Q,t).intpos i=It.intpos i by A85
        .=t.intpos i by A6,A63,A64,A65,A66,A68,A89,Lm7;
    end;
    hence for i be Nat st i >= 8
     holds IExec(WH1,Q,t).intpos i=t.intpos i;
A90: IExec(WH1,Q,t).intpos me=t.intpos me by A4,A67,A88,XXREAL_0:2;
      per cases;
      suppose
A91:    t.intpos md < t.intpos me;
        take ME=0;
        thus IExec(WH1,Q,t).a7=ME by A64,A69,A85,A91;
        thus IExec(WH1,Q,t).a4=m4+ME by A64,A65,A69,A85,A91;
        thus ME <= t.a5 by A64;
        hereby
          let i be Nat;
          assume that
A92:      m4+ME < i and
A93:      i <=t.a4;
          m4+1 <= i by A92,INT_1:7;
          then i=m4+1 by A64,A65,A93,XXREAL_0:1;
          hence IExec(WH1,Q,t).intpos md
           < IExec(WH1,Q,t).intpos i by A6,A88,A90,A91;
        end;
        thus ME=0 or IExec(WH1,Q,t).intpos md
          >= IExec(WH1,Q,t).intpos (m4+ ME );
      end;
      suppose
A94:    t.intpos md >= t.intpos me;
        take ME=1;
        thus IExec(WH1,Q,t).a7=ME by A64,A70,A85,A94;
        thus IExec(WH1,Q,t).a4=m4+ME by A64,A65,A70,A85,A94;
        thus ME <= t.a5 by A64;
        thus for i be Nat st m4+ME < i & i <=t.a4
         holds IExec(WH1,Q,t).intpos md < IExec(WH1,Q,t).intpos i by A64,A65;
        thus ME=0 or IExec(WH1,Q,t).intpos md
         >= IExec(WH1,Q,t).intpos (m4+ME) by A6,A88,A90,A94;
      end;
  end;
  for k be Nat holds P[k] from NAT_1:sch 2(A62,A8);
  hence thesis by A1,A3,A5,A7;
end;

Lm9: for s being 0-started State of SCMPDS,
 m4,md be Nat st s.GBP=0 & s.a4=m4
+s.a5 & m4>=8 & s.a2=md & md >= 8
 holds WH1 is_closed_on s,P & WH1 is_halting_on s,P
proof
  set a=GBP;
  let s be 0-started State of SCMPDS,m4,md be Nat;
  assume that
A1: s.GBP=0 and
A2: s.a4=m4+s.a5 and
A3: m4>=8 and
A4: s.a2=md and
A5: md >= 8;
  set b=DataLoc(s.a,5);
A6: b=intpos (0+5) by A1,SCMP_GCD:1;
  now
    let v be 0-started State of SCMPDS, V;
    assume that
A7: v.a4 >= m4+v.b and
A8: v.a2=s.a2 and
A9: v.a=s.a and
A10: v.b > 0;
A11: m4+v.b>m4+0 by A10,XREAL_1:6;
    then reconsider ME=v.a4 as Element of NAT by A7,INT_1:3;
    v.a4 >=m4 by A7,A11,XXREAL_0:2;
    then
A12: ME >= 8 by A3,XXREAL_0:2;
    then
A13: v.intpos md < v.intpos ME implies IExec(WB1,V,v).a5=v.a5-1
 & IExec(WB1,V,v) .a4=v.a4-1 & IExec(WB1,V,v).a7=v.a5-1
     by A1,A4,A5,A8,A9,Lm7;
    thus IExec(WB1,V,v).a=v.a
    by A1,A4,A5,A8,A9,A12,Lm7;
    thus WB1 is_closed_on v,V & WB1 is_halting_on v,V by SCMPDS_6:20,21;
A14: v.intpos md >= v.intpos ME implies IExec(WB1,V,v).a5=0
 & IExec(WB1,V,v).
    a4= v.a4 & IExec(WB1,V,v).a7=v.a5
    by A1,A4,A5,A8,A9,A12,Lm7;
    hereby
      per cases;
      suppose
A15:    v.intpos md < v.intpos ME;
        hence IExec(WB1,V,v).b < v.b by A6,A13,XREAL_1:146;
        m4+v.b-1=m4+IExec(WB1,V,v).b by A6,A13,A15;
        hence IExec(WB1,V,v).a4 >= m4+IExec(WB1,V,v).b
         by A7,A13,A15,XREAL_1:9;
      end;
      suppose
A16:    v.intpos md >= v.intpos ME;
        hence IExec(WB1,V,v).b < v.b
         by A1,A4,A5,A6,A8,A9,A10,A12,Lm7;
        m4+IExec(WB1,V,v).b < m4+v.b by A6,A10,A14,A16,XREAL_1:6;
        hence IExec(WB1,V,v).a4 >= m4+IExec(WB1,V,v).b
         by A7,A14,A16,XXREAL_0:2;
      end;
    end;
    thus IExec(WB1,V,v).a2=v.a2 by A1,A4,A5,A8,A9,A12,Lm7;
  end;
  hence thesis by A2,A6,Th5;
end;

Lm10: card WH1=11
proof
  thus card WH1=9+2 by Lm6,SCMPDS_8:17
    .=11;
end;

Lm11: card WB2=9
proof
  thus card WB2= card (j1 ';' j2 ';' j3 ';' j4) + card IF2 by AFINSQ_1:17
    .= 4+card IF2 by Th4
    .= 4+(card (j5 ';' j6) +card j7+2) by SCMPDS_6:65
    .= 4+(2+card j7+2) by SCMP_GCD:5
    .= 4+(2+1+2) by COMPOS_1:54
    .= 9;
end;

Lm12: card WH2=11
proof
  thus card WH2= 9+2 by Lm11,SCMPDS_8:17
    .=11;
end;

Lm13: for s being 0-started State of SCMPDS,
md,me be Nat st s.a2=md & s.a3=me
& md >= 8 & me >= 8 & s.GBP=0 holds IExec(WB2,P,s).GBP=0
 & IExec(WB2,P,s).a1=s.a1 &
IExec(WB2,P,s).a2=s.a2 & IExec(WB2,P,s).a4=s.a4
 & (for i be Nat st i >=
8 holds IExec(WB2,P,s).intpos i=s.intpos i)
 & (s.intpos md > s.intpos me implies
IExec(WB2,P,s).a7=s.a7-1 & IExec(WB2,P,s).a3=s.a3+1
 & IExec(WB2,P,s).a5=s.a7-1) & (s.
intpos md <= s.intpos me implies IExec(WB2,P,s).a7=0 &
IExec(WB2,P,s).a3=s.a3 &
IExec(WB2,P,s).a5=s.a7)
proof
  set a=GBP;
  let s be 0-started State of SCMPDS,md,me be Nat;
  assume that
A1: s.a2=md and
A2: s.a3=me and
A3: md >= 8 and
A4: me >= 8 and
A5: s.a=0;
  set t0= s, t1=IExec(j1 ';' j2 ';' j3 ';' j4,P,s),
     Q1 = P,
     t2=IExec(j1 ';' j2 ';' j3,P,s),
     t3=IExec(j1 ';' j2,P,s),
     t4=Exec(j1, t0);
A6: t0.a=0 by A5;
A7: DataLoc(t0.a,5)=intpos (0+5) by A5,SCMP_GCD:1; then
A8: t4.a =0 by A5,AMI_3:10,SCMPDS_2:47; then
A9: DataLoc(t4.a,7)=intpos (0+7) by SCMP_GCD:1;
A10: t4.a2 =md by A7,A1,AMI_3:10,SCMPDS_2:47;
A11: t3.a2 =Exec(j2, t4).a2 by SCMPDS_5:42
    .=md by A10,A9,AMI_3:10,SCMPDS_2:48; then
A12: DataLoc(t3.a2,0)=intpos (md+0) by SCMP_GCD:1;
A13: t3.a =Exec(j2, t4).a by SCMPDS_5:42
    .=0 by A8,A9,AMI_3:10,SCMPDS_2:48;
  then
A14: DataLoc(t3.a,6)=intpos (0+6) by SCMP_GCD:1;
A15: t4.a3 =me by A7,A2,AMI_3:10,SCMPDS_2:47;
A16: t3.a3 =Exec(j2, t4).a3 by SCMPDS_5:42
    .=me by A15,A9,AMI_3:10,SCMPDS_2:48;
A17: t4.a7 =s.a7 by A7,AMI_3:10,SCMPDS_2:47;
  set t01=Initialize t1, jj7= (GBP,7):=0, t5=Exec(j5,t01);
A18: t2.a3 =Exec(j3, t3).a3 by SCMPDS_5:41
    .=me by A16,A14,AMI_3:10,SCMPDS_2:47;
A19: t2.a =Exec(j3, t3).a by SCMPDS_5:41
    .=0 by A13,A14,AMI_3:10,SCMPDS_2:47;
  then
A20: DataLoc(t2.a,6)=intpos (0+6) by SCMP_GCD:1;
A21: t4.a4 =s.a4 by A7,AMI_3:10,SCMPDS_2:47;
A22: t3.a4 =Exec(j2, t4).a4 by SCMPDS_5:42
    .=s.a4 by A21,A9,AMI_3:10,SCMPDS_2:48;
A23: t4.a1 =s.a1 by A7,AMI_3:10,SCMPDS_2:47;
A24: t3.a1 =Exec(j2, t4).a1 by SCMPDS_5:42
    .=s.a1 by A23,A9,AMI_3:10,SCMPDS_2:48;
A25: t2.a1 =Exec(j3, t3).a1 by SCMPDS_5:41
    .=s.a1 by A24,A14,AMI_3:10,SCMPDS_2:47;
  t1.a1 =Exec(j4, t2).a1 by SCMPDS_5:41
    .=s.a1 by A25,A20,AMI_3:10,SCMPDS_2:50;
  then
A26: t01.a1=s.a1 by SCMPDS_5:15;
A27: t2.a4 =Exec(j3, t3).a4 by SCMPDS_5:41
    .=s.a4 by A22,A14,AMI_3:10,SCMPDS_2:47;
  t1.a4 =Exec(j4, t2).a4 by SCMPDS_5:41
    .=s.a4 by A27,A20,AMI_3:10,SCMPDS_2:50;
  then
A28: t01.a4=s.a4 by SCMPDS_5:15;
A29: t1.a =Exec(j4, t2).a by SCMPDS_5:41
    .=0 by A19,A20,AMI_3:10,SCMPDS_2:50;
  then
A30: t01.a=0 by SCMPDS_5:15;
  then
A31: DataLoc(t01.a,7)=intpos(0+7) by SCMP_GCD:1;
  DataLoc(t0.a,7)=intpos (0+7) by A6,SCMP_GCD:1;
  then
A32: t4.a5 =s.a7 by A7,SCMPDS_2:47;
A33: t3.a5 =Exec(j2, t4).a5 by SCMPDS_5:42
    .=s.a7 by A32,A9,AMI_3:10,SCMPDS_2:48;
A34: t2.a5 =Exec(j3, t3).a5 by SCMPDS_5:41
    .=s.a7 by A33,A14,AMI_3:10,SCMPDS_2:47;
  t1.a5 =Exec(j4, t2).a5 by SCMPDS_5:41
    .=s.a7 by A34,A20,AMI_3:10,SCMPDS_2:50;
  then
A35: t01.a5=s.a7 by SCMPDS_5:15;
A36: t2.a2 =Exec(j3, t3).a2 by SCMPDS_5:41
    .=md by A11,A14,AMI_3:10,SCMPDS_2:47;
  t1.a2 =Exec(j4, t2).a2 by SCMPDS_5:41
    .=md by A36,A20,AMI_3:10,SCMPDS_2:50;
  then
A37: t01.a2=s.a2 by A1,SCMPDS_5:15;
  a4<>DataLoc(t01.a,3) by A30,AMI_3:10,SCMP_GCD:1;
  then
A38: t5.a4=s.a4 by A28,SCMPDS_2:48;
  a2<>DataLoc(t01.a,3) by A30,AMI_3:10,SCMP_GCD:1;
  then
A39: t5.a2=s.a2 by A37,SCMPDS_2:48;
  a<>DataLoc(t01.a,3) by A30,AMI_3:10,SCMP_GCD:1;
  then
A40: t5.a=0 by A30,SCMPDS_2:48;
  then
A41: DataLoc(t5.a,5)=intpos(0+5) by SCMP_GCD:1;
A42: now
    let i be Nat;
    assume i>=8;
    then i > 5 by XXREAL_0:2;
    hence t4.intpos i = s.intpos i by A7,AMI_3:10,SCMPDS_2:47;
  end;
A43: now
    let i be Nat;
    assume
A44: i>=8;
    then
A45: i > 7 by XXREAL_0:2;
    thus t3.intpos i =Exec(j2, t4).intpos i by SCMPDS_5:42
      .=t4.intpos i by A9,A45,AMI_3:10,SCMPDS_2:48
      .=s.intpos i by A42,A44;
  end;
A46: now
    let i be Nat;
    assume
A47: i>=8;
    then
A48: i > 6 by XXREAL_0:2;
    thus t2.intpos i=Exec(j3, t3).intpos i by SCMPDS_5:41
      .=t3.intpos i by A14,A48,AMI_3:10,SCMPDS_2:47
      .=s.intpos i by A43,A47;
  end;
A49: now
    let i be Nat;
    assume
A50: i>=8;
    then
A51: i > 6 by XXREAL_0:2;
    thus t1.intpos i=Exec(j4, t2).intpos i by SCMPDS_5:41
      .=t2.intpos i by A20,A51,AMI_3:10,SCMPDS_2:50
      .=s.intpos i by A46,A50;
  end;
A52: t2.a6 =Exec(j3, t3).a6 by SCMPDS_5:41
    .=t3.intpos md by A14,A12,SCMPDS_2:47
    .=s.intpos md by A3,A43;
  t1.a6 =Exec(j4, t2).a6 by SCMPDS_5:41
    .=t2.a6-t2.DataLoc(t2.a3,0) by A20,SCMPDS_2:50
    .=t2.a6-t2.intpos(me+0) by A18,SCMP_GCD:1
    .=s.intpos md - s.intpos me by A4,A52,A46;
  then
A53: t1.DataLoc(t1.a,6)=s.intpos md - s.intpos me by A29,SCMP_GCD:1;
  a1<>DataLoc(t01.a,3) by A30,AMI_3:10,SCMP_GCD:1;
  then
A54: t5.a1=s.a1 by A26,SCMPDS_2:48;
A55: now
    per cases;
    suppose
A56:  t01.DataLoc(t01.a,6) <= 0;
      hence IExec(IF2,Q1,Initialize t1).a
      =IExec(j7,Q1,Initialize t1).a by SCMPDS_6:74
        .=Exec(jj7,t01).a by SCMPDS_5:40
        .=0 by A30,A31,AMI_3:10,SCMPDS_2:46;
      thus IExec(IF2,Q1,Initialize t1).a1=IExec(j7,Q1,Initialize t1).a1
       by A56,SCMPDS_6:74
        .=Exec(jj7,t01).a1 by SCMPDS_5:40
        .=s.a1 by A26,A31,AMI_3:10,SCMPDS_2:46;
      thus IExec(IF2,Q1,Initialize t1).a2=IExec(j7,Q1,Initialize t1).a2
       by A56,SCMPDS_6:74
        .=Exec(jj7,t01).a2 by SCMPDS_5:40
        .=s.a2 by A37,A31,AMI_3:10,SCMPDS_2:46;
      thus IExec(IF2,Q1,Initialize t1).a4=IExec(j7,Q1,Initialize t1).a4
       by A56,SCMPDS_6:74
        .=Exec(jj7,t01).a4 by SCMPDS_5:40
        .=s.a4 by A28,A31,AMI_3:10,SCMPDS_2:46;
        let i be Nat;
        assume
A57:    i>=8;
        then
A58:    i > 7 by XXREAL_0:2;
        thus IExec(WB2,P,s).intpos i
         =IExec(IF2,Q1,Initialize t1).intpos i
         by SCMPDS_5:35
          .=IExec(j7,Q1,Initialize t1).intpos i by A56,SCMPDS_6:74
          .=Exec(jj7,t01).intpos i by SCMPDS_5:40
          .=t01.intpos i by A31,A58,AMI_3:10,SCMPDS_2:46
          .=t1.intpos i by SCMPDS_5:15
          .=s.intpos i by A49,A57;
    end;
    suppose
A59:  t01.DataLoc(t01.a,6) > 0;
      hence IExec(IF2,Q1,Initialize t1).a=IExec(j5 ';' j6,Q1,Initialize t1).a
       by SCMPDS_6:73
        .=Exec(j6,t5).a
         by SCMPDS_5:42
        .=0 by A40,A41,AMI_3:10,SCMPDS_2:48;
      thus IExec(IF2,Q1,Initialize t1).a1=IExec(j5 ';' j6,Q1,Initialize t1).a1
       by A59,SCMPDS_6:73
        .=Exec(j6,t5).a1 by SCMPDS_5:42
        .=s.a1 by A54,A41,AMI_3:10,SCMPDS_2:48;
      thus IExec(IF2,Q1,Initialize t1).a2=IExec(j5 ';' j6,Q1,Initialize t1).a2
       by A59,SCMPDS_6:73
        .=Exec(j6,t5).a2 by SCMPDS_5:42
        .=s.a2 by A39,A41,AMI_3:10,SCMPDS_2:48;
      thus IExec(IF2,Q1,Initialize t1).a4=IExec(j5 ';' j6,Q1,Initialize t1).a4
       by A59,SCMPDS_6:73
        .=Exec(j6,t5).a4 by SCMPDS_5:42
        .=s.a4 by A38,A41,AMI_3:10,SCMPDS_2:48;
        let i be Nat;
        assume
A60:    i>=8;
        then
A61:    i > 5 by XXREAL_0:2;
        i > 3 by A60,XXREAL_0:2;
        then
A62:    intpos i<>DataLoc(t01.a,3) by A30,AMI_3:10,SCMP_GCD:1;
        thus IExec(WB2,P,s).intpos i=
        IExec(IF2,Q1,Initialize t1).intpos i by SCMPDS_5:35
          .=IExec(j5 ';' j6,Q1,Initialize t1).intpos i by A59,SCMPDS_6:73
          .=Exec(j6,t5).intpos i by SCMPDS_5:42
          .=t5.intpos i by A41,A61,AMI_3:10,SCMPDS_2:48
          .=t01.intpos i by A62,SCMPDS_2:48
          .=t1.intpos i by SCMPDS_5:15
          .=s.intpos i by A49,A60;
    end;
  end;
  hence IExec(WB2,P,s).a=0 & IExec(WB2,P,s).a1=s.a1 &
   IExec(WB2,P,s).a2=s.a2 & IExec(WB2,P,s).a4=s.a4 by SCMPDS_5:35;
  thus for i be Nat st i >= 8
  holds IExec(WB2,P,s).intpos i=s.intpos i by A55;
A63: t3.a7 =Exec(j2, t4).a7 by SCMPDS_5:42
    .=t4.a7+ -1 by A9,SCMPDS_2:48
    .=s.a7-1 by A17;
A64: t2.a7 =Exec(j3, t3).a7 by SCMPDS_5:41
    .=s.a7-1 by A63,A14,AMI_3:10,SCMPDS_2:47;
  t1.a7 =Exec(j4, t2).a7 by SCMPDS_5:41
    .=s.a7-1 by A64,A20,AMI_3:10,SCMPDS_2:50;
  then
A65: t01.a7=s.a7-1 by SCMPDS_5:15;
  t1.a3 =Exec(j4, t2).a3 by SCMPDS_5:41
    .=me by A18,A20,AMI_3:10,SCMPDS_2:50;
  then
A66: t01.a3=s.a3 by A2,SCMPDS_5:15;
A67: DataLoc(t01.a,3)=intpos(0+3) by A30,SCMP_GCD:1;
A68: t01.DataLoc(t01.a,6) =  t1.DataLoc(t01.a,6) by SCMPDS_5:15
         .= t1.DataLoc(t1.a,6) by SCMPDS_5:15;
  hereby
A69: a7<>DataLoc(t01.a,3) by A30,AMI_3:10,SCMP_GCD:1;
    assume
 s.intpos md > s.intpos me;
    then
A70: s.intpos md - s.intpos me > 0 by XREAL_1:50;
    thus IExec(WB2,P,s).a7=IExec(IF2,Q1,Initialize t1).a7
     by SCMPDS_5:35
      .=IExec(j5 ';' j6,Q1,Initialize t1).a7 by A53,A68,A70,SCMPDS_6:73
      .=Exec(j6,t5).a7 by SCMPDS_5:42
      .=t5.a7 by A41,AMI_3:10,SCMPDS_2:48
      .=s.a7-1 by A65,A69,SCMPDS_2:48;
    thus IExec(WB2,P,s).a3=IExec(IF2,Q1,Initialize t1).a3
     by SCMPDS_5:35
      .=IExec(j5 ';' j6,Q1,Initialize t1).a3 by A53,A68,A70,SCMPDS_6:73
      .=Exec(j6,t5).a3 by SCMPDS_5:42
      .=t5.a3 by A41,AMI_3:10,SCMPDS_2:48
      .=s.a3+1 by A67,A66,SCMPDS_2:48;
A71: a5<>DataLoc(t01.a,3) by A30,AMI_3:10,SCMP_GCD:1;
    thus IExec(WB2,P,s).a5=IExec(IF2,Q1,Initialize t1).a5
     by SCMPDS_5:35
      .=IExec(j5 ';' j6,Q1,Initialize t1).a5 by A53,A68,A70,SCMPDS_6:73
      .=Exec(j6,t5).a5 by SCMPDS_5:42
      .=t5.a5+ -1 by A41,SCMPDS_2:48
      .=t5.a5-1
      .=s.a7-1 by A35,A71,SCMPDS_2:48;
  end;
  hereby
    assume
 s.intpos md <= s.intpos me;
    then
A72:  0 >= s.intpos md - s.intpos me by XREAL_1:47;
    thus IExec(WB2,P,s).a7=IExec(IF2,Q1,Initialize t1).a7
     by SCMPDS_5:35
      .=IExec(j7,Q1,Initialize t1).a7 by A53,A68,A72,SCMPDS_6:74
      .=Exec(jj7,t01).a7 by SCMPDS_5:40
      .=0 by A31,SCMPDS_2:46;
    thus IExec(WB2,P,s).a3=IExec(IF2,Q1,Initialize t1).a3
     by SCMPDS_5:35
      .=IExec(j7,Q1,Initialize t1).a3 by A53,A68,A72,SCMPDS_6:74
      .=Exec(jj7,t01).a3 by SCMPDS_5:40
      .=s.a3 by A31,A66,AMI_3:10,SCMPDS_2:46;
    thus IExec(WB2,P,s).a5=IExec(IF2,Q1,Initialize t1).a5
     by SCMPDS_5:35
      .=IExec(j7,Q1,Initialize t1).a5 by A53,A68,A72,SCMPDS_6:74
      .=Exec(jj7,t01).a5 by SCMPDS_5:40
      .=s.a7 by A35,A31,AMI_3:10,SCMPDS_2:46;
  end;
end;

Lm14: for s being 0-started State of SCMPDS,
m3,md be Nat st s.GBP=0 & s.a7 >
0 & s.a3+s.a7=m3 & s.a3>=8 & s.a2=md & md >= 8
 holds IExec(WH2,P,s).GBP=0 & IExec(WH2,P,s).a1=s.a1 &
 IExec(WH2,P,s).a7=0 & IExec(WH2,P,s).a2=s.a2 &
 IExec(WH2,P,s).a4=s.a4 &
 (for i be Nat st i >= 8
 holds IExec(WH2,P,s).intpos i=s.intpos i)
& ex m5,mE3 be Nat st m5=IExec(WH2,P,s).a5
 & IExec(WH2,P,s).a3=mE3 & mE3
+m5=m3 & m5 <= s.a7 & (for i be Nat st s.a3 <= i & i < mE3 holds
IExec(WH2,P,s).intpos md > IExec(WH2,P,s).intpos i)
 & (m5 = 0 or IExec(WH2,P,s).intpos md <= IExec(WH2,P,s).intpos mE3)
proof
  set a=GBP;
  let s be 0-started State of SCMPDS,m3,md be Nat;
  assume that
A1: s.a=0 and
A2: s.a7 > 0 and
A3: s.a3+s.a7=m3 and
A4: s.a3>=8 and
A5: s.a2=md and
A6: md >= 8;
  s.a7 >=1+0 by A2,INT_1:7;
  then reconsider m7=s.a7-1 as Element of NAT by INT_1:3,XREAL_1:48;
A7: s.a7=m7+1;
  defpred P[Nat] means
   for t being 0-started State of SCMPDS,Q st t.a=0 & t.a7 =$1+1 &
    t.a3+t.a7=m3 & t.a3>=8 & t.a2=md
 holds IExec(WH2,Q,t).a=0 & IExec(WH2,Q,t).
  a1=t.a1 & IExec(WH2,Q,t).a7=0 & IExec(WH2,Q,t).a2=t.a2
   & IExec(WH2,Q,t).a4=t.a4 &
  (for i be Nat st i >= 8
 holds IExec(WH2,Q,t).intpos i=t.intpos i) &
 ex m5,mE3 be Nat st m5=IExec(WH2,Q,t).a5
 & IExec(WH2,Q,t).a3=mE3 & mE3+m5= m3 & m5 <= t.a7 &
  (for i be Nat st t.a3 <= i & i < mE3
 holds IExec(WH2,Q,t).intpos md >
 IExec(WH2,Q,t).intpos i)
 & (m5=0 or IExec(WH2,Q,t).intpos md <=
  IExec(WH2,Q,t).intpos mE3);
A8: now
    let k be Nat;
    assume
A9: P[k];
    P[k+1]
    proof
      let t be 0-started State of SCMPDS;
      let Q;
      set b=DataLoc(t.a,7);
      assume that
A10:  t.a=0 and
A11:  t.a7 =(k+1)+1 and
A12:  t.a3+t.a7=m3 and
A13:  t.a3>=8 and
A14:  t.a2=md;
      reconsider me=t.a3 as Element of NAT by A13,INT_1:3;
      set It=IExec(WB2,Q,t), IT = Q;
A15:  t.intpos md > t.intpos me implies It.a7=t.a7-1 & It.a3=t.a3+1 & It.
      a5= t.a7-1 by A6,A10,A13,A14,Lm13;
A16:  b=intpos (0+7) by A10,SCMP_GCD:1;
A17:  now
        let v be 0-started State of SCMPDS;
        let V;
        assume that
A18:    v.a3 >= 8 and
A19:    v.a2=t.a2 and
A20:    v.a=t.a and
A21:    v.b > 0;
        reconsider ME=v.a3 as Element of NAT by A18,INT_1:3;
A22:    ME=v.a3;
        hence IExec(WB2,V,v).a=v.a
         by A6,A10,A14,A18,A19,A20,Lm13;
        thus WB2 is_closed_on v,V & WB2 is_halting_on v,V by SCMPDS_6:20,21;
A23:    v.intpos md > v.intpos ME implies IExec(WB2,V,v).a7=v.a7-1
 & IExec(WB2,V,v).a3=v.a3+1
  & IExec(WB2,V,v).a5=v.a7-1
   by A6,A10,A14,A18,A19,A20,Lm13;
        hereby
          per cases;
          suppose
A24:        v.intpos md > v.intpos ME;
            hence IExec(WB2,V,v).b < v.b by A16,A23,XREAL_1:146;
A25:        v.a3 +1 > v.a3 by XREAL_1:29;
            IExec(WB2,V,v).a3=v.a3+1
             by A6,A10,A14,A18,A19,A20,A24,Lm13;
            hence IExec(WB2,V,v).a3 >= 8 by A18,A25,XXREAL_0:2;
          end;
          suppose
A26:        v.intpos md <= v.intpos ME;
            hence IExec(WB2,V,v).b < v.b
             by A6,A10,A14,A16,A18,A19,A20,A21,Lm13;
            thus IExec(WB2,V,v).a3 >= 8
             by A6,A10,A14,A18,A19,A20,A26,Lm13;
          end;
        end;
        thus IExec(WB2,V,v).a2=v.a2
         by A6,A10,A14,A18,A19,A20,A22,Lm13;
      end;
A27:  t.intpos md <= t.intpos me implies It.a7=0 & It.a3=t.a3 & It.a5=t.
      a7 by A6,A10,A13,A14,Lm13;
A28:  me=t.a3;
      then
A29:  It.a=0 by A6,A10,A13,A14,Lm13;
      then
A30:  DataLoc(It.a,7)=intpos(0+7) by SCMP_GCD:1;
A31:  It.a1=t.a1 by A6,A10,A13,A14,A28,Lm13;
A32:  It.a4=t.a4 by A6,A10,A13,A14,A28,Lm13;
A33:  It.a2=t.a2 by A6,A10,A13,A14,A28,Lm13;
A34:  (Initialize It).a1 = It.a1 by SCMPDS_5:15;
A35:  (Initialize It).a4 = It.a4 by SCMPDS_5:15;
A36:  (Initialize It).a2 = It.a2 by SCMPDS_5:15;
      per cases;
      suppose
A37:    t.intpos md > t.intpos me;
        then t.a3 < It.a3 by A15,XREAL_1:29;
        then
A38:    It.a3 >= 8 by A13,XXREAL_0:2;
A39:    It.a3+It.a7=m3 by A12,A15,A37;
A40: (Initialize It).a = It.a by SCMPDS_5:15;
A41: (Initialize It).a3 = It.a3 by SCMPDS_5:15;
A42: (Initialize It).a7 = It.a7 by SCMPDS_5:15;
        consider m5,mE3 be Nat such that
A43:    m5=IExec(WH2,IT,Initialize It).a5 and
A44:    IExec(WH2,IT,Initialize It).a3=mE3 and
A45:    mE3+m5=m3 and
A46:    m5 <= It.a7 and
A47:    for i be Nat st It.a3 <= i & i < mE3 holds
        IExec(WH2,IT,Initialize It).intpos md >
        IExec(WH2,IT,Initialize It).intpos i and
A48:    m5=0 or IExec(WH2,IT,Initialize It).intpos md <=
         IExec(WH2,IT,Initialize It).intpos mE3
        by A9,A11,A12,A14,A29,A33,A36,A15,A27,A38,A39,A40,A41,A42;
A49:    IExec(WH2,Q,t)=IExec(WH2,IT,Initialize It) by A11,A13,A16,A17,Th6;
        hence IExec(WH2,Q,t).a=0
         by A9,A11,A12,A14,A29,A33,A36,A15,A27,A38,A39,A40,A41,A42;
        thus IExec:: This code can be distributed under the GNU General Public Licence
         by A9,A11,A12,A14,A29:: licenses, or see http://www.gnu.org/licenses/gpl.html and
        thus IExec(WH2,Q,t).a7=0
         by A9,A11,A12,A14,A29,A33,A36,A15,A27,A38,A39,A49,A40,A41,A42;
        thus IExec(WH2,Q,t).a2=t.a2
b A9A12A14,29A33,,,A38A39,49,A40A41,42
        thus IExec(WH2,Q,).4t.a4
         by A9,A11,A12,A14,A29,A33,A36,A32,A35      ;
A50    now
          letibe Nat;
          assume
A51:      i > 8;
()intposi=Itintpos  bySCMPDS_515;
          hence IExec(WH2,Q,t).java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 30
           by A9,A11,A12,A14,A29,A3333,,A27A,39,A40A41A42,
            .=t.intpos ,A10,A13,A14,,51,m13;
        end;
     hencefor besti =8
         holds, p=q^<x*>  len p= len  + 1
        m5;
        take mE3;
thusm5=IExecWH2,Q,)a5byA11A,A17,Th6
        
        thus mE3+m5=m3 by A45;
        thus < ta7 A15,,XREAL_1146XXREAL_0:;
A52:    It:   =k+ 1  :7;
        hereby
          let i be Nat;
                   assume that
A53:      t.a3 <= i and
A54:      i < mE3;
          per cases;
          suppose
A55:        i=t.a3;
            IExec(WH2,Q,t).intpos me =t.intpos me by A13,A50;
            hence IExec(WH2,Q,t).intpos md
             > IExec(WH2,Q,t).intpos i by A6,A37,A50,A55;
          end;
          suppose
            i<>t.a3;
            then t.a3 < i by A53,XXREAL_0:1;
            then It.a3 <= i by A52,INT_1:7;
            hence
            IExec(WH2,Q,t).intpos md >
            IExec(WH2,Q,t).intpos i by A49,A47,A54;
          end;
        end;
        thus m5=0 or IExec(WH2,Q,t).intpos md
         <= IExec(WH2,Q,t).intpos mE3 by A49,A48;
      
      suppose
A56A:i+ 1indomq1
A57:    now
          let x;
A58: (Initialize It).GBP = It.GBP by SCMPDS_5:15;
A59: (Initialize
thusWH2,t. =(WH2,T, t).
           bythen byA62java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
            .=    hence[i,q1(i+ 1] in  by A1,A8,A13,A10,REWRITE1: 
            .=It.xbySCMPDS_5:15;
        end
        hence IExec(WH2,Q,t)
        thus IExec(WH2:+1< lenq2 by A15,FINSEQ_3:;
        thus IExec(WH2,Q,A22 q1+len =lenPA1,22
        thus IExec(WH2,Q,t).a2=t.a2 by A33,A57;
        thus :i=java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 36
A60:    henceq2i,q2(  )  RR  A1A1,A21,A23,EWRITE1:def;
          let i be Nat;
          assume
       > 
          thus IExec(WH2,Q,t).intpos i=It.intpos i A2 P = <**>Q 
            .=1+ len QQ> 1+0byA;
        end;
        hence for
         thesisbyA2A3,;
         reconsiderend;
        take m5;
        takemE3=;
        IExecQ,t.=by,A27,A57;
        thus IExec(WH2,QA1: lenlen P >1
thusmE3=3 by A11,;
        thusm5< t.7 by A11;
        thus for i bethen len <x>= & len Q>0byFINSEQ_1:39;
(WH2,t)intpos  >IExecWH2Q,).intpos 
  thesisbyA3A;
        hence
         <= IExec(WH2,Q,t).intpos mE3 by A6,java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 32
      ;
    end;
    hence P[k+1];
  end;
  [0]
  proof
    let t be 0-started State of SCMPDS;
    let Q;
    set b=DataLoc(t.a,7b ,:2
     
A62: t.a=0 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 6
A63:.a7=+ 
.a3tm3and
A65: A4: le w = len u+len v  byA1,:17;
hencethesisbyA3A4XREAL_1,;
      w1^1=w2^ &(lenw1= len w2or len v1 =len )  w1 =w2
    set It=IExec(WB2,A3   +v1  w2v2 A1,AFINSQ_1
 .java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 74
    = t.a7-1 by A6,A62,A65,A66,Lm13;
A68: b=intpos (0+7) by A62,SCMP_GCDend
A69: now
v 0 SCMPDS ;
      assume that
70:va3 = and
  .2ta2 and
 vataand
A73:  v.b > 0;
      =v asof A70,3
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
A75:     v.intpos ME = (v).intpos ME;
      thus IExecproof
       by A6,A62,A66,A70,A71,A72,Lm13,A75;
      WB2 is_closed_on v, &WB2 is_halting_on v,V by SCMPDS_6:20,21;
A76:  v.intposhencethesis  A1,Th12
& WB2,,) a3=va31
 & IExec(WB2,V,v).a5=v.a7-1
   ,A62A66A,,A72
      hereby
        per cases;
        suppose
      v md intpos;
          hence IExec(WB2,V,v).b < v.b by A68,A76,XREAL_1:146;
A78:      v.a3 +1 > v.a3 by XREAL_1:29;
          IExec(WB2,V,v).a3=v.a3+1
           by A6,A62,A66,A70,A71,A72,A77,Lm13;
          hence IExec(WB2,V,v).a3 >= 8 by A70,A78,XXREAL_0:2;
        end;
        suppose
A79:      v.intpos md <= v.intpos ME;
          hence IExec(WB2,V,v).b < v.b
           by A6,A62,A66,A68,A70,A71,A72,A73,Lm13;
          thus IExec(WB2,V,v).a3 >= 8
           by A6,A62,A66,A70,A71,A72,A79,Lm13;
        end;
      end;
      thus IExec(WB2,V,v).a2=v.a2
       by A6,A62,A66,A70,A71,A72,A74,Lm13;
    end;
A80: t.intpos md <= t.intpos me implies It.a7=0 & It.a3=t.a3 & It.a5=t.a7
    by A6,A62,A65,A66,Lm13;
A81: me=t.a3;
    then
A82: It.a=0 by A6,A62,A65,A66,Lm13;
    then
A83: It.DataLoc(It.a,7)=0 by A63,A67,A80,SCMP_GCD:1;
: now
      let x;
:( It).GBP = It.GBP bySCMPDS_515java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
A86: (Initialize It).DataLoc(^   vw=ujava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
       clusterstrict nonempty finite deterministic for transition-system over F;
existence
    reconsider java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 66
        .=It.x    thus isstrict
    end;
    hence IExecjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   .a1ta1byA6,A62A65,A66,A81,Lm13;
    hence IExec(WH2,Q,t).a1=t.a1 by A84;
    thus IExecjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
    It.a2=t.a2 impliesxin   y  & zTS&x  domdom(the Tran of 
    hence IExec(WH2,Q,java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    It.a4ta4byA6A62,A66,A81Lm13;
    hence IExec(WH2,Q,t).a4=t.a4 by A84;
A87: now
      let i be Nat;
      assume
A88:  i >= 8;
      thusIExecWH2Qt).ntpos i=It.intpos i  A84
        .=t.intpos i by A6,A62,A65,A66,A81,A88,Lm13;
    end;
    hence for i be Nat st i >= 8
    holds IExec(thus z in rng(the Tranof TS) by A1,XTUPLE_0:def 13;
  for TS1 being transition-system over X1,TS2 being
      per cases;
      
A90:    t.intpos md > t.intpos :1;
         reconsider0asNat;
        take ;
        take mE3=m3;
        (WH2Qt.=  A63A67A,
        thus  then [x, <%]in dom (  of )by: 12
java.lang.StringIndexOutOfBoundsException: Range [19, 8) out of bounds for length 23
        thus m5 <= t.a7assumethat
        hereby
          let i be Nat;
          assume then[,indom  12;
A91:      t.java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 27
A92:      i <  x1, x2 =.y1,y2  means
          i <= me by A63,A64,A92,NAT_1:13;
          then i=t.a3 by A91,XXREAL_0:1;
          hence IExec(WH2,Q,t).intpos md
           java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        ;
        thusjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        IExec(WH2,Q,t).intpos mE3;
      x1 => y1,y2 java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
:md< t.
     m5= as java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
take;
        take mE3=me;
        thus IExec(WH2,Q,
        thus IExec(x,v^==>  ,TS
        thus mE3+m5=m3 by A63,A64;
thusm5< .a7by A63;
        thus for i be Nat st t.a3 <= i
         & i < mE3 holds IExec(WH2,Q,t).intpos md > IExec(WH2,Q,t).intpos i;
        thus m5=0 or u = u1^v;
<= IExec(WH2,,).ntposmE3 ,,
      java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
  endby Th9;
  then
4 P[0;
   k beNat holds P] from NAT_1:sch2(A94,A8);
  hencethesis A1A3,,A5A7
end;

Lm15: for being 0started State of ,md be Nat
 st s.GBP=0 & s TSand
s.a2=md end
proof
  aGBP;
  let s be 0started  ofSCMPDS,d Nat;
s =DataLocs.,7;
  assume that
  wv;
A2: s.a3>=8 and
A3:sa2md and
A4: md >= 8;
A5: bhence contradiction A1A5,XTUPLE_0:13;
  now
    let v   forTSbeing transition-system overF  not <%>E in rng  rng dom 
    assume that
A6:va3 = 8  
A7: v.a2=s.a2 and
A8: v.a=s.a and
A9: v > 0;
    reconsider ME=v.a3 as Element of NAT by A6,INT_1:3;
A10:MEv.a3;
    hence IExec(WB2,V,v).a=v.a
     by A1,A3,A4,A6,A7,A8,Lm13;
 is_closed_on ,V &WB2 is_halting_on v, by20,1;
A11: v.   then u< <%>E by,,Th28;
WB2Vv .v.31
(WB2,,.=va7-1 by A1,3A4,6,7A,Lm13;
    hereby

      
:    .ntposmd >intpos ;
        A1   =.y1,z1,T and
A13:  consider,w2such that
        IExec(WB2,V,v).a3=.31
        by A1,A7:x1 w1 -> y1, S
        hence IExec(WB2,V)a3> 8 by A6,A13,XXREAL_0:;
      end;
      suppose
:v.ntpos md < v.intpos ME;
        hence IExec(  thesisby ,A6A3A9,Th27;
         by A1,A3,A4,A5,A6,A7,A8,A9,Lm13;
         IExec(WB2,,.a3>= 8
         by A1,A3,A4,A6reserves,s9 s1, s2, t ,t2 forElement ofTS;
      java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    ;
    thus IExec(WB2,V,v).a2=v.a2 by A1,A3,A4,A6,A7,A8,A10,Lm13;
  end;
   by Th6;
end;

java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 7
proof
    WB3=W ;  +cardIF3 by AFINSQ_1:17
    .=11+ 11         y1 TSbyjava.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
   =+( k5''k6 ;'k7 ''k8; ''k0+)by 7
.=+card k5';''' k7 '; k8 ';' k9)+1+1) by SCMP_GCD:4
    .=22+(card (k5 ';'         
    .=22+(card (k5 ';' k6 ';' k7)+1+1+1+1) by SCMP_GCD:4
    .=22+(card (k5 ';' k6)+1+1+1+1+1) by SCMP_GCD:4
    .=22+(2+1+1+1+1+1) by SCMP_GCD:5
    .=29;
end;

Lm17 card =31

  thus card WH3=29+2 by Lm16,SCMPDS_8:17
    .=31;
end;

begin:java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

theorem Th9:
  card Partition=38
proof
  thus card Partition=card (K4 ';' WH3 '    
    .=card (K4 ';' WH3      considerx  beingobject such 
    .=card (K4 ';' WH3)+1+1+1 by SCMP_GCD:4
    .card K4card WH3+++ AFINSQ_1
    43111+byLm17Th4
    .=38;
end; vin E^java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22

Lm18: forsbe 0started  of SCMPDS
m4 be Nat s.GBP=0&sa5 >0 &
s.a3=m3 & s.a4=m4 & m3>6 & m4 > 6
 holds IExecIF3,PInitialize s)GBP= &IExecIF3,Initialize s).=s.
a1 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IExec(,,)intpos m3. m4
 &
intpos m4=s.intpos m3 & IExec(IF3,P,Initialize s).a3=  thenyin [ thecarrierof TS, E^omega :] by ZFMISC_1:87;
 & IExec(IF3,P,Initialize s).a4=s.a4-1 &
 IExec(st y1 incarrier TS Eomega   =[y1, 
  for i be Nat st i >= 8 & i <> m3 & i <> m4 holdsthenex x2beingobject
IExec(IF3,P,Initialize s).intpos i=s.intpos i

proof
  set a=GBP;
  let s be 0-started State of SCMPDS,m3,m4 be Nat;
  assume that
A1: s.a=0 and
A2: s.a5 > 0 and
A3:s=m3 and
A4: s.a4=m4 and
A5: m3 > 6 and
A6:m4  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 m4 >3 A6,:;

=intposm3 intpos m4,t0=nitialize s, 1=Exec(5''k6 ; 

';' k8 ';' k9 ';' k0,P,Initialize s),
:
t3 Tran ofTS1   of TS2holds=>-TS1)==>-(TS2)
t4=Execk5; k6''k7,P,Initialize s), t5=IExec(k5 ';' k6,P,Initialize s)
  , t6=Exec(k5,t0);

:t0.=0by A1,CMPDS_5:15
  then
A9: DataLoc(t0.a,6)=intposA4:x=[[s,v, [,w]byTh33;
  then
:t6a= byA8AMI_3:,47;
A11:t0.= byA4,:15
  then
A12: t6.a4 =m4 by A9,AMI_3:10,SCMPDS_2:47;
  then
A13: DataLoc(t6.a4,0)=intpos (m4+0) by SCMP_GCD:1;
A14:t5.=xec, .a bySCMPDS_5:42
    .=0 by A6,A10,A13,AMI_3:10,SCMPDS_2:47;
A15: t6.a6 =hence thesisby A2,TARSKI:2java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
   =0.intpos(40 by A11,:1
    .=s.y by then x1, x2 ==>.,y2, TS y ;
  t5.a6 =Exec(k6[x u] y v]]in =>relation(S)implies exw stx w --.
.=sSCMPDS_247;
  then
A16: hence;
  t0.a3=m3 by A3,SCMPDS_5:15
  then
A17:  proof
A18:t5a3 Exec(,t6)a3by CMPDS_5
      end
  then
A19: DataLoc(t5.a3,0)=java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
A20 .=x :;
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 30
    .=t6.DataLoc(6.a3, by,SCMPDS_2:47
    .=t6.intpos(m3+0) by A17,SCMP_GCD:1
    =xby ,A20A9AMI_3:0SCMPDS_2:47;
A22:now
     
    suppose
A23:  y<>java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 4
      t4.y =Exec(,t5). bySCMPDS_5:41
        .=s.x by A21,A23,SCMPDS_2:47;
    end;
    suppose
  y(.0;
      thust4.y =xec(k7, t5).y  SCMPDS_5:41
        .=s.x by A19,A16,A24,SCMPDS_2:47;
    end
  ;
 t0a2=.a2  SCMPDS_5:;
  then
A25: t6.a2 =s.  s, v ==>. y1,,TS  s, v=.y2, ,TS  A2A,,;
A26: m4 > 2 by A6,XXREAL_0:2;
A27: m3 > 5 byA5XXREAL_0:2;
A28: t4.a =Exec(k7,  ==-()lenu  v
    .=0 by A5,A14,A19,AMI_3:10,SCMPDS_2:47;
  then
A29: DataLoc(t4.a,05 by SCMP_GCD1
A30:theor Th43
    .=0 by A28,A29,AMI_3:10,SCMPDS_2:48;
  hen
A31:a<DataLoc(t3.,)by :10SCMP_GCD:;
  TSis deterministic implies ([x, y1] in ==>.-relation(TS) & [x,
  then
A33A2 [,y1 in =>.-relation( and
 t4.3 Exec(,)a3  SCMPDS_541
    ,,A19AMI_3:,47;
A35: A7:s1,v1=>.,w1  byA2A5,A6,ef4;
    .m3 by A34,A29,AMI_3:10,SCMPDS_2:48;
A36: DataLoc(t3.a,3)=intpos (0+3) by A30,SCMP_GCD:1;
A37: t2.a3 =Exec(k9, t3).a3 by SCMPDS_5:41
    .=m3+1 by A35,A36,SCMPDS_2:48;
A38: m3 > 2 by A5,XXREAL_0:2;
A39:m4>  byA6XXREAL_0:;
A40: t5.a2 =Exec(k6, t6).a2 by SCMPDS_5:42
    .=s.a2 by
A41:t4.=(k7 t5)x SCMPDS_5:java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
    .=s.y by A19,A16,java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 5
A42:t3. =(8 t4).x by SCMPDS_5:41
    .=s.y by A27,A41,  thesis  FUNCT_1def;
A43: t2.x =Exec(k9, t3).x by SCMPDS_5:41
    .=s.y by 
A44:t3. Exec(k8, t4).y bySCMPDS_5:java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    .=s.x by   ,u otherwise{;
 <(3.a3) by ,30A10,java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 54
e;
    .=s.x by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:t4t5)a2 ySCMPDS_5:1
    .   + 1indom P holds exs,v t,w  .k  [, v]&P(+1)= [t, w]
A48: t3.a2 =Exec(k8, t4).a2 by SCMPDS_5:41
    .=s. assumekin dom P& k  1 in P;
A49   [.k .k+1]in =.( bydef2;
A50: t2.a2 =Exec(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
    .=k+1   holdsPk=(.)1,(P.`]&P.k +1  [(.(+1))`, P.
A51: m4 proof
A52:(sa,5)intpos05)by A1,SCMP_GCD1;
  t0.a5=s.a5 by SCMPDS_5:15;
  then
A53: t6.a5 =s.a5 by A9,AMI_3:10,SCMPDS_2:47;
A54: t5.a5 =Exec(k6, t6).a5 by SCMPDS_5:42
    =.a5 by A39,53,,AMI_3:10,SCMPDS_247java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
A55   P RedSequence =.relation() java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    .=s.a5 by A27,A54,A19,AMI_3:10,then
 a =k,t)a5  41
    .=t4.a5+-2 by A29A2   s ]&P(  )
.sa5- byA55;
A57: a5<>DataLoc(t3.a,3) ;
a5 bySCMPDS_5:java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    =.2byA56,57,:48;
  t0.a1=s.a1 by SCMPDS_5:15;
  then
A59:t6a1=s.a1 by A9,MI_310SCMPDS_2:47;
A60: m3   transition-systemover F2such 
A61: t2.a =Exec(k9, t3).a by SCMPDS_5:41
    .=0 byletPbeRedSequence of=>-relation(S1)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  
A62:a>(t2.a,4)byAMI_3,SCMP_GCD:1
A63: m4 > 4 by A6,XXREAL_0:2;
  hen
A64: y<>DataLoc(t2.a,4) by A61,AMI_3:10,SCMP_GCD:1;
A65 m3 >4by A5,XXREAL_0:;
  then
A66 x<DataLoc(.a,4 by A61,AMI_3:10,SCMP_GCD:;
A67 a4<>DataLoc(t3.a,3) by A30,AMI_3:10,SCMP_GCD:1;
A68: t5.a4 =Exec(k6, t6).a4 by java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 17
    .=m4 by A63,A12,A13,AMI_3:10,SCMPDS_2:47;
A69: t4.a4 =Exec(k7, t5).a4 by SCMPDS_5:3: k 1;
    .=m4 by A65,A68,A19,AMI_3:10,SCMPDS_2:47;
java.lang.StringIndexOutOfBoundsException: Range [30, 3) out of bounds for length 42
       .=m4 by ,A29AMI_3:10SCMPDS_2:48;
A71: t2.a4 =Exec(k9, t3).a4 by SCMPDS_5:41
    .=m4 by A70,A67,SCMPDS_2:48;
(a4 A61,MI_3:,SCMP_GCD:1;
A73: thenlin dom by ,:25;
    .=s.a1 by A59,A13,A51,AMI_3:10,SCMPDS_2:47;
A74 t4.=Exec(k7,t5)a1 bySCMPDS_541
    .=s.a1 by A73,A19,A60,AMI_3:10,SCMPDS_2:47rng=>-relation(S c :the carrier of TS E^mega: byRELAT_1:ef 19
A75: t3x1, y1 being object
:48;
A76: a1<>DataLoc(t3.a,3) by java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 25
A77: t2.    then k 1  by A8,XXREAL_01java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    .=s.a1 by A75,A76,SCMPDS_2:48;
A78:a1>DataLoc(t2.a,4)by A61AMI_3:10,SCMP_GCD:;
  t1 Exec(0 t2)abySCMPDS_5:41
    = by A,SCMPDS_2:8;
  hence IExec(IF3,P,Initialize s).a=   P.len P = [y, w];
  .1 Exec(k0, )a1 by SCMPDS_5:41
    .=s.a1 by A77,A78,SCMPDS_2:48;
  hence IExec(IF3,P,Initialize s).a1=s.a1 by A2,A52,SCMPDS_6:83;
A79: a2<>DataLoc(t2.aA3 k]
  t1.a2 =      set len=len;
    =.a2 ,A79,:48;
  hence IExec(IF3,P,Initialize s).a2=s.a2 by A2,A52,SCMPDS_6       ex u st(.lenP-( +1)`= u^w
  t1.x =Exec(k0, t2).x by SCMPDS_5:41
    .=s.y by A43,A66,SCMPDS_2:48;
  hence IExec(IF3,P,Initialize s).x=s.y by A2,A52,SCMPDS_6:83;
 t1. =Exec(0 t2)y :java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    . Element S v2 suchthat
  hence IExec(,,Initializes).y=s.x by A2,A52,SCMPDS_6:83;
A80: DataLoc(t2.a,4)=intpos (0+4) by A61,SCMP_GCDA10:      P.len2 =[,v2]byTh31;
  a3 =Exec(k0, t2).a3 by SCMPDS_5:41
    .m31byA72,:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
         Plen1)  u2^byAjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
   thesis
    .=t2.a4+-1 by A80,SCMPDS_2:48
    .s.- byA4,A71;
  hence IExec(IF3,P,Initialize s).a4=s.a4-1 by A2,A52,SCMPDS_6:83;
A81:         endjava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
  t1.a5A12:P0]by ;
    .=s.a5-2 by A58,A81,SCMPDS_2:48 hereby
  hence IExec(    k< len P by A14,FINSEQ_3:25;
A82: now
    let i be Nat;
    assume that
A83: i >= 8 and
    i <> m3 and
    i <>m4;
    i > 6 by A83,XXREAL_0:2;
    hence A2: P.len P = [y, w];
      .s.  1;
  end;
A84: now
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
    assume that
A85:i= and
and
A87: i <> m4;
    thus     
      .=t6.intpos i by A13,A87,AMI_3:10,SCMPDS_2:47
      .=s.intpos i by A82,java.lang.StringIndexOutOfBoundsException: Range [9, 29) out of bounds for length 20
  end;
A88:  assume lin domP;
    let i be Nat;
    assume that
  =8 
   
A91: i <> m4;
    thus t4.intpos i =Exec(k7, t5).intpos i by SCMPDS_5:41
      .=t5.intpos i by A19,A90,AMI_3:10,SCMPDS_2:47
      .=s.intpos i by A84,A89,A90,A91;
  end;
A92: now
    let i be Nat;
then
A93: i >= 8 and
A94: i <> m3 and
>TS java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 70
A96: i > 5 by A93,XXREAL_0:2;
    thus t3.intpos i = A10java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
      .=        QbeingRedSequenceof =>-)  that
      .=s.intpos i by A88,A93A14     P=Q   y A5A7,;
  :=[P1 1)`,(.  1)`]byA13A12,:;
 
    let i be Nat;
     that
A98: i >= 8 and
A99: i <  and
 i< m4
    i > 3 by A98,java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
    then
   then reconsider=l-1 s  21
    thus t2.intpos i =Exec(then
      .=t3.intpos i by A101,SCMPDS_2:48
      .=s.intpos i by A92,A98,A99,A100;
  end;
A102: now
    let i be Nat;
    assume that
A103: i >= 8 and
A104: i <> m3 and
A105:            l=1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    i > 4 by A103,XXREAL_0:2;
    then
:  >DataLoct2a)byA61,MI_310:1;
    thus t1then
      .=t2.intpos i by A106,SCMPDS_2:48
      .=s.intpos i by A97,A103,A104,A105;
  end;
  hereby
    let i be Nat;
    assume that
A107: i >= 8 and
A108: i <> m3 and
A109: i <> m4;
    thus IExec(IF3,P,Initialize s).intpos i = t1.intpos i by A2,in  P exv w v =(.k 1)2 &(.k)1 --.(.k+1))1,TS
      .     of=.TS,ksuchthat
  end;
end;

Lm19: for s be 0-started State of SCMPDS,
md,m3 be Nat st s.GBP=  then  v1 such
a4+.a5&m3.a3-1 & a2  md =8  md < m3
 holds WB3 is_closed_on s,P
  & WB3 is_halting_on s,P & IExec(WB3,P,s(.)`1,w1-> ,TSby A2,A5
  IExecjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
&IExec(WB3,P,s).a2=& IExec(WB3,,).a3 >=sjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 & IExec(WB3,java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
>= m3 &  assume k  domP  k +1indom  &P.k =[x,u  P.(  )= [,v;
 & IExec(WB3,P,s).a4= IExec(WB3,P   [[x,u, [y,v]in =>-relation(S REWRITE1def;
& n2beNat n1=(,P)a31&
 n2=IExec(WB3,P,s).a4+1
 & (for i be Nat st itheoremTh57:
holds IExec(WB3,P,s).intpos i=s.intpos i)
 & (IExec(WB3,P,s).intpos n1=s.intpos n1 &
IExec(   x,y -. z,TS implies<*[, y],[z, <>]* is RedSequence of
 & n2 <= s.a4 & IExec(WB3proof
intpos sintposn2&IExec(Ps)intposn2=s.)
 & n
 holds IExec(WB3,P  [,y,[<>]  =.-)byTh8
  fori Natst n2<i&i =s.4
 holds IExec(WB3x,  -> , TSiff *[x,vw,[,w* RedSequenceof =>-(S

 =;
  sbe0started SCMPDS,,beNat
A1:  
  assume that
A2: s.a=0 and
A3: s.a5 > 0and
A4: s.a4=m3+s.a5 and
A5: m3=s.a3-1 and
A6: s.a2=md and
A7: md >= 8 and
8 md<= m3;
  set s1=IExec(WH1,P,s);
A9: s1.a = (Initialize s1).a by SCMPDS_5:15;
A10: s1.a1 = (Initialize s1).a1 by java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 31
A11 s1.  Initialize s1)a2 by SCMPDS_5:;
A12:s1 =( s1).a3 by SCMPDS_5:15;
A13: s1.a4 = (Initialize s1).a4 by SCMPDS_5:15;
A14: s1.a7 = (Initialize s1).a7 by SCMPDS_5:15;
A15: 8 by A7,8XXREAL_02;
  then consider mE   .1 = [x, u] & P.len  [,u  len = 1 & $ >1holds ;
A16 mE=s1a7 
A17: s1.a4=+mE and
A18: mE <= s.a5 and
A19: for i be Nat st m3      let Pbe RedSequence  ==>.relation(TS) x,, y such that
  < s1.intpos i and
A20: mE = 0 or s1.intpos md >= s1.intpos(      consider Q being RedSequence of ==>.-(TS)that
A21: s1.=0byA2,3A4,,A7,,m8;
A22: s1.a1=s.a1 by A2,A3,A4,A6,A7,A15,Lm8;
A23: WH1 is_halting_on s,P by A2,A4,A6,A7,A15,Lm9;

  set s2=IExec(WH2,P,Initialize s1), sm=m3+1+mE,
A7:  1 +1indom  A6FINSEQ_3:25java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
     s3=IExec(WB3,P,s), P12 = P, P3 = P,
  m4=m3+mE;
 a )aby15;
:s12  Ijava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 49
A26: s12       x,u ==. P(  1))1,u,  byDef4;
:.a3= (Initializes12.bySCMPDS_515;
e;
A29: s12.a5 = (Initialize s12).a5 by SCMPDS_5:15;
A30: s1.a3+s1.a7=sm by A2,A3,A4,A5,A6,A7,A15,A16,Lm8;
A31: m4 >= 8 by A15,NAT_1:12;
  for kholdsP[k] from NAT_1:sch 2(A10, A2);
A33: s1a3=s. by ,A3,A4,,A7,,;
  s1.a3=m3+1 by A2,A3,A4,A5,A6,A7,A15,Lm8;
  m3<a3by 29;
  then
A34: s1.a3 >= 8 by A15,XXREAL_0:2;
A35 a5 by A3A4A6A7A15Lm8
A36: m3+mE <= m3+s.a5 by A18,  per cases;
A37:  s, by A2,A4,A6,A7,A15,Lm9;
  per cases;
  suppose
A38: mE <=econsider p1  len P  asNat by :;
A39: (Initialize s1).GBP = s1.GBP by SCMPDS_5:15;
A40: (Initialize s1).DataLoc(s1.GBP,7    1 + 1 <=len PbyA4NAT_113java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
A41: (Initialize s1).a5:;
A42: (Initialize s1).a1 = s1.a1 by SCMPDS_5:15;
A43: (Initialize s1)a2  s1.a2 by SCMPDS_5:;
A44: (Initialize s1).a3 = s1.a3 then consider s2, v2, t2, w2 such
A45: (Initialize s1))a4=s1.a4 by SCMPDS_5:;

A46: DataLoc(s1 .1=[,v1 and
    
:Pby,,20
A48: WH2
      not <%   dom (he of)implies forPbeing
A49: s12.a5=s2.a5 by A37,A23,A47,SCMPDS_7:30
       A35A41,A16,A46,A40,:;
 .=.by A23,,30
      .=0 by A21,A39,A16,A38,A46,A40,SCMPDS_8 assume
    then
A51:DataLoc(.,)intpos05 bySCMP_GCD:;

A52: WH1 ';' WH2 is_halting_on s,P by A37,A23,A48,A47,A1,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 63
A53: WH1 ';' WH2 is_closed_on s,P by A37,A23,A48,A47,A1,SCMPDS_7A5:  P1 = [x, ]
hence s,&WB3 is_halting_ons,Pby SCPISORT:8
    thus IExec(WB3,P,s).a
       =IExec(IF3,P12,Initialize s12).a by A53,A52,SCPISORT:6
      hence  P<len u    NAT_1:;
    thus IExec(WB3,P,s).a1=IExecA7:    lenu >1
    by A53A52SCPISORT:6
      .= s12.a1 by A49,A51,SCMPDS_6:84
      .= s2.a1 by A37,A23,A48          hencecontradiction by A7;
       . byA22,A,SCMPDS_823;
    thusthenconsider P9 RedSequence  =>-relation(  that
      .= s12.a2 by A49,A51,SCMPDS_6:84
      .= s2.a2 by A37,A23,A48,A47,SCMPDS_7A11:len P > 1 by A8,NAT_1:25;
      .=md byA6A32A16A38A46A39A40,A43SCMPDS_8:;
A54: s3.a3=java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 12
      .= s12.a3 by A49,A51        then
      =s2.a3by ,,A48,,:
      .= s.a3 by A33,A16, then
    hences3.a3 >= s.a3;
A55: s3.a4=IExec(IF3,P12,Initialize s12).a4 by A53,A52,SCPISORT:6
      .= s12.a4 by A49,A51,SCMPDS_6:84
      .= .a4 ,,A48A47SCMPDS_7:java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      .= m4 by A16,A17,A38,A46,A39,A40,A45,SCMPDS_8:23;
    hence s3.a4 <= s.a4 by A4:P9.  (.1  )`, ] A9A14F;
    thus s3.a4 >= m3 by A55,NAT_1x u => (P( + 1)1 u1 TS
A56: s3.a5=IExec(IF3,P12,Initialize s12).18:    x,v-->. ((  1)1,TS&u  u;
      .=0 by A49v<%E &    u1+lenvbyA1,,AFINSQ_117;
    hence s3.a5 < s.A19:    len u - 0 > lenu1+len v -lenvbyXREAL_1:5
    thuss3.5> 1by A56;
    thus s3.a4=s3.a3-1+s3.a5 by A5,A38,A54,A55,A56;
    take n1=m4;
    take n2=m4+1;
A57: mE=0 by A38;
    hence n1=s3.a3-1 by A5,A54;
    thus n2=s3.a4+1 by A55;
A58: now
      let x;
      thus s3.x=IExec(IF3,P12,Initialize s12end;
        .=s12.x by A49,A51,SCMPDS_6:84
        .=s2.x by A37,A23,A48,A47,SCMPDS_7:30;
    end;
A59: now
      let i be Nat;
      assume
java.lang.StringIndexOutOfBoundsException: Range [12, 3) out of bounds for length 13
A61 (Initialize s1.GBP =s1.GBP bySCMPDS_5:15;
:(Initialize s1.DataLoc(GBP) = .DataLoc(.BP,)by SCMPDS_5:;
      thus s3.intpos i=s2.intpos i by A58
        .=(Initialize s1).intpos i by A16,A38end;
        .=s1.intpos i by SCMPDS_5:15
        .  rng dom(the Tran of TS implies for P being
   ;
   hence
    for i be Nat st i  assume
     holds s3.intpos i =s.intpos i;
A63: m4 < n2 by XREAL_1:29;
    hence s3.intpos n1=s.intpos n1 & s3.intpos n2=s.intpos n2 or n1 >= s.a3 &
n2 <= s.a4 & s3.intpos n1=s.intpos n2 & s3.intpos n2=s.intpos n1 by A31,A59,
XXREAL_0:2;
    for i Nat sts.a3=i&i<= n1  s3. md = s3
    .intpos i by A5,A57,XREAL_1:146,XXREAL_0:2;
    hereby
A64: (Initialize s1).GBP = s1.GBP by SCMPDS_5:  suppose
65 I.ataLoc(.GBP,7)=s1.ataLoc(s1GBP,7)by SCMPDS_5:15;
A66:  s3.intpos md=s2.intpos len v = len w by A4,A5,XXREAL_0
        .=(Initialize s1).intpos md by A16,A38,A46,A64,A65,SCMPDS_8:23
        .=s1end;
      let i be Nat;
      assume that
A67: n2<i and
A68:  i <= s.java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
A69:  s3.intpos i=s2.intpos i by A58
        .  s, u, t such
         .(  1)  t  byA2;
      m4 < i by A63,A67,XXREAL_0:2;
      hence s3.intpos md <= s3.intpos i by A19,A68,A66,A69;
    end;
  end;
  
A70: mE > 0;
thenconsider m5, be Nat such that
A71: m5=s2.a5 and
A72: s2.a3=mE3 and
A73: mE3+m5=sm and
A74: m5 i
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    s2.intpos md > A6    indom  
A76: (m5 = 0 or s2.intpos
 md <= s2.intpos mE3) by A5,A6,A7,A16,A21,A32,A33,A34,Lm14,A9,A11,A14,A12;
A77: mE3+m5 <= mE3+s1.a7 by A74,A14,XREAL_1:6;
    then
A78: s1.a3 <= mE3 byA11:1<=l by ,INSEQ_3:
A79: s1.a3+s1.a7 <= mE3+s1.a7 by A5,A33,A16,A73,A74,java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 16
    then
A80: s.a3 <= mE3 by A33,XREAL_1:6;
 =8 A33,XXREAL_02
    then
A81: mE3 >A15:   k1 =0 +1by :;
A82: (Initialize s1).GBP = s1.GBP by SCMPDS_5A:k1 <l1 by A7,XREAL_1:9;
thenconsiderQRedSequence of ==>.-relation(TS) such that
A84: (Initialize s1).A19    len Q+1    A13,Th5java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

A85: WH2 is_halting_onA21:   in   A15,25;
 is_halting_ons1,P
      proof
        P+*topWH2 halts_on Initialize Initialize s1 byA85SCMPDS_6:def 3;
       hence thesis by SCMPDS_6:def 3;
      end;
nitialize ,Pby A6,7,A21,32A34,m15,A82,A83,A84;
:WH2 is_closed_on s1,
     proof
       for k being Nat holds
       IC Comput k<i+1by,,A12XXREAL_0:2
                    by A87,SCMPDS_6:def 2;
      hence thesis by SCMPDS_6:def 2;
     end
    then
A89: WH1''WH2 is_closed_on s,P by A37,A23,A86,A1,SCMPDS_7:24;
    s2.a1=s1.a1 by A5,A6,A7,A21,A32,A33,A34,A30,A70,Lm14,A9,A10,A11,A12,A14;
    then
A90: s12.a1 len  A8,A26FINSEQ_159
    s2.A30:    k domQby A10,FINSEQ_325
     by A5,A6,A7,A21,A32,A33,A34,A30,A70,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 12
    then
A91s12.a4=m4 by A17,A37,A23,A88,A86,SCMPDS_7:30;
    s2.a2=s1.a2 by A5,A6,A7,A21,A32,A33,A34,A30,A70,Lm14,A9,A11,A12,A14;
    then
: a2md by ,A32,A37,A23,A88,A86SCMPDS_7:30;
    s2.a=0 by A5,A6,A7,A21,A32,A33,A34,A30,A70,Lm14,A9,A11,A12,A14;
    then
A93: s12.a=0 by A37,A23,A88,A86,SCMPDS_7:30;
A94:   hence thesishence thesis by A33A34
A95: s12a3 by A37,A23,A72,A88,A86,SCMPDS_7:30java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
A96: WH1 ';' WH2 is_halting_on s,P by A37,A23,A88,A86,A1,SCMPDS_7:24;
    hence WB3   = Q.k
A97: m4 > 6 by A31,XXREAL_0:2;
A98: m4 > m3+0 by A70,XREAL_1:6;
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
A99: m4 >= m3+1 by INT_1:7;
A100A4:[]
    hereby
      per cases;
      suppose
A101:s12.a5>0;
        then IExec(IF3,P12,Initialize s12).a=0
         by A93,A95,A81,A91      
        hence IExec(WB3,P,s).a=0 by A89,A96,SCPISORT:6;
        IExec(IF3,P12,Initialize s12).a1=s12.a1
         by A93,A95,A81,A91,A97,A101,Lm18,A24hencek+ ]
        hence IExec(WB3,P,s).a1=s.a1 by A89,A96,A90,SCPISORT:6;
        IExec(IF3,P12,Initialize s12).a2=java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 15
         ,A95,A81,,A97A101,m18,A24,A26,A27,A28,A29,A100;
        hence s3.a2=md java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 5
        IExec(IF3,P12,Initialize s12).a3=s12.a3+1
         by A93,A95,A81,A91,A97,    let k
        then
A102:    s3.a3=mE3+1 by A89,A96,A95,SCPISORT:6;
          hencethesis A3,:;
        hence.>= s.a3 by ,,XXREAL_0:2;
 IF3P12,nitializes12).a4=.-1
 by A93,A95,A81,A91,A97,A101,Lm18,A24,A27,A28,A29,A100;
        then
    s3a4-1 by by A89,A91,CPISORT:;
        hence s3.java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    (,Initialize)a5=12.a52
 by A93,A95,A81,A91,A97,A101,Lm18,A24,A27,A28,A29,A100;
        then
A106:    s3.a5 =s12.a5-2 bylen P  Q;
        s12.a5 >=0+1  end;
        then
:   .a5- =1- byXREAL_1:;
        then
A108len P in domPbyFINSEQ_3:25;
        thus s3.a4 >= m3 by java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 27
         =sa5 A16,,A74,,XXREAL_0:;
        then m5-2 < s.a5-0 by XREAL_1:15;
        hence s3.a5 < s.a5 by A37,A23 (.len Q)2=(.len )`2 by ,,,,Th67;
thus.5> -1by,AA107,:6;
        thus s3.a4=s3.a3-1+s3.a5  uppose
,SCPISORT:6;
        take n1=mE3;
        take n2=m4;
            set k lenP
        then
A109:    n2 >= n1+0 by A108,XREAL_1:6;
 by A102
        n2-1+1
          .=s3.a4+1 by A89,A96,
A110begin :: Reductions
          let i be java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 13
A111:      s1.intpos i = (Initialize s1).intpos i by SCMPDS_5:15;
          assume
A112:i > 8
          thus s12.intpos i=s2.intpos i by A37
            .=s1.intpos i by A5,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,A12,A14,A111
            .=s.intpos i by A2,A3  =>-(TS)reduces[, ][,;
        end;
A113:    now
          let i be Nat;
          assume that
A114:      i  ,  P P)`2 by,Th51
      i< and
A116:      i<> n2;
. i=(java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
          thus s3.intpos i=IExec(IF3,P12,Initialize s12).intpos i
           by A89,A96,SCPISORT:6
            .=s12.intpos i by A93,A95,A81,A91,A97,A101,A114,A115,A116,Lm18,A24,
A27
,A28,A29,A100,A117
            .=s.intpos i by A110,A114;
        

 ibeNatsti > &i<>n1 & < holds s3.
        intpos i=s.intpos i;
:s12.intpos m4=(Initialize )intpos m4 by SCMPDS_5:15java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
(P12 s12. =s12intpos m4
         by,,A91A97,A101,Lm18,A24,A27A28,A29,A100,A118;
        then
     (Pk`,dim2(Pk,E)==> P(+1)`,dim2(P(  ),
         .s.intposn2byA15,A110NAT_112;
        m3 < m3+1 bythen
        then m3 < n1 by ,33,78XXREAL_0:2;
        then
A120:    md < n1 by A8,XXREAL_0:2;
        then md < n2 by A109,XXREAL_0:2;
        then
A121:      then reconsider  RedSequence of =>.-relation(TS)by,REWRITE1:2java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
A122:    s3.  thenQlen  = (. Q`,dim2(len , E^]A6
        then
A123:    s1.intpos md=s3.intpos md by A2,A3,tjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
1in  byA11FINSEQ_3;
        IExec(IF3,P12,Initialize s12).intpos m4=s12.intpos mE3
         by A93,A95,A81
        then
A125x -> , implies=>-) [x ] z %E]
          .=s.intposthen<*x ] [z <%E* is  of =>-relationTS by Th57;
        hence
        s3.intpos n1=s.intpos n1 & s3.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 30
& n2 <= s.a4 & s3.  x, v -->. y, TS implie=.-relation( reduces [x, v^w] [y, w]
,A79A119XREAL_1:;
A126:      s1.ntpos md=(nitialize)intpos mdby:15;
   s2.ntpos md=.intpos  by A5,A6,A7,,32,A33A34,,Lm14A9
,end
          .=s3.intpos md by theorem Th74:
        hereby
          let i be Nat;
          assume that
A128:      s.a3<=i and
A129:      i <= n1;
A130:      i >= 8java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A131:      s1.a3 <= i by A2,java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
cases
          suppose
A132:        i < n1;
A133:      s1.intpos i = (Initializetheorem
            s2.intpos i=s1.intpos i by A5,A6,A7,A21,A32,A33,A34,A30,A70,A130,A9
,A11,A12,A14,A133  len > v^w  ;
              .=s.intpos i by A2,A3,A4,A6,A7,A15,A130,Lm8
              .=s3.intpos i by A33,A34,Th77
            hence s3.md> .i byA75,127,A131,132A12;
          end;java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 65
          suppose
            i >= n1;
            then i=n1 by A129,XXREAL_0:1;
            hence
            s3.intpos mdnot> rng the of  (=.-TS
,A123
          ;
        end
    n1> 8  A7A120XXREAL_0:2;
        hereby
          let i be Nat;
          assume that
A135:      n2<=i and
A136:     i <= s.a4;
      =8  A135,:;
A138:      s1.intpos n1 = (Initialize s1).intpos n1 by SCMPDS_5:15;
          per cases;
          
A139:       n2 < i;
          . is. by A2
              .=s3.intpos i by A113,A109,A121  then  dom P &  + 1indom P byFINSEQ_325
            hence s3.intpos md <= s3.intpos i by A19,A123,A136,A139;
          
          java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            n2 >= i;
            then i=n2 byA3: ==>.-relation(TS) reduces x, [y2, z];
            then s3.intpos i=s1.intpos n1 by A2,A3,A4,A6,A7,A15,A125,A134,Lm8
              .=s2.intpos n1 by A5,A6,A7,A21,A32,A33,A34,A30,A70,A134,Lm14,A9
4,A138;
            hence s3.intpos md <= s3.intpos i by A37,A23,A71,A76,A88,A86,A101
,A5: PlenP = [y1, ]by A2REWRITE1:def 3;

          end;
        end;
      end;
      suppose
A140:;
A141:   DataLoc(s12.a,5)=intpos(0+5) java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 20
        thus IExec(WB3,P,s).a=IExec(IF3,P12,Initialize s12).a
byA89,A96,:
          .=0 by A93,A140,A141,SCMPDS_6:84theorem Th81:
ecWB3Ps.a1IExec,,Initialize s12).a1
        by A89,A96,CPISORT:6
140,A141,SCMPDS_6:84;
        thus s3.a2=IExec(IF3,P12,Initialize s12).a2 by A89,A96,SCPISORT:6
          .= md by A92,A140,A141,SCMPDS_6:84;
A142:   s3.a3=IExec(IF3,P12,Initialize s12).a3 by A89,A96,SCPISORT:6
          .= mE3 by A95,A140,A141,SCMPDS_6:84;
hence.  . A5,
theo Th83:

        hence s3.a4 <= s.a4 16java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
A144theorem
        thus s3a4> m3 by A98,A143;
A145t Th86:
          .=0 by A141,A144,SCMPDS_6:84;
        hence s3.a5 < s.a5 by A3;
        thus s3.a5 >= -1 by A145;
A146:   m4=m3+mE+1-1
          .=mE3+0Th70java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
hence.4s3a3-1+s3.a5byA142A143A145;
        take n1=m4;  b java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
         reconsider n2=m4+1  =* ^w,java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 39
        take n2;
thus=.a3a3-byA142,;
        thus n2=s3.a4+1 by A143;
A147:   now
          let x;
          thusnot%Erng dom(  ofTS;
            .x,,84
     =s2. by,A86,:;
        ;
A148:   now
          let     hence thesis by A1,Th60;
          assume
A149:     i >= 8;
A150:      s1.intpos i = (  not <%>E in rng dom (the Tran of T> in domthe TranofTS (,<e>=*y
          thus s3.intpos i of;
.s1intposi A6,,A,A34A30,A149
A12A14,
            .=s.intpos i by A2,A3,A4,A6,A7,A15end
        end;
        hence for =>  , java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 33
        intpos i pred,x2=> y,TSmeans
A151:   m4 < n2 by XREAL_1:29;
        hence
        s3.intpos n1=s.intpos n1 & s3.empty transition-system over F2 st the carrier-  st carrier ofTS1 =the carrier TS2 &
& n2 <= s.a4 & s3.intpos n1=s.intpos n2 & s3.intpos n2=s.intpos n1 by A31,A148,
 Th81;
        hereby
        let  bejava.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
          assume that
A152:    .=and
A153:     i <= n1;
          i <
          then
A154:     s2.intpos md > s2.intpos i java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
          s3
          hence s3.intpos md >= s3.intpos i by A147,A154;
        end;
        hereby
          let i be Nat;
          that
A155:     n2<=i and
A156:     i <= s.a4;
A157:     m4 < i by A151,A155,java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 14
          then
A158:
A159:      s1.intpos md = (Initialize s1).intpos md by SCMPDS_5:15;
A160:      s1.intpos i = (Initialize s1).intpos i by SCMPDS_5:15;
A161:     s3intpos=s2intpos md byA147
           s1.intpos md yA5A6,A7,A21,32A33A34,,A70Lm14A9,A11,
,A14,A159;
          func x-succ_of (X, TS) -> Subset of TS equals
            .=s1.intpos i by A5,A6,A7,A21,A32,A33,A34,A30,A70,A158,Lm14,A9,A11
,A12,A14,A160;
hence.java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 66
        end;
      end
    end;
  end;
end;

Lm20: for i be Integer st i >= -1 & i
proofin-java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 34
  let i be Integer;
  assume that
A1: i >=
A2: =0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  per cases;
  suppose
    i =-;
    hence thesis by A1,XXREAL_0:1;
  end;
 suppose
    i > -1;
   > -1+ by7
    hence thesis by A2TS1 benon  F1,TS2   
  end;
;

Lm21: for i1,i2 be Integer,n1,n2,i be Nat st i1 >    assume
thenreconsiderq =y as Element of;

of
  let i1,i2 be Integer,n1,n2,i be Nat;
  assume that
A1: i1 >= -1 and
A2:  
A3: n2=i2+1    assume
java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 44
A5reconsiderq as Element  TS2 by ;
  per cases by A1,A2,Lm20;
  suppose
    i1=0;
    hence thesis by A3,A4,A5,NAT_1:13;
  end;
  suppose
    i1=-1;
    hence thesis by A3,A4,A5;
  end;
end;

Lm22: for i1,i2 be Integer,n1,n2 be Nat st i1 >= -1 & n2=i2+1 & i2=
n1+i1 holds n1 <= n2
proof
  let i1,i2 be Integer,n1,n2 be Nat;
  assume that
A1: i1 >= -1 and
A2: n2=i2+1 and
A3: i2=n1+i1;
  n1+i1 >= n1+ -1 by A1,XREAL_1:6;
  then i2+1 >= n1+ -1+1 by A3,XREAL_1:6;
  hence thesis by A2;
end;

Lm23: for s,s1 be State of SCMPDS,n0,n1,n2,n be Nat,f, f1 be
FinSequence of INT st f is_FinSequence_on s,n0 & f1 is_FinSequence_on s1,n0 &
len f=n & len f1 = n & (for i be Nat st i >= n0+1 & i<>n1 & i<>n2
holds s1.intpos i=s.intpos i) & (s1.intpos n1=s.intpos n1 & s1.intpos n2=s.
intpos n2 or n1 >= n0+1 & n2 >= n0+1 & n1 <= n0+n & n2 <= n0+n & s1.intpos n1=s
.intpos n2 & s1.intpos n2=s.intpos n1) holds f,f1 are_fiberwise_equipotent
proof
  let s,s1 be State of SCMPDS,n0,n1,n2,n be Nat, f,f1 be
  FinSequence of INT;
  assume that
A1: f is_FinSequence_on s,n0 and
A2: f1 is_FinSequence_on s1,n0;
  assume that
A3: len f=n and
A4: len f1 = n;
  assume
A5: for i be Nat st i >= n0+1 & i<>n1 & i<>n2 holds s1.intpos
  i=s.intpos i;
  assume that
A6: s1.intpos n1=s.intpos n1 & s1.intpos n2=s.intpos n2 or n1 >= n0+1 &
n2 >= n0+1 & n1 <= n0+n & n2 <= n0+n & s1.intpos n1=s.intpos n2 & s1.intpos n2=
  s.intpos n1;
  per cases by A6;
  suppose
A7: s1.intpos n1=s.intpos n1 & s1.intpos n2=s.intpos n2;
A8: dom f1 = Seg n by A4,FINSEQ_1:def 3;
    now
      let i be Nat;
      reconsider a = i as Nat;
      assume
A9:   i in dom f1;
      then
A10:  1 <= i by A8,FINSEQ_1:1;
      then
A11:  n0+1 <= n0+i by XREAL_1:6;
A12:  i <= n by A8,A9,FINSEQ_1:1;
      per cases;
      suppose
A13:    n0+i<>n1 & n0+i<>n2;
        thus f1.i=s1.intpos (n0+a) by A2,A4,A10,A12
          .=s.intpos (n0+a) by A5,A11,A13
          .=f.i by A1,A3,A10,A12;
      end;
      suppose
A14:    not (n0+i<>n1 & n0+i<>n2);
        hereby
          per cases by A14;
          suppose
            n0+i=n1;
            hence f1.i=s.intpos (n0+a) by A2,A4,A7,A10,A12
              .=f.i by A1,A3,A10,A12;
          end;
          suppose
            n0+i=n2;
            hence f1.i=s.intpos (n0+a) by A2,A4,A7,A10,A12
              .=f.i by A1,A3,A10,A12;
          end;
        end;
      end;
    end;
    hence thesis by A3,A4,FINSEQ_2:9;
  end;
  suppose
A15: n1 >= n0+1 & n2 >= n0+1 & n1 <= n0+n & n2 <= n0+n & s1.intpos n1=
    s.intpos n2 & s1.intpos n2=s.intpos n1;
    then
A16: n1-n0 >= 1 by XREAL_1:19;
    then reconsider m1=n1-n0 as Element of NAT by INT_1:3;
A17: m1 <= len f by A3,A15,XREAL_1:20;
A18: n2-n0 >= 1 by A15,XREAL_1:19;
    then reconsider m2=n2-n0 as Element of NAT by INT_1:3;
A19: m2 <= len f1 by A4,A15,XREAL_1:20;
A20: n2=m2+n0;
A21: n1=m1+n0;
    then
A22: f.m1=s1.intpos n2 by A1,A15,A16,A17
      .=f1.m2 by A2,A18,A19,A20;
A23: now
      let k be Nat;
      assume that
A24:  k <> m1 and
A25:  k <> m2 and
A26:  1 <= k and
A27:  k <= len f;
A28:  k+n0 <> m1+n0 by A24;
A29:  n0+1 <= n0+k by A26,XREAL_1:6;
A30:  k+n0 <> m2+n0 by A25;
      thus f.k=s.intpos(k+n0) by A1,A26,A27
        .=s1.intpos (k+n0) by A5,A28,A30,A29
        .=f1.k by A2,A3,A4,A26,A27;
    end;
A31: m2 <= len f by A3,A15,XREAL_1:20;
    then f.m2=s1.intpos n1 by A1,A15,A18,A20
      .=f1.m1 by A2,A3,A4,A16,A17,A21;
    hence thesis by A3,A4,A16,A18,A17,A31,A22,A23,SCPISORT:3;
  end;
end;

Lm24: for s,s1 be State of SCMPDS,n0,n1,n2 be Nat,c1,c2 be Integer
st (for i be Nat st i >= n0 & i <>n1 & i<> n2 holds s1.intpos i=s.
intpos i) & n1 <= n2 & (s1.intpos n1=s.intpos n1 & s1.intpos n2=s.intpos n2 or
c1 <= n1 & n2 <= c2 & s1.intpos n1=s.intpos n2 & s1.intpos n2=s.intpos n1)
holds for i be Nat st i >= n0 & (i < c1 or i > c2) holds s1.intpos i
=s.intpos i

proof
  let s,s1 be State of SCMPDS,n0,n1,n2 be Nat,c1,c2 be Integer;
  assume

A1: for i be Nat st i >= n0 & i<>n1 & i<>n2 holds s1.intpos i
  =s.intpos i;
  assume
A2: n1 <= n2;
  assume
A3: s1.intpos n1=s.intpos n1 & s1.intpos n2=s.intpos n2 or c1 <= n1 & n2
  <= c2 & s1.intpos n1=s.intpos n2 & s1.intpos n2=s.intpos n1;
  per cases by A3;
  suppose
A4: s1.intpos n1=s.intpos n1 & s1.intpos n2=s.intpos n2;
    hereby
      let i be Nat;
      assume that
A5:   i >= n0 and
      i < c1 or i > c2;
      per cases;
      suppose
        i<>n1 & i<>n2;
        hence s1.intpos i=s.intpos i by A1,A5;
      end;
      suppose
A6:     not (i<>n1 & i<>n2);
        hereby
          per cases by A6;
          suppose
            i=n1;
            hence s1.intpos i=s.intpos i by A4;
          end;
          suppose
            i=n2;
            hence s1.intpos i=s.intpos i by A4;
          end;
        end;
      end;
    end;
  end;
  suppose
A7: c1 <= n1 & n2 <= c2 & s1.intpos n1=s.intpos n2 & s1.intpos n2=s.
    intpos n1;
    hereby
      let i be Nat;
      assume that
A8:   i >= n0 and
A9:   i < c1 or i > c2;
      per cases by A9;
      suppose
        i < c1;
        then i < n1 by A7,XXREAL_0:2;
        hence s1.intpos i=s.intpos i by A1,A2,A8;
      end;
      suppose
        i > c2;
        then i > n2 by A7,XXREAL_0:2;
        hence s1.intpos i=s.intpos i by A1,A2,A8;
      end;
    end;
  end;
end;

Lm25: for s be 0-started State of SCMPDS,
  md,m3,n0 be Nat,f,f1 be FinSequence
of INT st s.GBP=0 & s.a5 > 0 & s.a4=m3+s.a5 & m3=s.a3-1 & s.a2=md & md >= n0+1
& md <= m3 & n0+1 <= s.a3 & s.a4 <= n0+n & f is_FinSequence_on s,n0 & f1
is_FinSequence_on IExec(WH3,P,s),n0 & n0 >= 7 &
len f=n & len f1=n holds
 IExec(WH3,P,s).GBP=0 & IExec(WH3,P,s).a1=s.a1 &
 IExec(WH3,P,s).a2=md &
 IExec(WH3,P,s).a4 >= md &
 IExec(WH3,P,s).a4 <= s.a4 &
 f,f1 are_fiberwise_equipotent &
 (for i be Nat st s.a3<=i & i <= IExec(WH3,P,s).a4
   holds IExec(WH3,P,s).intpos md >=
   IExec(WH3,P,s).intpos i) &
 (for i be Nat st IExec(WH3,P,s).a4 < i & i <= s.a4
   holds IExec(WH3,P,s).intpos md <=
   IExec(WH3,P,s).intpos i) &
 for i be Nat st i >= n0+1 & (i < s.a3 or i > s.a4)
   holds IExec(WH3,P,s).intpos i = s.intpos i
proof
  set a=GBP;
  let s be 0-started State of SCMPDS,
      md,m3,n0 be Nat, f,f1 be FinSequence of INT;
  assume that
A1: s.a=0 and
A2: s.a5 > 0 and
A3: s.a4=m3+s.a5 and
A4: m3=s.a3-1 and
A5: s.a2=md and
A6: md >= n0+1 and
A7: md <= m3 and
A8: n0+1 <= s.a3 and
A9: s.a4 <= n0+n;
  defpred P[Nat] means
   for t be 0-started State of SCMPDS,Q
   for n3 be Nat, g,g1 be FinSequence of INT
     st t.a=0 & t.a5 > 0 & t.a5<= $1+1 & t.a4=n3+t.
  a5 & n3=t.a3-1 & t.a2=md & md <= n3 & n0+1 <= t.a3 & t.a4 <= n0+n & g
  is_FinSequence_on t,n0 & g1 is_FinSequence_on IExec(WH3,Q,t),n0
   & len g=n
   & len g1=n holds
    IExec(WH3,Q,t).a=0 & IExec(WH3,Q,t).a1=t.a1
 & IExec(WH3,Q,t).a2=md & IExec
(WH3,Q,t).a4 >= md & IExec(WH3,Q,t).a4 <= t.a4
 & g,g1 are_fiberwise_equipotent & (
  for i be Nat st t.a3<=i & i <= IExec(WH3,Q,t).a4
   holds IExec(WH3,Q,t).intpos md
    >= IExec(WH3,Q,t).intpos i)
 & (for i be Nat st IExec(WH3,Q,t).
  a4 < i & i <= t.a4
   holds IExec(WH3,Q,t).intpos md <=
   IExec(WH3,Q,t).intpos i) &
   (for i be Nat st i >= n0+1 & (i < t.a3 or i > t.a4)
 holds IExec(WH3,Q,t).intpos i = t.intpos i);
  assume
A10: f is_FinSequence_on s,n0;
  assume
A11: f1 is_FinSequence_on IExec(WH3,P,s),n0;
  assume that
A12: n0 >= 7 and
A13: len f=n and
A14: len f1=n;
  n0+1 >= 7+1 by A12,XREAL_1:6;
  then
A15: md >= 8 by A6,XXREAL_0:2;
A16: now
    let k be Nat;
    assume
A17: P[k];
    now
      let t be 0-started State of SCMPDS,
          n3 be Nat, g,g1 be FinSequence of INT;
      let Q;
      assume that
A18:  t.a=0 and
A19:  t.a5 > 0 and
A20:  t.a5<= (k+1)+1 and
A21:  t.a4=n3+t.a5 and
A22:  n3=t.a3-1 and
A23:  t.a2=md and
A24:  md <= n3 and
A25:  n0+1 <= t.a3 and
A26:  t.a4 <= n0+n;
      set t1=IExec(WB3,Q,t), Q1 = Q;
A27: t1.a=(Initialize t1).a by SCMPDS_5:15;
A28: t1.a1=(Initialize t1).a1 by SCMPDS_5:15;
A29: t1.a2=(Initialize t1).a2 by SCMPDS_5:15;
A30: t1.a3=(Initialize t1).a3 by SCMPDS_5:15;
A31: t1.a4=(Initialize t1).a4 by SCMPDS_5:15;
A32: t1.a5=(Initialize t1).a5 by SCMPDS_5:15;
A33:  t1.a4=t1.a3-1+t1.a5 by A15,A18,A19,A21,A22,A23,A24,Lm19;
A34:  now
A35:    DataLoc(t.a,5)=intpos(0+5) by A18,SCMP_GCD:1;
        let v be 0-started State of SCMPDS;
        let V;
        assume that
A36:    v.a4=v.a3-1+v.a5 and
A37:    md <= v.a3-1 and
A38:    v.a2=t.a2 and
A39:    v.a=t.a and
A40:    v.DataLoc(t.a,5) > 0;
        reconsider mm=v.a3-1 as Element of NAT by A37,INT_1:3;
        set Iv=IExec(WB3,V,v);
A41:    v.a4=mm+v.a5 by A36;
        hence Iv.a=v.a
         by A15,A18,A23,A37,A38,A39,A40,A35,Lm19;
        thus WB3 is_closed_on v,V & WB3 is_halting_on v,V
           by A15,A18,A23,A37,A38,A39,A40,A35,A41,Lm19;

        thus Iv.DataLoc(t.a,5) < v.DataLoc(t.a,5) by A15,A18,A23,A37,A38,A39
,A40,A35,A41,Lm19;
        thus Iv.a4=Iv.a3-1+Iv.a5 by A15,A18,A23,A37,A38,A39,A40,A35,A41,Lm19;
        Iv.a3 >= v.a3 by A15,A18,A23,A37,A38,A39,A40,A35,A41,Lm19;
        then Iv.a3-1 >= v.a3-1 by XREAL_1:9;
        hence md <= Iv.a3-1 by A37,XXREAL_0:2;
        thus Iv.a2=v.a2 by A15,A18,A23,A37,A38,A39,A40,A35,A41,Lm19;
      end;
      t1.a5 < t.a5 by A15,A18,A19,A21,A22,A23,A24,Lm19;
      then t1.a5+1 <= t.a5 by INT_1:7;
      then t1.a5+1 <= (k+1)+1 by A20,XXREAL_0:2;
      then
A42:  t1.a5 <= k+1 by XREAL_1:6;
      set t2=IExec(WH3,Q,t);
      assume
A43:  g is_FinSequence_on t,n0;
      assume
A44:  g1 is_FinSequence_on IExec(WH3,Q,t),n0;
A45:  t1.a=0 by A15,A18,A19,A21,A22,A23,A24,Lm19;
      then
A46:  DataLoc(t1.a,5)=intpos(0+5) by SCMP_GCD:1;
      assume that
A47:  len g=n and
A48:  len g1=n;
A49:  t1.a2=md by A15,A18,A19,A21,A22,A23,A24,Lm19;
A50:  t1.a1=t.a1 by A15,A18,A19,A21,A22,A23,A24,Lm19;
A51:  t1.a3 >= t.a3 by A15,A18,A19,A21,A22,A23,A24,Lm19;
A52:  t1.a4 >= n3 by A15,A18,A19,A21,A22,A23,A24,Lm19;
A53:  DataLoc(t.a,5)=intpos(0+5) by A18,SCMP_GCD:1;
A54:  t1.a4 <= t.a4 by A15,A18,A19,A21,A22,A23,A24,Lm19;
      consider n1,n2 be Nat such that
A55:  n1=t1.a3-1 and
A56:  n2=t1.a4+1 and
A57:  for i be Nat st i >= 8 & i <>n1 & i<> n2 holds t1.
      intpos i=t.intpos i and
A58:  t1.intpos n1=t.intpos n1 & t1.intpos n2=t.intpos n2 or t.a3 <=
      n1 & n2 <= t.a4 & t1.intpos n1=t.intpos n2 & t1.intpos n2=t.intpos n1 and
A59:  for i be Nat st t.a3<=i & i <= n1 holds t1.intpos
      md >= t1.intpos i and
A60:  for i be Nat st n2<=i & i <= t.a4 holds t1.intpos
      md <= t1.intpos i by A15,A18,A19,A21,A22,A23,A24,Lm19;

A61:  t1.a5 >= -1 by A15,A18,A19,A21,A22,A23,A24,Lm19;
      then
A62:  n1 <= n2 by A33,A55,A56,Lm22;
      per cases;
      suppose
A63:    t1.a5 > 0;
        set t3=IExec(WH3,Q1,Initialize t1);
        consider f3 be FinSequence of INT such that
A64:    len f3=n and
A65:    for i be Nat st 1<=i & i <= len f3 holds f3.i=t1.
        intpos (n0+i) by SCPISORT:1;
A66:    f3 is_FinSequence_on t1,n0 by A65;
A67:    f3 is_FinSequence_on Initialize t1,n0
        proof let i be Nat;
         assume 1 <= i & i <= len f3;
          then f3.i=t1.intpos(n0+i) by A65;
         hence f3.i=(Initialize t1).intpos(n0+i) by SCMPDS_5:15;
        end;
A68:    t1.intpos n1=t.intpos n1 & t1.intpos n2=t.intpos n2 or n1 >= n0+
1 & n2 >= n0+1 & n1 <= n0+n & n2 <= n0+n & t1.intpos n1=t.intpos n2 & t1.intpos
        n2=t.intpos n1
        proof
          per cases by A58;
          suppose
            t1.intpos n1=t.intpos n1 & t1.intpos n2=t.intpos n2;
            hence thesis;
          end;
          suppose
A69:        t.a3 <= n1 & n2 <= t.a4 & t1.intpos n1=t.intpos n2 & t1.
            intpos n2=t.intpos n1;
            then
A70:        n2 <= n0+n by A26,XXREAL_0:2;
            n1 >= n0+1 by A25,A69,XXREAL_0:2;
            hence thesis by A62,A69,A70,XXREAL_0:2;
          end;
        end;
A71:    n0+1 <= t1.a3 by A25,A51,XXREAL_0:2;
        t1.a3-1 >= t.a3-1 by A51,XREAL_1:9;
        then
A72:    md <= n1 by A22,A24,A55,XXREAL_0:2;
        now
          let i be Nat;
          assume that
A73:      i >= n0+1 and
A74:      i<>n1 and
A75:      i<>n2;
          n0+1 >= 7+1 by A12,XREAL_1:6;
          hence t1.intpos i=t.intpos i by A57,A73,A74,A75,XXREAL_0:2;
        end;
        then
A76:    g,f3 are_fiberwise_equipotent by A43,A47,A64,A66,A68,Lm23;
A77:    t1.a4 <= n0+n by A26,A54,XXREAL_0:2;
A78:    t2 =t3 by A19,A21,A22,A24,A53,A34,Th7;
        consider f4 be FinSequence of INT such that
A79:    len f4=n and
A80:    for i be Nat st 1<=i & i <= len f4 holds f4.i=t3.
        intpos (n0+i) by SCPISORT:1;
A81:    f4 is_FinSequence_on t3,n0
         by A80;
        thus t2.a=0 by A17,A33,A42,A45,A49,A55,A63,A64,A67,A78,A79,A81,A72,A71
,A77,A27,A29,A30,A31,A32;
A82:
(md < t1.a3 or md > t1.a4)
  implies t2.intpos md
   = (Initialize t1).intpos md by A6,A17,A33,A42,A45,A49,A55,A63,A64,A67,A71
,A72,A77,A78,A79,A81,A27,A29,A30,A31,A32;

A83:   md < t1.a3 by A55,A72,XREAL_1:146,XXREAL_0:2;
A84:    dom f4 = Seg n by A79,FINSEQ_1:def 3;
        now
          let i be Nat;
          reconsider a = i as Nat;
          assume
A85:      i in dom f4;
          then
A86:      i <= n by A84,FINSEQ_1:1;
A87:      1 <= i by A84,A85,FINSEQ_1:1;
          hence f4.i=t2.intpos (n0+a) by A79,A80,A78,A86
            .=g1.i by A44,A48,A87,A86;
        end;
        then
A88:    f4=g1 by A48,A79,FINSEQ_2:9;

        thus t2.a1=t.a1 by A17,A45,A50,A49,A33,A55,A42,A63,A64,A67,A79,A81,A72
,A71,A77,A78,A27,A28,A29,A30,A31,A32;

        thus t2.a2=md by A17,A45,A49,A33,A55,A42,A63,A64,A67,A79,A81,A72,A71
,A77,A78,A27,A29,A30,A31,A32;

        thus t2.a4 >= md by A17,A45,A49,A33,A55,A42,A63,A64,A67,A79,A81,A72,A71
,A77,A78,A27,A29,A30,A31,A32;

        t3.a4 <= t1.a4 by A17,A45,A49,A33,A55,A42,A63,A64,A67,A79,A81,A72,A71
,A77,A27,A29,A30,A31,A32;

        hence t2.a4 <= t.a4 by A54,A78,XXREAL_0:2;

        f3,f4 are_fiberwise_equipotent by A17,A45,A49,A33,A55,A42,A63,A64,A67
,A79,A81,A72,A71,A77,A27,A29,A30,A31,A32;

        hence g,g1 are_fiberwise_equipotent by A76,A88,CLASSES1:76;
A89:    t1.a3=n1+1 by A55;
        hereby
          let i be Nat;
          assume that
A90:      t.a3<=i and
A91:      i <= t2.a4;
A92:     t1.intpos i = (Initialize t1).intpos i by SCMPDS_5:15;
A93:      n0+1 <= i by A25,A90,XXREAL_0:2;
          hereby
            per cases;
            suppose
A94:          i < t1.a3;
              then
A95:          i <= n1 by A89,INT_1:7;

A96:       t2.intpos i = t1.intpos i by A17,A45,A49,A33,A55,A42,A63,A64,A67
,A79,A81,A72,A71,A77,A78,A93,A94,A92,A27,A29,A30,A31,A32;
         t2.intpos md = t1.intpos md by A83,A82,SCMPDS_5:15;
              hence t2.intpos md >= t2.intpos i by A59,A90,A95,A96;
            end;
            suppose
A97:           i >= t1.a3;

              thus
              t2.intpos md >= t2.intpos i by A17,A45,A49,A33,A55,A42,A63,A64
,A67,A79,A81,A72,A71,A77,A78,A91,A97,A27,A29,A30,A31,A32;

            end;
          end;
        end;
        hereby
          let i be Nat;
          assume that
A98:      t2.a4 < i and
A99:      i <= t.a4;
A100:     t1.intpos i = (Initialize t1).intpos i by SCMPDS_5:15;
          hereby
            per cases;
            suppose
A101:          i > t1.a4;
              then
A102:          i >= n2 by A56,INT_1:7;
              t1.a4 > n1+0 by A33,A55,A63,XREAL_1:6;
              then n2 > n1+1 by A56,XREAL_1:6;
              then n2 >= n0+1 by A55,A71,XXREAL_0:2;
              then i >= n0+1 by A102,XXREAL_0:2;

              then
A103:           t2.intpos i = t1.intpos i
         by A17,A45,A49,A33,A55,A42,A63,A64,A67,A79,A81,A72,A71,A77,A78,A101
,A27,A29,A30,A31,A32,A100;
           t2.intpos md = t1.intpos md by A83,A82,SCMPDS_5:15;
              hence t2.intpos md <= t2.intpos i by A60,A99,A102,A103;
            end;
            suppose
A104:         i <= t1.a4;
              thus
              t2.intpos md <= t2.intpos i
        by A17,A45,A49,A33,A55,A42,A63,A64,A67,A79,A81,A72,A71,A77,A78,A98
,A104,A27,A29,A30,A31,A32;
            end;
          end;
        end;
        hereby
          let i be Nat;
A105:     t1.intpos i = (Initialize t1).intpos i by SCMPDS_5:15;
          assume that
A106:      i >= n0+1 and
A107:      i < t.a3 or i > t.a4;
          n0+1 >= 7+1 by A12,XREAL_1:6;
          then
A108:         i >= 8 by A106,XXREAL_0:2;
          then
A109:      t1.intpos i = t.intpos i by A57,A58,A62,A107,Lm24;
          per cases by A107;
          suppose
            i < t.a3;
            then i < t1.a3 by A51,XXREAL_0:2;

            hence
            t2.intpos i = t1.intpos i
         by A17,A45,A49,A33,A55,A42,A63,A64,A67,A79,A81,A72,A71,A77,A78,A106
,A27,A29,A30,A31,A32,A105
            .= t.intpos i by A57,A58,A62,A107,Lm24,A108;

          end;
          suppose
            i > t.a4;
            then i > t1.a4 by A54,XXREAL_0:2;
            hence
            t2.intpos i = t.intpos i by A109,A17,A45,A49,A33,A55,A42,A63,A64,
             A67,A79,A81,A72,A71,A77,A78,A106,A27,A29,A30,A31,A32,A105;
          end;
        end;
      end;
      suppose
A110:    t1.a5 <= 0;
A111:    now
          let x;
A112: (Initialize t1).GBP = t1.GBP by SCMPDS_5:15;
A113: (Initialize t1).DataLoc(t1.GBP,5) = t1.DataLoc(t1.GBP,5) by SCMPDS_5:15;
          thus t2.x =IExec(WH3,Q1,Initialize t1).x
          by A19,A21,A22,A24,A53,A34,Th7
            .=(Initialize t1).x by A46,A110,A112,A113,SCMPDS_8:23
            .=t1.x by SCMPDS_5:15;
        end;
        hence t2.a=0 by A45;
        thus t2.a1=t.a1 by A50,A111;
        thus t2.a2=md by A49,A111;
        t2.a4 >= n3 by A52,A111;
        hence t2.a4 >= md by A24,XXREAL_0:2;
        thus t2.a4 <= t.a4 by A54,A111;
A114:    now
A115:      n0+1 >= 7+1 by A12,XREAL_1:6;
          let i be Nat;
          assume that
A116:      i >= n0+1 and
A117:      i<>n1 and
A118:     i<>n2;
          thus t2.intpos i=t1.intpos i by A111
            .=t.intpos i by A57,A116,A117,A118,A115,XXREAL_0:2;
        end;

A119:   t2.intpos n1=t.intpos n1 & t2.intpos n2=t.intpos n2 or t.a3 <=
        n1 & n2 <= t.a4 & t2.intpos n1=t.intpos n2 & t2.intpos n2=t.intpos n1

        proof
          per cases by A58;
          suppose
            t1.intpos n1=t.intpos n1 & t1.intpos n2=t.intpos n2;
            hence thesis by A111;
          end;
          suppose

            t.a3 <= n1 & n2 <= t.a4 & t1.intpos n1=t.intpos n2 & t1.
            intpos n2=t.intpos n1;

            hence thesis by A111;
          end;
        end;

        t2.intpos n1=t.intpos n1 & t2.intpos n2=t.intpos n2 or n1 >= n0+

1 & n2 >= n0+1 & n1 <= n0+n & n2 <= n0+n & t2.intpos n1=t.intpos n2 & t2.intpos
        n2=t.intpos n1

        proof
          per cases by A119;
          suppose
            t2.intpos n1=t.intpos n1 & t2.intpos n2=t.intpos n2;
            hence thesis;
          end;
          suppose
A120:       t.a3 <= n1 & n2 <= t.a4 & t2.intpos n1=t.intpos n2 & t2.
            intpos n2=t.intpos n1;
            then
A121:       n2 <= n0+n by A26,XXREAL_0:2;
            n1 >= n0+1 by A25,A120,XXREAL_0:2;
            hence thesis by A62,A120,A121,XXREAL_0:2;
          end;
        end;
        hence g,g1 are_fiberwise_equipotent by A43,A44,A47,A48,A114,Lm23;
A122:   t2.a4=n2-1 by A56,A111;
        hereby
          let i be Nat;
          assume that
A123:     t.a3 <= i and
A124:     i <= t2.a4;
          i < n2 by A122,A124,XREAL_1:146,XXREAL_0:2;
          then i <= n1 by A61,A33,A55,A56,A110,Lm21;
          then t1.intpos md >= t1.intpos i by A59,A123;
          then t2.intpos md >= t1.intpos i by A111;
          hence t2.intpos md >= t2.intpos i by A111;
        end;
        hereby
          let i be Nat;
          assume that
A125:     t2.a4 < i and
A126:     i <= t.a4;
          t2.a4+1=n2 by A56,A111;
          then n2 <= i by A125,INT_1:7;
          then t1.intpos md <= t1.intpos i by A60,A126;
          then t2.intpos md <= t1.intpos i by A111;
          hence t2.intpos md <= t2.intpos i by A111;
        end;
        thus for i be Nat st i >= n0+1 & (i < t.a3 or i > t.a4)
        holds t2.intpos i = t.intpos i by A62,A114,A119,Lm24;
      end;
    end;
    hence P[k+1];
  end;
  s.a5 >=1+0 by A2,INT_1:7;
  then reconsider m5=s.a5-1 as Element of NAT by INT_1:3,XREAL_1:48;
A127: s.a5=m5+1;
A128: P[0 qua Nat]
  proof
    let t be 0-started State of SCMPDS, Q;
    let n3 be Nat,g,g1 be FinSequence of INT;
    assume that
A129: t.a=0 and
A130: t.a5 > 0 and
A131: t.a5<= 0+1 and
A132: t.a4=n3+t.a5 and
A133: n3=t.a3-1 and
A134: t.a2=md and
A135: md <= n3 and
A136: n0+1 <= t.a3 and
A137: t.a4 <= n0+n;
    set t2=IExec(WH3,Q,t), Q2 = Q;
    assume
A138: g is_FinSequence_on t,n0;
    set t1=IExec(WB3,Q,t), Q1 = Q;
    assume
A139: g1 is_FinSequence_on IExec(WH3,Q,t),n0;
A140: t1.a4=t1.a3-1+t1.a5 by A15,A129,A130,A132,A133,A134,A135,Lm19;
    consider n1,n2 be Nat such that
A141: n1=t1.a3-1 and
A142: n2=t1.a4+1 and
A143: for i be Nat st i >= 8 & i <>n1 & i<> n2 holds t1.
    intpos i=t.intpos i and
A144: t1.intpos n1=t.intpos n1 & t1.intpos n2=t.intpos n2 or t.a3 <= n1
    & n2 <= t.a4 & t1.intpos n1=t.intpos n2 & t1.intpos n2=t.intpos n1 and
A145: for i be Nat st t.a3<=i & i <= n1 holds t1.intpos md
    >= t1.intpos i and
A146: for i be Nat st n2<=i & i <= t.a4 holds t1.intpos md
    <= t1.intpos i by A15,A129,A130,A132,A133,A134,A135,Lm19;
A147: t1.a5 >= -1 by A15,A129,A130,A132,A133,A134,A135,Lm19;
    then
A148: n1 <= n2 by A140,A141,A142,Lm22;
    t1.a5 < t.a5 by A15,A129,A130,A132,A133,A134,A135,Lm19;
    then t1.a5+1 <= t.a5 by INT_1:7;
    then t1.a5+1 <= 0+1 by A131,XXREAL_0:2;
    then
A149: t1.a5 <= 0 by XREAL_1:6;
A150: now
A151: DataLoc(t.a,5)=intpos(0+5) by A129,SCMP_GCD:1;
      let v be 0-started State of SCMPDS;
      let V;
      assume that
A152: v.a4=v.a3-1+v.a5 and
A153: md <= v.a3-1 and
A154: v.a2=t.a2 and
A155: v.a=t.a and
A156: v.DataLoc(t.a,5) > 0;
      reconsider mm=v.a3-1 as Element of NAT by A153,INT_1:3;
      set Iv=IExec(WB3,V,v);
A157: v.a4=mm+v.a5 by A152;
      hence Iv.a=v.a by A15,A129,A134,A153,A154,A155,A156,A151,Lm19;
      thus WB3 is_closed_on v,V & WB3 is_halting_on v,V
        by A15,A129,A134,A153,A154,A155,A156,A151,A157,Lm19;
      thus Iv.DataLoc(t.a,5) < v.DataLoc(t.a,5) by A15,A129,A134,A153,A154,A155
,A156,A151,A157,Lm19;
      thus Iv.a4=Iv.a3-1+Iv.a5 by A15,A129,A134,A153,A154,A155,A156,A151,A157
,Lm19;
      Iv.a3 >= v.a3 by A15,A129,A134,A153,A154,A155,A156,A151,A157,Lm19;
      then Iv.a3-1 >= v.a3-1 by XREAL_1:9;
      hence md <= Iv.a3-1 by A153,XXREAL_0:2;
      thus Iv.a2=v.a2 by A15,A129,A134,A153,A154,A155,A156,A151,A157,Lm19;
    end;
A158: DataLoc(t.a,5)=intpos(0+5) by A129,SCMP_GCD:1;
    assume that
A159: len g=n and
A160: len g1=n;
A161: t1.a=0 by A15,A129,A130,A132,A133,A134,A135,Lm19;
    then
A162: DataLoc(t1.a,5)=intpos(0+5) by SCMP_GCD:1;
A163: now
A164: (Initialize t1).GBP = t1.GBP by SCMPDS_5:15;
A165: (Initialize t1).DataLoc(t1.GBP,5) = t1.DataLoc(t1.GBP,5) by SCMPDS_5:15;
      let x;
      thus t2.x =IExec(WH3,Q1,Initialize t1).x
       by A130,A132,A133,A135,A158,A150,Th7
        .=(Initialize t1).x by A162,A149,A164,A165,SCMPDS_8:23
        .=t1.x by SCMPDS_5:15;
    end;
    hence t2.a=0 by A161;
    t1.a1=t.a1 by A15,A129,A130,A132,A133,A134,A135,Lm19;
    hence t2.a1=t.a1 by A163;
    t1.a2=md by A15,A129,A130,A132,A133,A134,A135,Lm19;
    hence t2.a2=md by A163;
    t1.a4 >= n3 by A15,A129,A130,A132,A133,A134,A135,Lm19;
    then t2.a4 >= n3 by A163;
    hence t2.a4 >= md by A135,XXREAL_0:2;
    t1.a4 <= t.a4 by A15,A129,A130,A132,A133,A134,A135,Lm19;
    hence t2.a4 <= t.a4 by A163;
A166: now
A167: n0+1 >= 7+1 by A12,XREAL_1:6;
      let i be Nat;
      assume that
A168: i >= n0+1 and
A169: i<>n1 and
A170: i<>n2;
      thus t2.intpos i=t1.intpos i by A163
        .=t.intpos i by A143,A168,A169,A170,A167,XXREAL_0:2;
    end;

A171: t2.intpos n1=t.intpos n1 & t2.intpos n2=t.intpos n2 or t.a3 <= n1 &
    n2 <= t.a4 & t2.intpos n1=t.intpos n2 & t2.intpos n2=t.intpos n1

    proof
      per cases by A144;
      suppose
        t1.intpos n1=t.intpos n1 & t1.intpos n2=t.intpos n2;
        hence thesis by A163;
      end;
      suppose
        t.a3 <= n1 & n2 <= t.a4 & t1.intpos n1=t.intpos n2 & t1.
        intpos n2=t.intpos n1;
        hence thesis by A163;
      end;
    end;
    t2.intpos n1=t.intpos n1 & t2.intpos n2=t.intpos n2 or n1 >= n0+1 &
n2 >= n0+1 & n1 <= n0+n & n2 <= n0+n & t2.intpos n1=t.intpos n2 & t2.intpos n2=
    t.intpos n1
    proof
      per cases by A171;
      suppose
        t2.intpos n1=t.intpos n1 & t2.intpos n2=t.intpos n2;
        hence thesis;
      end;
      suppose
A172:   t.a3 <= n1 & n2 <= t.a4 & t2.intpos n1=t.intpos n2 & t2.
        intpos n2=t.intpos n1;
        then
A173:   n2 <= n0+n by A137,XXREAL_0:2;
        n1 >= n0+1 by A136,A172,XXREAL_0:2;
        hence thesis by A148,A172,A173,XXREAL_0:2;
      end;
    end;
    hence g,g1 are_fiberwise_equipotent by A138,A139,A159,A160,A166,Lm23;
A174: t2.a4=n2-1 by A142,A163;
    hereby
      let i be Nat;
      assume that
A175: t.a3 <= i and
A176: i <= t2.a4;
      i < n2 by A174,A176,XREAL_1:146,XXREAL_0:2;
      then i <= n1 by A147,A140,A141,A142,A149,Lm21;
      then t1.intpos md >= t1.intpos i by A145,A175;
      then t2.intpos md >= t1.intpos i by A163;
      hence t2.intpos md >= t2.intpos i by A163;
    end;
    hereby
      let i be Nat;
      assume that
A177: t2.a4 < i and
A178: i <= t.a4;
      t2.a4+1=n2 by A142,A163;
      then n2 <= i by A177,INT_1:7;
      then t1.intpos md <= t1.intpos i by A146,A178;
      then t2.intpos md <= t1.intpos i by A163;
      hence t2.intpos md <= t2.intpos i by A163;
    end;
    thus thesis by A166,A148,A171,Lm24;
  end;
  for k be Nat holds P[k] from NAT_1:sch 2(A128,A16);
  hence thesis by A1,A3,A4,A5,A7,A8,A9,A10,A11,A13,A14,A127;
end;

Lm26: for s be 0-started State of SCMPDS,
   md,m3,n0 be Nat st s.GBP=0 & s.a4=m3
+s.a5 & m3=s.a3-1 & s.a2=md & md >= n0+1 & md <= m3 & n0 >= 7 holds WH3
is_closed_on s,P & WH3 is_halting_on s,P
proof
  set a=GBP;
  let s be 0-started State of SCMPDS,md,m3,n0 be Nat;
  assume that
A1: s.a=0 and
A2: s.a4=m3+s.a5 and
A3: m3=s.a3-1 and
A4: s.a2=md and
A5: md >= n0+1 and
A6: md <= m3 and
A7: n0 >= 7;
  n0+1 >= 7+1 by A7,XREAL_1:6;
  then
A8: md >= 8 by A5,XXREAL_0:2;
A9: DataLoc(s.a,5)=intpos(0+5) by A1,SCMP_GCD:1;
  now
    let v be 0-started State of SCMPDS;
    let V;
    assume that
A10: v.a4=v.a3-1+v.a5 and
A11: md <= v.a3-1 and
A12: v.a2=s.a2 and
A13: v.a=s.a and
A14: v.DataLoc(s.a,5) > 0;
    set Iv=IExec(WB3,V,v);
    reconsider mm=v.a3-1 as Element of NAT by A11,INT_1:3;
A15: v.a4=mm+v.a5 by A10;
    hence Iv.a=v.a by A1,A4,A8,A9,A11,A12,A13,A14,Lm19;
    thus WB3 is_closed_on v,V & WB3 is_halting_on v,V
     by A1,A4,A8,A9,A11,A12,A13,A14,A15,Lm19;

    thus Iv.DataLoc(s.a,5) < v.DataLoc(s.a,5) by A1,A4,A8,A9,A11,A12,A13,A14
,A15,Lm19;

    thus Iv.a4=Iv.a3-1+Iv.a5 by A1,A4,A8,A9,A11,A12,A13,A14,A15,Lm19;
    Iv.a3 >= v.a3 by A1,A4,A8,A9,A11,A12,A13,A14,A15,Lm19;
    then Iv.a3-1 >= v.a3-1 by XREAL_1:9;
    hence md <= Iv.a3-1 by A11,XXREAL_0:2;
    thus Iv.a2=v.a2 by A1,A4,A8,A9,A11,A12,A13,A14,A15,Lm19;
  end;
  hence thesis by A2,A3,A6,Th7;
end;

Lm27: for s being 0-started State of SCMPDS
 st s.GBP=0 holds IExec(K4,P,Initialize s).GBP=0 &
 IExec(K4,P,Initialize s).a1=s.a1
  & IExec(K4,P,Initialize s).a2=s.a2 & IExec(K4,P,Initialize s).a3=s.a2+1 &
  IExec(K4,P,Initialize s).a4=s.
a4 & IExec(K4,P,Initialize s).a5=s.a4-s.a2
 & for i be Nat st i >= 8
 holds IExec(K4,P,Initialize s).intpos i=s.intpos i

proof
  set a=GBP;
  let s be 0-started State of SCMPDS;

  set t0=Initialize s, t1=IExec(k1 ';' k2 ';' k3 ';' k4,P,Initialize s),
  t2=IExec(k1 ';'k2 ';' k3,P,Initialize s),
  t3=IExec(k1 ';' k2,P,Initialize s), t4=Exec(k1, t0);

  assume s.a=0;
  then
A1: t0.a=0 by SCMPDS_5:15;
  then
A2: DataLoc(t0.a,5)=intpos (0+5) by SCMP_GCD:1;
  then
A3: t4.a5=t0.DataLoc(t0.a,4) by SCMPDS_2:47
    .=t0.intpos (0+4) by A1,SCMP_GCD:1
    .=s.a4 by SCMPDS_5:15;
  t0.a4=s.a4 by SCMPDS_5:15;
  then
A4: t4.a4 =s.a4 by A2,AMI_3:10,SCMPDS_2:47;
  t0.a1=s.a1 by SCMPDS_5:15;
  then
A5: t4.a1 =s.a1 by A2,AMI_3:10,SCMPDS_2:47;
A6: t4.a =0 by A1,A2,AMI_3:10,SCMPDS_2:47;
  then
A7: DataLoc(t4.a,5)=intpos (0+5) by SCMP_GCD:1;
A8: t3.a=Exec(k2, t4).a by SCMPDS_5:42
    .=0 by A6,A7,AMI_3:10,SCMPDS_2:50;
  then
A9: DataLoc(t3.a,3)=intpos (0+3) by SCMP_GCD:1;
A10: t3.a4=Exec(k2, t4).a4 by SCMPDS_5:42
    .=s.a4 by A4,A7,AMI_3:10,SCMPDS_2:50;
A11: t2.a4 =Exec(k3, t3).a4 by SCMPDS_5:41
    .=s.a4 by A10,A9,AMI_3:10,SCMPDS_2:47;
A12: t0.a2=s.a2 by SCMPDS_5:15;
  then
A13: t4.a2 =s.a2 by A2,AMI_3:10,SCMPDS_2:47;
A14: t3.a5=Exec(k2, t4).a5 by SCMPDS_5:42
    .=t4.a5-t4.DataLoc(t4.a,2) by A7,SCMPDS_2:50
    .=t4.a5-t4.intpos(0+2) by A6,SCMP_GCD:1
    .=s.a4-s.a2 by A12,A2,A3,AMI_3:10,SCMPDS_2:47;
A15: t2.a5 =Exec(k3, t3).a5 by SCMPDS_5:41
    .=s.a4-s.a2 by A14,A9,AMI_3:10,SCMPDS_2:47;
A16: t3.a2=Exec(k2, t4).a2 by SCMPDS_5:42
    .=s.a2 by A13,A7,AMI_3:10,SCMPDS_2:50;
A17: t3.a1=Exec(k2, t4).a1 by SCMPDS_5:42
    .=s.a1 by A5,A7,AMI_3:10,SCMPDS_2:50;
A18: t2.a1 =Exec(k3, t3).a1 by SCMPDS_5:41
    .=s.a1 by A17,A9,AMI_3:10,SCMPDS_2:47;
A19: t2.a =Exec(k3, t3).a by SCMPDS_5:41
    .=0 by A8,A9,AMI_3:10,SCMPDS_2:47;
  then
A20: DataLoc(t2.a,3)=intpos (0+3) by SCMP_GCD:1;
A21: t2.a3 =Exec(k3, t3).a3 by SCMPDS_5:41
    .=t3.DataLoc(t3.a,2) by A9,SCMPDS_2:47
    .=s.a2 by A8,A16,SCMP_GCD:1;
A22: t2.a2 =Exec(k3, t3).a2 by SCMPDS_5:41
    .=s.a2 by A16,A9,AMI_3:10,SCMPDS_2:47;
  thus t1.a =Exec(k4, t2).a by SCMPDS_5:41
    .=0 by A19,A20,AMI_3:10,SCMPDS_2:48;
  thus t1.a1 =Exec(k4, t2).a1 by SCMPDS_5:41
    .=s.a1 by A18,A20,AMI_3:10,SCMPDS_2:48;
  thus t1.a2 =Exec(k4, t2).a2 by SCMPDS_5:41
    .=s.a2 by A22,A20,AMI_3:10,SCMPDS_2:48;
  thus t1.a3 =Exec(k4, t2).a3 by SCMPDS_5:41
    .=s.a2+1 by A21,A20,SCMPDS_2:48;
  thus t1.a4 =Exec(k4, t2).a4 by SCMPDS_5:41
    .=s.a4 by A11,A20,AMI_3:10,SCMPDS_2:48;
  thus t1.a5 =Exec(k4, t2).a5 by SCMPDS_5:41
    .=s.a4-s.a2 by A15,A20,AMI_3:10,SCMPDS_2:48;
A23: now
    let i be Nat;
    assume i>=8;
    then i > 5 by XXREAL_0:2;
    hence t4.intpos i=t0.intpos i by A2,AMI_3:10,SCMPDS_2:47
      .=s.intpos i by SCMPDS_5:15;
  end;
A24: now
    let i be Nat;
    assume
A25: i>=8;
    then
A26: i > 5 by XXREAL_0:2;
    thus t3.intpos i=Exec(k2, t4).intpos i by SCMPDS_5:42
      .=t4.intpos i by A7,A26,AMI_3:10,SCMPDS_2:50
      .=s.intpos i by A23,A25;
  end;
A27: now
    let i be Nat;
    assume
A28: i>=8;
    then
A29: i > 3 by XXREAL_0:2;
    thus t2.intpos i=Exec(k3, t3).intpos i by SCMPDS_5:41
      .=t3.intpos i by A9,A29,AMI_3:10,SCMPDS_2:47
      .=s.intpos i by A24,A28;
  end;
  hereby
    let i be Nat;
    assume
A30: i>=8;
    then
A31: i > 3 by XXREAL_0:2;
    thus t1.intpos i=Exec(k4, t2).intpos i by SCMPDS_5:41
      .=t2.intpos i by A20,A31,AMI_3:10,SCMPDS_2:48
      .=s.intpos i by A27,A30;
  end;
end;

theorem Th10:
  for s be 0-started State of SCMPDS,
  md,p0 be Nat st s.GBP=0 & s.
  intpos 2=md & md >= p0+1 & p0 >= 7 holds Partition is_closed_on s,P
   & Partition
  is_halting_on s,P
proof
  set KW=K4 ';' WH3;
  let s be 0-started State of SCMPDS,md,n0 be Nat;
  set s2=IExec(K4,P,Initialize s), a=GBP, P2 = P;
  assume that
A1: s.a=0 and
A2: s.a2=md and
A3: md >= n0+1 and
A4: n0 >= 7;
A5: s2.a2=s.a2 by A1,Lm27;
  set m3=md;
  s2.a5=s.a4-s.a2 by A1,Lm27;
  then
A6: s2.a4=m3+s2.a5 by A1,A2,Lm27;
  s2.a3=s.a2+1 by A1,Lm27;
  then
A7: s.a2=s2.a3-1;
A8: s2.a=0 by A1,Lm27;

A9: (Initialize s2).GBP = s2.GBP by SCMPDS_5:15;
A10: (Initialize s2).a2 = s2.a2 by SCMPDS_5:15;
A11: (Initialize s2).a3 = s2.a3 by SCMPDS_5:15;
A12: (Initialize s2).a4 = s2.a4 by SCMPDS_5:15;
A13: (Initialize s2).a5 = s2.a5 by SCMPDS_5:15;
A14: WH3 is_halting_on Initialize s2,P2 by A2,A3,A4,A5,A7,A6,Lm26,A8,A9,A10,A11
,A12
,A13;
A15: WH3 is_halting_on s2,P2
     proof
       P+*stop WH3 halts_on Initialize Initialize s2 by A14,SCMPDS_6:def 3;
      hence thesis by SCMPDS_6:def 3;
     end;
A16: WH3 is_closed_on Initialize s2,P2 by A2,A3,A4,A8,A5,A7,A6,Lm26,A9,A10,A11,
A12
,A13;
A17: WH3 is_closed_on s2,P2
      proof
  for k being Nat holds
   IC Comput(P+*stop WH3,Initialize Initialize s2,k) in dom stop WH3
                   by A16,SCMPDS_6:def 2;
       hence thesis by SCMPDS_6:def 2;
      end;
  then
A18: KW is_closed_on s,P by A15,SCPISORT:9;
A19: KW is_halting_on s,P by A17,A15,SCPISORT:9;
  then
A20: KW ';' j8 is_closed_on s,P by A18,SCPISORT:10;
A21: KW ';' j8 is_halting_on s,P by A18,A19,SCPISORT:10;
  then
A22: KW ';' j8 ';' j9 is_halting_on s,P by A20,SCPISORT:10;
  KW ';' j8 ';' j9 is_closed_on s,P by A20,A21,SCPISORT:10;
  hence thesis by A22,SCPISORT:10;
end;

theorem Th11:
  for s be 0-started State of SCMPDS,
  md,p0,n be Nat,f,f1 be
FinSequence of INT st s.GBP=0 & s.intpos 4-s.intpos 2 > 0 & s.intpos 2=md & md
  >= p0+1 & s.intpos 4 <= p0+n & p0 >= 7 & f is_FinSequence_on s,p0 & len f=n &
f1 is_FinSequence_on IExec(Partition,P,s),p0 & len f1=n holds
IExec(Partition,P,s).GBP=0 &
IExec(Partition,P,s).intpos 1=s.intpos 1 &
 f,f1 are_fiberwise_equipotent
& ex m4 be Nat
   st m4=IExec(Partition,P,s).intpos 4 &
      md <= m4 & m4 <= s.intpos 4 &
  (for i be Nat st md<=i & i < m4
    holds IExec(Partition,P,s).intpos m4 >=
    IExec(Partition,P,s).intpos i) &
  (for i be Nat st m4 < i & i <= s.intpos 4
    holds IExec(Partition,P,s).intpos m4 <=
    IExec(Partition,P,s).intpos i) &
  for i be Nat st i >= p0+1 & (i < s.intpos 2 or i > s.
    intpos 4) holds IExec(Partition,P,s).intpos i = s.intpos i
proof
  set KW=K4 ';' WH3;
  let s be 0-started State of SCMPDS,
      md,n0,n be Nat, f,f1 be FinSequence of INT;
A1: Initialize s = s by MEMSTR_0:44;
  set s1=IExec(Partition,P,s), s2=IExec(K4,P,s), P2 = P,
  s3=IExec(K4 ';' WH3,P,s), a=GBP;
A2: s2.a=(Initialize s2).a by SCMPDS_5:15;
A3: s2.a1=(Initialize s2).a1 by SCMPDS_5:15;
A4: s2.a2=(Initialize s2).a2 by SCMPDS_5:15;
A5: s2.a3=(Initialize s2).a3 by SCMPDS_5:15;
A6: s2.a4=(Initialize s2).a4 by SCMPDS_5:15;
A7: s2.a5=(Initialize s2).a5 by SCMPDS_5:15;
  assume that
A8: s.a=0 and
A9: s.a4-s.a2 > 0 and
A10: s.a2=md and
A11: md >= n0+1 and
A12: s.a4 <= n0+n and
A13: n0 >= 7;
A14: s2.GBP=0 by A8,Lm27,A1;
A15: s2.a1=s.a1 by A8,Lm27,A1;
A16: n0+1 >= 7+1 by A13,XREAL_1:6;
  then
A17: md >= 8 by A11,XXREAL_0:2;
  then
A18: md > 1 by XXREAL_0:2;
A19: md > 4 by A17,XXREAL_0:2;
A20: md-n0 >= 1 by A11,XREAL_1:19;
  then reconsider n1=md-n0 as Element of NAT by INT_1:3;
A21: md=n0+n1;
A22: s2.a4=s.a4 by A8,Lm27,A1;
  set m3=md;
  s2.a5=s.a4-s.a2 by A8,Lm27,A1;
  then
A23: s2.a4=m3+s2.a5 by A8,A10,Lm27,A1;
  set s4=IExec(WH3,P2,Initialize s2);
  consider f3 be FinSequence of INT such that
A24: len f3=n and
A25: for i be Nat st 1<=i & i <= len f3 holds f3.i=s4.intpos(
  n0+i) by SCPISORT:1;
A26: f3 is_FinSequence_on s4,n0 by A25;
  md < s.a4 by A9,A10,XREAL_1:47;
  then md < n0+n by A12,XXREAL_0:2;
  then
A27: n1 <= len f3 by A24,XREAL_1:20;
A28: s2.a2=s.a2 by A8,Lm27,A1;
A29: s2.a3=s.a2+1 by A8,Lm27,A1;
  then
A30: s.a2=s2.a3-1;


A31: (Initialize s2).GBP = s2.GBP by SCMPDS_5:15;
A32: (Initialize s2).a2 = s2.a2 by SCMPDS_5:15;
A33: (Initialize s2).a3 = s2.a3 by SCMPDS_5:15;
A34: (Initialize s2).a4 = s2.a4 by SCMPDS_5:15;
A35: (Initialize s2).a5 = s2.a5 by SCMPDS_5:15;
A36: WH3 is_halting_on Initialize s2,P2 by A10,A11,A13,A14,A28,A23,Lm26,A30,A31
,A32,A33,A34,A35;
A37: WH3 is_halting_on s2,P2
   proof
      P+*stop WH3 halts_on Initialize Initialize s2 by A36,SCMPDS_6:def 3;
    hence thesis by SCMPDS_6:def 3;
   end;
  s.a2 < s2.a3 by A29,XREAL_1:29;
  then
A38: n0+1 <= s2.a3 by A10,A11,XXREAL_0:2;
A39: WH3 is_closed_on Initialize s2,P2 by A10,A11,A13,A14,A28,A30,A23,Lm26,A31,
A32
,A33,A34,A35;
A40: WH3 is_closed_on s2,P2
    proof
     for k being Nat holds
     IC Comput(P+*stop WH3,Initialize Initialize s2,k) in dom stop WH3
                by A39,SCMPDS_6:def 2;
     hence thesis by SCMPDS_6:def 2;
    end;
  then
A41: KW is_halting_on s,P by A37,A1,SCPISORT:9;
  consider f2 be FinSequence of INT such that
A42: len f2=n and
A43: for i be Nat st 1<=i & i <= len f2 holds f2.i=s2.intpos(
  n0+i) by SCPISORT:1;
A44: f2 is_FinSequence_on Initialize s2,n0
   proof let i be Nat;
    assume 1 <= i & i <= len f2;
    then f2.i=s2.intpos(n0+i) by A43;
    hence thesis by SCMPDS_5:15;
   end;
  then
A45: f2,f3 are_fiberwise_equipotent by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23
,A38,A42,A24,A26,Lm25,A2,A4,A5,A6,A7;

  s4.a4 > 0 by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24,A26,Lm25
,A2,A4,A5,A6,A7;
  then reconsider m4=s4.a4 as Element of NAT by INT_1:3;
A46: s4.a4 >= md by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24,A26
,Lm25,A2,A4,A5,A6,A7;
  then
A47: m4-n0 >= md-n0 by XREAL_1:9;
  then reconsider n2=m4-n0 as Element of NAT by A20,INT_1:3;
A48: m4-n0 >= 1 by A20,A47,XXREAL_0:2;
  s4.a2=md by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24,A26,Lm25,
A2
,A4,A5,A6,A7;
  then
A49: s3.a2=md by A40,A37,SCPISORT:7;
A50: s3.a4 =m4 by A40,A37,SCPISORT:7;
  s4.a=0 by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24,A26,Lm25,A2
,A4,A5,A6,A7;
  then
A51: s3.a=0 by A40,A37,SCPISORT:7;
  then
A52: DataLoc(s3.a,6)=intpos(0+6) by SCMP_GCD:1;
  set t2=IExec(KW ';' j8 ';' j9,P,s),
      t3=IExec(KW ';' j8,P,s);
  assume that
A53: f is_FinSequence_on s,n0 and
A54: len f=n;
  assume that
A55: f1 is_FinSequence_on s1,n0 and
A56: len f1=n;
A57: dom f2 = Seg n by A42,FINSEQ_1:def 3;
A58: now
    let i be Nat;
    reconsider a = i as Nat;
    assume
A59: i in dom f2;
    then
A60: 1 <= i by A57,FINSEQ_1:1;
    then i+n0 >= n0+1 by XREAL_1:6;
    then
A61: n0+i >= 8 by A16,XXREAL_0:2;
A62: i <= n by A57,A59,FINSEQ_1:1;
    hence f2.i=s2.intpos (n0+a) by A42,A43,A60
      .=s.intpos (n0+a) by A8,A61,Lm27,A1
      .=f.i by A53,A54,A60,A62;
  end;
A63: KW is_closed_on s,P by A40,A37,A1,SCPISORT:9;
  then
A64: KW ';' j8 is_closed_on s,P by A41,SCPISORT:10;
A65: s4.a4 <= s2.a4 by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24
,A26,Lm25,A2,A4,A5,A6,A7;
  then m4 <= n0+n by A12,A22,XXREAL_0:2;
  then
A66: n2 <= len f3 by A24,XREAL_1:20;
A67: t3.a6=Exec(j8,s3).a6 by A63,A41,SCMPDS_7:31
    .=s3.DataLoc(s3.a4,0) by A52,SCMPDS_2:47
    .=s3.intpos(m4+0) by A50,SCMP_GCD:1
    .=s4.intpos m4 by A40,A37,SCPISORT:7;
A68: t3.a4=Exec(j8,s3).a4 by A63,A41,SCMPDS_7:31
    .=m4 by A50,A52,AMI_3:10,SCMPDS_2:47;
  then
A69: DataLoc(t3.a4,0)=intpos(m4+0) by SCMP_GCD:1;
A70: s4.a1=s2.a1 by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24,A26
,Lm25,A2,A3,A4,A5,A6,A7;
A71: t3.a1=Exec(j8,s3).a1 by A63,A41,SCMPDS_7:31
    .=s3.a1 by A52,AMI_3:10,SCMPDS_2:47
    .=s.a1 by A15,A70,A40,A37,SCPISORT:7;
A72: s4.a4 >= 8 by A46,A17,XXREAL_0:2;
  then
A73: m4 > 2 by XXREAL_0:2;
A74: t3.a=Exec(j8,s3).a by A63,A41,SCMPDS_7:31
    .=0 by A51,A52,AMI_3:10,SCMPDS_2:47;
A75: t3.a2=Exec(j8,s3).a2 by A63,A41,SCMPDS_7:31
    .=md by A49,A52,AMI_3:10,SCMPDS_2:47;
A76: KW ';' j8 is_halting_on s,P by A63,A41,SCPISORT:10;
  then
A77: KW ';' j8 ';' j9 is_halting_on s,P by A64,SCPISORT:10;
  t2.a2=Exec(j9,t3).a2 by A64,A76,SCMPDS_7:31
    .=md by A75,A69,A73,AMI_3:10,SCMPDS_2:47;
  then
A78: DataLoc(t2.a2,0)=intpos(md+0) by SCMP_GCD:1;
A79: m4 > 6 by A72,XXREAL_0:2;
A80: m4 > 1 by A72,XXREAL_0:2;
A81: t2.a6=Exec(j9,t3).a6 by A64,A76,SCMPDS_7:31
    .=s4.intpos m4 by A67,A69,A79,AMI_3:10,SCMPDS_2:47;
A82: t2.a=Exec(j9,t3).a by A64,A76,SCMPDS_7:31
    .=0 by A11,A46,A74,A69,AMI_3:10,SCMPDS_2:47;
A83: KW ';' j8 ';' j9 is_closed_on s,P by A64,A76,SCPISORT:10;
  then
A84: s1.intpos md=Exec(j0,t2).intpos md by A77,SCMPDS_7:31
    .=t2.DataLoc(t2.a,6) by A78,SCMPDS_2:47
    .=s4.intpos m4 by A82,A81,SCMP_GCD:1;
A85: now
    let i be Nat;
    assume i >= 8;
    then
A86: i > 6 by XXREAL_0:2;
    thus t3.intpos i =Exec(j8,s3).intpos i by A63,A41,SCMPDS_7:31
      .=s3.intpos i by A52,A86,AMI_3:10,SCMPDS_2:47
      .=s4.intpos i by A40,A37,SCPISORT:7;
  end;
A87: now
    let i be Nat;
    assume that
A88: i >= 8 and
A89: i <> m4;
    thus t2.intpos i =Exec(j9,t3).intpos i by A64,A76,SCMPDS_7:31
      .=t3.intpos i by A69,A89,AMI_3:10,SCMPDS_2:47
      .=s4.intpos i by A85,A88;
  end;
A90: now
    let i be Nat;
    assume that
A91: i >= 8 and
A92: i <> m4 and
A93: i<>md;
    thus s1.intpos i =Exec(j0,t2).intpos i by A83,A77,SCMPDS_7:31
      .=t2.intpos i by A78,A93,AMI_3:10,SCMPDS_2:47
      .=s4.intpos i by A87,A91,A92;
  end;
A94: now
    let k be Nat;
    assume that
A95: k<>n1 and
A96: k<>n2 and
A97: 1<=k and
A98: k <= len f3;
A99: k+n0<>md by A95;
A100: k+n0 >= n0+1 by A97,XREAL_1:6;
A101: k+n0<>m4 by A96;
    thus f3.k=s4.intpos(n0+k) by A25,A97,A98
      .=s1.intpos(n0+k) by A16,A90,A99,A101,A100,XXREAL_0:2
      .=f1.k by A55,A56,A24,A97,A98;
  end;
A102: m4=n0+n2;
  then
A103: f3.n2=s1.intpos md by A25,A84,A48,A66
    .=f1.n1 by A55,A56,A24,A20,A27,A21;
A104: t2.a1=Exec(j9,t3).a1 by A64,A76,SCMPDS_7:31
    .=s.a1 by A71,A69,A80,AMI_3:10,SCMPDS_2:47;
  thus s1.a=Exec(j0,t2).a by A83,A77,SCMPDS_7:31
    .=0 by A11,A82,A78,AMI_3:10,SCMPDS_2:47;
  thus s1.a1=Exec(j0,t2).a1 by A83,A77,SCMPDS_7:31
    .=s.a1 by A104,A78,A18,AMI_3:10,SCMPDS_2:47;
A105: m4 > 4 by A72,XXREAL_0:2;
A106: t2.a4=Exec(j9,t3).a4 by A64,A76,SCMPDS_7:31
    .=m4 by A68,A69,A105,AMI_3:10,SCMPDS_2:47;
A107: t2.intpos m4=Exec(j9,t3).intpos m4 by A64,A76,SCMPDS_7:31
    .=t3.DataLoc(t3.a2,0) by A69,SCMPDS_2:47
    .=t3.intpos (md+0) by A75,SCMP_GCD:1
    .=s4.intpos md by A11,A16,A85,XXREAL_0:2;
A108: now
    per cases;
    suppose
      m4=md;
      hence s1.intpos m4=s4.intpos md by A84;
    end;
    suppose
A109:  m4<>md;
      thus s1.intpos m4=Exec(j0,t2).intpos m4 by A83,A77,SCMPDS_7:31
        .=s4.intpos md by A107,A78,A109,AMI_3:10,SCMPDS_2:47;
    end;
  end;
  then f3.n1=s1.intpos m4 by A25,A20,A27,A21
    .=f1.n2 by A55,A56,A24,A48,A66,A102;
  then f3,f1 are_fiberwise_equipotent by A56,A24,A20,A27,A48,A66,A103,A94,
SCPISORT:3;
  then f2,f1 are_fiberwise_equipotent by A45,CLASSES1:76;
  hence f,f1 are_fiberwise_equipotent by A54,A42,A58,FINSEQ_2:9;
  take m4;
  thus s1.a4=Exec(j0,t2).a4 by A83,A77,SCMPDS_7:31
    .=m4 by A106,A78,A19,AMI_3:10,SCMPDS_2:47;
A110: m3=s2.a3-1 by A10,A29;
  hence md <= m4 by A9,A10,A11,A12,A13,A14,A28,A22,A23,A38,A42,A44,A24,A26,Lm25
,A2,A4,A5,A6,A7;
  thus m4 <= s.a4 by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24,A26
,Lm25,A2,A4,A5,A6,A7;
A111: s2.a3=md+1 by A8,A10,Lm27,A1;
  hereby
    let i be Nat;
    assume that
A112: md<=i and
A113: i < m4;
    per cases;
    suppose
A114: i=md;
      then s2.a3 <= m4 by A111,A113,INT_1:7;
      hence
      s1.intpos m4 >= s1.intpos i by A114,A84,A9,A10,A11,A12,A13,A14,A28,A22
,A110,A23,A38,A42,A44,A24,A26,A108,Lm25,A2,A4,A5,A6,A7;
    end;
    suppose
A115: i<>md;
      then md < i by A112,XXREAL_0:1;
      then s2.a3 <= i by A10,A29,INT_1:7;
      then s4.intpos md >= s4.intpos i
     by A9,A10,A11,A12,A13,A14,A28,A22,A110,A23,A38,A42,A44,A24,A26,A113,Lm25,
A2
,A4,A5,A6,A7;
      hence s1.intpos m4 >= s1.intpos i by A17,A108,A90,A112,A115,XXREAL_0:2;
    end;
  end;
  hereby
    let i be Nat;
    assume that
A116: m4 < i and
A117: i <= s.a4;
A118: md < i by A46,A116,XXREAL_0:2;
    s4.intpos md <= s4.intpos i by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38
,A42,A44,A24,A26,A116,A117,Lm25,A2,A4,A5,A6,A7;
    hence s1.intpos m4 <= s1.intpos i by A17,A108,A90,A118,XXREAL_0:2;
  end;
  hereby
    let i be Nat;
    assume that
A119: i >= n0+1 and
A120: i < s.a2 or i > s.a4;
A121: i >= 8 by A16,A119,XXREAL_0:2;
A122: now
      per cases by A120;
      case
A123:   i < s.a2;
        s.a2 < s2.a3 by A29,XREAL_1:29;
        hence i < s2.a3 by A123,XXREAL_0:2;
      end;
      case
        i > s.a4;
        hence i > s2.a4 by A8,Lm27,A1;
      end;
    end;
A124: s2.intpos i = (Initialize s2).intpos i by SCMPDS_5:15;
A125:  for i be Nat st i >= n0+1 &
      (i < (Initialize s2).a3 or i > (Initialize s2).a4)
       holds IExec(WH3,P2,Initialize s2).intpos i = (Initialize s2).intpos i
              by A9,A10,A11,A12,A13,A14,A28,A22,A110,A23,A38,A42,A44,A24,A26
,Lm25,A2,A4,A5,A6,A7;
  i<>md & i<>m4
    proof
      per cases by A120;
      suppose
        i< s.a2;
        hence thesis by A9,A10,A11,A12,A13,A14,A28,A22,A30,A23,A38,A42,A44,A24
,A26,Lm25,A2,A4,A5,A6,A7;
      end;
      suppose
        i > s.a4;
        hence thesis by A22,A46,A65,XXREAL_0:2;
      end;
    end;
    hence s1.intpos i = s4.intpos i by A16,A90,A119,XXREAL_0:2

      .=s2.intpos i by A119,A122,A125,A5,A6,A124
      .=s.intpos i by A8,A121,Lm27,A1;
  end;
end;

theorem
  Partition is halt-free shiftable;

Lm28: for s being 0-started State of SCMPDS,
p0,n being Nat holds card QuickSort(n,p0)=57 &
(p0 >= 7 implies QuickSort(n,p0) is_halting_on s,P
 & ex f,g
be FinSequence of INT st len f=n & f is_FinSequence_on s,p0 & len g = n & g
is_FinSequence_on IExec(QuickSort(n,p0),P,s),p0
 & f,g are_fiberwise_equipotent &
g is_non_decreasing_on 1,n)
proof
  set b1=DataLoc(0,1);
  reconsider Pt=Partition as halt-free shiftable Program of SCMPDS;
  let s be 0-started State of SCMPDS,p0,n be Nat;
A1: Initialize s = s by MEMSTR_0:44;
  set pn=p0+n;

  set l1= (GBP,2):=(SBP,pn+1), l2= SubFrom(GBP,2,SBP,pn), l3= (GBP,2):=(SBP,pn

), l4= (GBP,4):=(SBP,pn+1), l5= (SBP,pn+3):=(SBP,pn+1), l6= (SBP,pn+1):=(GBP,4)
  , l7= (SBP,pn+2):=(GBP,4), l8= AddTo(SBP,pn+1,-1), l9= AddTo(SBP,pn+2,1), l0=
  AddTo(GBP,1,2), lb= Load AddTo(GBP,1,-2), L5= l5 ';' l6 ';' l7 ';' l8 ';' l9
';' l0, TR= l3 ';' l4 ';' Pt ';' L5, IF4= if>0(GBP,2,TR,lb),
  WB4= l1 ';' l2 ';' IF4, WH4= while>0(GBP,1,WB4);
  set m1= GBP:=0, m2= SBP:=1, m3= (SBP,pn):=(p0+1), m4= (SBP,pn+1):=pn, M4= m1
  ';' m2 ';' m3 ';' m4;
  set s1=IExec(M4,P,s), a=GBP, P1 = P;
A2: 7+n >= 7 by NAT_1:11;
A3: card L5= card (l5 ';' l6 ';' l7 ';' l8 ';' l9 )+1 by SCMP_GCD:4
    .= card (l5 ';' l6 ';' l7 ';' l8)+1+1 by SCMP_GCD:4
    .= 4+1+1 by Th4;
A4: card WB4=card (l1 ';' l2) + card IF4 by AFINSQ_1:17
    .=2+card IF4 by SCMP_GCD:5
    .=2+(card TR +card lb +2) by SCMPDS_6:65
    .=2+(card TR +1 +2) by COMPOS_1:54
    .=2+(card (l3 ';' l4 ';' Pt)+ card L5+1+2) by AFINSQ_1:17
    .=2+(card (l3 ';' l4) + card Pt + card L5+1+2) by AFINSQ_1:17
    .=2+(2+ 38 + card L5+1+2) by Th9,SCMP_GCD:5
    .=51 by A3;
  thus card QuickSort(n,p0)=card M4 + card WH4 by AFINSQ_1:17
    .=4 + card WH4 by Th4
    .=4 + (51+2) by A4,SCMPDS_8:17
    .=57;
  assume
A5: p0 >= 7;
  then pn >= 7+n by XREAL_1:6;
  then
A6: pn >= 7 by A2,XXREAL_0:2;

A7: for t be State of SCMPDS,Q
   for m1 be Nat st t.a=0 & t.SBP=m1 holds

IExec(l3 ';' l4,Q,Initialize t).a2=t.intpos(m1+pn)
 & IExec(l3 ';' l4,Q,Initialize t).a4=t.intpos(m1+pn+
  1) & for i be Nat st i <> 2 & i <> 4
   holds IExec(l3 ';' l4,Q,Initialize t).intpos i=t.intpos i

  proof
    let t be State of SCMPDS, Q;
    let m1 be Nat;
    set t0=Initialize t, t2=IExec(l3 ';' l4,Q,Initialize t),
    t3=Exec(l3, t0), mp=m1+pn,
    Q0 = Q;
    assume that
A8: t.a=0 and
A9: t.SBP=m1;
A10: t0.a =0 by A8,SCMPDS_5:15;
    then
A11: DataLoc(t0.a,2)=intpos (0+2) by SCMP_GCD:1;
    then t3.a=0 by A10,AMI_3:10,SCMPDS_2:47;
    then
A12: DataLoc(t3.a,4)=intpos (0+4) by SCMP_GCD:1;
A13: t0.SBP =m1 by A9,SCMPDS_5:15;
    then
A14: t3.SBP=m1 by A11,AMI_3:10,SCMPDS_2:47;
    mp >= 0+7 by A6,XREAL_1:7;
    then mp+1 >= 7+1 by XREAL_1:6;
    then mp+1 > 2 by XXREAL_0:2;
    then
A15: t3.intpos(mp+1)=t0.intpos(mp+1) by A11,AMI_3:10,SCMPDS_2:47
      .=t.intpos(mp+1) by SCMPDS_5:15;

A16: t3.a2=t0.DataLoc(t0.SBP,pn) by A11,SCMPDS_2:47
      .=t0.intpos mp by A13,SCMP_GCD:1
      .=t.intpos mp by SCMPDS_5:15;
    thus t2.a2=Exec(l4, t3).a2 by SCMPDS_5:42
      .=t.intpos mp by A16,A12,AMI_3:10,SCMPDS_2:47;
    thus t2.a4=Exec(l4, t3).a4 by SCMPDS_5:42
      .=t3.DataLoc(t3.SBP,pn+1) by A12,SCMPDS_2:47
      .=t.intpos(mp+1) by A14,A15,SCMP_GCD:1;
    hereby
      let i be Nat;
      assume that
A17:  i<>2 and
A18:  i <> 4;
      thus t2.intpos i =Exec(l4, t3).intpos i by SCMPDS_5:42
        .=t3.intpos i by A12,A18,AMI_3:10,SCMPDS_2:47
        .=t0.intpos i by A11,A17,AMI_3:10,SCMPDS_2:47
        .=t.intpos i by SCMPDS_5:15;
    end;
  end;

A19: for t being State of SCMPDS,Q
   for m,m1 be Nat st t.a=0 & t.SBP=m1 &

m1=m+1 holds IExec(L5,Q,Initialize t).a=0 & IExec(L5,Q,Initialize t).SBP=m1+2
 & IExec(L5,Q,Initialize t).intpos (m1+pn

)=t.intpos (m1+pn) & IExec(L5,Q,Initialize t).intpos (m1+pn+1)=t.a4-1
 & IExec(L5,Q,Initialize t).intpos (
  m1+pn+2)=t.a4+1 & IExec(L5,Q,Initialize t).intpos (m1+pn+3)
  =t.intpos (m1+pn+1)
   & for i be
  Nat st i >= 8 & i < m1+pn
     holds IExec(L5,Q,Initialize t).intpos i=t.intpos i

  proof
    let t be State of SCMPDS,Q;
    let m,m1 be Nat;
    assume that
A20: t.a=0 and
A21: t.SBP=m1 and
A22: m1=m+1;

    set t0=Initialize t, t1=IExec(L5,Q,Initialize t), Q0 = Q,
    t2=IExec(l5 ';' l6 ';' l7 ';' l8 ';' l9,Q,Initialize t),
t3=IExec(l5 ';' l6 ';' l7 ';' l8,Q,Initialize t),
t4=IExec(l5 ';' l6 ';' l7, Q,Initialize t),
    t5= IExec(l5 ';' l6,Q,Initialize t), t6=Exec(l5,t0), mp=m1+pn;

A23: mp+3 <> mp+1;
    m1 >= 1 by A22,NAT_1:11;
    then
A24: mp >= 1+7 by A6,XREAL_1:7;
    then
A25: mp+1 >= 8+1 by XREAL_1:6;
    then
A26: mp+1 > 4 by XXREAL_0:2;
A27: mp+1 > 1 by A25,XXREAL_0:2;
A28: mp+0 <> mp+2;
A29: mp > 1 by A24,XXREAL_0:2;
A30: mp+1 <> mp+2;
A31: t0.SBP =m1 by A21,SCMPDS_5:15;
    then
A32: DataLoc(t0.SBP,pn+3)=intpos (mp+3) by SCMP_GCD:1;
A33: now
      let i be Nat;
      assume i<>mp+3;
      hence t6.intpos i=t0.intpos i by A32,AMI_3:10,SCMPDS_2:47
        .=t.intpos i by SCMPDS_5:15;
    end;
    mp+0 <> mp+3;
    then
A34: t6.intpos mp=t.intpos mp by A33;
A35: mp+1 <> mp+2;
A36: mp+3 <> mp+2;
A37: mp+3 >= 8+3 by A24,XREAL_1:6;
    then
A38: mp+3 > 1 by XXREAL_0:2;
    mp+3 > 1 by A37,XXREAL_0:2;
    then
A39: t6.SBP=m1 by A21,A33;
    then
A40: DataLoc(t6.SBP,pn+1)=intpos (mp+1) by SCMP_GCD:1;
A41: now
      let i be Nat;
      assume
A42:  i<>mp+1;
      thus t5.intpos i=Exec(l6, t6).intpos i by SCMPDS_5:42
        .=t6.intpos i by A40,A42,AMI_3:10,SCMPDS_2:47;
    end;
    mp+1 > 1 by A25,XXREAL_0:2;
    then
A43: t5.SBP=m1 by A39,A41;
    then
A44: DataLoc(t5.SBP,pn+2)=intpos (mp+2) by SCMP_GCD:1;
A45: now
      let i be Nat;
      assume
A46:  i<>mp+2;
      thus t4.intpos i=Exec(l7, t5).intpos i by SCMPDS_5:41
        .=t5.intpos i by A44,A46,AMI_3:10,SCMPDS_2:47;
    end;
    t6.intpos (mp+3)=t0.DataLoc(t0.SBP,pn+1) by A32,SCMPDS_2:47
      .=t0.intpos(m1+(pn+1)) by A31,SCMP_GCD:1
      .=t.intpos (mp+1) by SCMPDS_5:15;
    then t5.intpos(mp+3)=t.intpos(mp+1) by A41,A23;
    then
A47: t4.intpos(mp+3)=t.intpos(mp+1) by A45,A36;
A48: mp+3 > 4 by A37,XXREAL_0:2;
    then
A49: t6.a4=t.a4 by A33;
A50: mp+2 >= 8+2 by A24,XREAL_1:6;
    then
A51: mp+2 > 1 by XXREAL_0:2;
    mp+2 > 1 by A50,XXREAL_0:2;
    then
A52: t4.SBP=m1 by A43,A45;
    then
A53: DataLoc(t4.SBP,pn+1)=intpos (mp+1) by SCMP_GCD:1;
A54: now
      let i be Nat;
      assume
A55:  i<>mp+1;
      thus t3.intpos i=Exec(l8, t4).intpos i by SCMPDS_5:41
        .=t4.intpos i by A53,A55,AMI_3:10,SCMPDS_2:48;
    end;
    m1+pn+1 > 1 by A25,XXREAL_0:2;
    then
A56: t3.SBP=m1 by A52,A54;
    then
A57: DataLoc(t3.SBP,pn+2)=intpos (mp+2) by SCMP_GCD:1;
A58: now
      let i be Nat;
      assume
A59:  i<>mp+2;
      thus t2.intpos i=Exec(l9, t3).intpos i by SCMPDS_5:41
        .=t3.intpos i by A57,A59,AMI_3:10,SCMPDS_2:48;
    end;
A60: t6.a=0 by A20,A33;
    then
A61: t5.a=0 by A41;
    then t4.a=0 by A45;
    then t3.a=0 by A54;
    then
A62: t2.a=0 by A58;
    then
A63: DataLoc(t2.a,1)=intpos (0+1) by SCMP_GCD:1;
    mp+2 > 1 by A50,XXREAL_0:2;
    then
A64: t2.SBP=m1 by A56,A58;
A65: now
      let i be Nat;
      assume i<>1;
      then
A66:  intpos i <> DataLoc(t2.a,1) by A62,AMI_3:10,SCMP_GCD:1;
      thus t1.intpos i=Exec(l0, t2).intpos i by SCMPDS_5:41
        .=t2.intpos i by A66,SCMPDS_2:48;
    end;
    hence t1.a=0 by A62;
A67: mp+0 <> mp+2;
    mp+0 <> mp+1;
    then t5.intpos mp=t.intpos mp by A34,A41;
    then
A68: t4.intpos mp=t.intpos mp by A45,A67;
    thus t1.SBP=Exec(l0, t2).SBP by SCMPDS_5:41
      .=m1+2 by A64,A63,SCMPDS_2:48;
    mp+0 <> mp+1;
    then t3.intpos mp=t.intpos mp by A68,A54;
    then t2.intpos mp=t.intpos mp by A58,A28;
    hence t1.intpos mp=t.intpos mp by A65,A29;
A69: mp+1 <> mp+2;
    t4.intpos(mp+2)=Exec(l7, t5).intpos(mp+2) by SCMPDS_5:41
      .=t5.DataLoc(t5.GBP,4) by A44,SCMPDS_2:47
      .=t5.intpos(0+4) by A61,SCMP_GCD:1
      .=t.a4 by A49,A41,A26;
    then
A70: t3.intpos(mp+2)=t.a4 by A54,A30;
    t5.intpos (mp+1)=Exec(l6, t6).intpos(mp+1) by SCMPDS_5:42
      .=t6.DataLoc(t6.GBP,4) by A40,SCMPDS_2:47
      .=t6.intpos(0+4) by A60,SCMP_GCD:1
      .=t.a4 by A33,A48;
    then
A71: t4.intpos (mp+1)=t.a4 by A45,A69;
    t3.intpos(mp+1)=Exec(l8, t4).intpos(mp+1) by SCMPDS_5:41
      .=t.a4+-1 by A71,A53,SCMPDS_2:48
      .=t.a4-1;
    then t2.intpos(mp+1)=t.a4-1 by A58,A35;
    hence t1.intpos(mp+1)=t.a4-1 by A65,A27;
    t2.intpos(mp+2)=Exec(l9, t3).intpos(mp+2) by SCMPDS_5:41
      .=t.a4+1 by A70,A57,SCMPDS_2:48;
    hence t1.intpos(mp+2)=t.a4+1 by A65,A51;
A72: mp+3 <> mp+2;
    mp+3 <> mp+1;
    then t3.intpos(mp+3)=t.intpos(mp+1) by A47,A54;
    then t2.intpos(mp+3)=t.intpos(mp+1) by A58,A72;
    hence t1.intpos(mp+3)=t.intpos(mp+1) by A65,A38;
    hereby
A73:  mp <= mp+3 by NAT_1:11;
A74:  mp <= mp+2 by NAT_1:11;
A75:  mp <= mp+1 by NAT_1:11;
      let i be Nat;
      assume that
A76:  i >= 8 and
A77:  i < mp;
      i > 1 by A76,XXREAL_0:2;
      hence t1.intpos i=t2.intpos i by A65
        .=t3.intpos i by A58,A77,A74
        .=t4.intpos i by A54,A77,A75
        .=t5.intpos i by A45,A77,A74
        .=t6.intpos i by A41,A77,A75
        .=t.intpos i by A33,A77,A73;
    end;
  end;

A78: for t be 0-started State of SCMPDS,Q
    for m,m1,md be Nat,n4 be Integer,
       f1,f2 be FinSequence of INT
        st t.a=0 & t.SBP=m1 & m1=m+1 & t.intpos(m1+pn)=md &
           md >= p0+1 & n4=t.intpos(m1+pn+1) & n4-md > 0 &
           n4 <= pn & f1 is_FinSequence_on t,p0 & len f1=n &
           f2 is_FinSequence_on IExec(TR,Q,t),p0 & len f2=n
 holds IExec(TR,Q,t).a=0 & IExec(TR,Q,t).a1=m1+2 &
    md= IExec(TR,Q,t).intpos(m1+pn)
   & n4=IExec(TR,Q,t).intpos (m1+pn+3)
   & (for j be Nat st 1<=j & j<m1 holds IExec(TR,Q,t).
  intpos(pn+j)=t.intpos(pn+j)) & f1,f2 are_fiberwise_equipotent &
  ex m4 be Nat st md <= m4 & m4 <= n4
 & m4-1=IExec(TR,Q,t).intpos (m1+pn+1) & m4+
  1=IExec(TR,Q,t).intpos (m1+pn+2) &
   (for i be Nat st md<=i & i < m4
     holds IExec(TR,Q,t).intpos m4 >=
       IExec(TR,Q,t).intpos i)
 & (for i be Nat st m4 < i & i <= n4
  holds IExec(TR,Q,t).intpos m4 <=
     IExec(TR,Q,t).intpos i)
 & for j be Nat st p0+1<=j & j<md or n4<j & j <= p0+n
   holds IExec(TR,Q,t).intpos j = t.intpos j
  proof
    let t be 0-started State of SCMPDS, Q;
    let m,m1,md be Nat,n4 be Integer, f1,f2 be
    FinSequence of INT;
A79: Initialize t = t by MEMSTR_0:44;
    set t1=IExec(TR,Q,t), lPt=l3 ';' l4 ';' Pt,
    t2=IExec(lPt,Q,t), Q2 = Q,
    t4=IExec(l3 ';' l4,Q,t), mp=m1+pn, Q4 = Q;
A80: t4.a = (Initialize t4).a by SCMPDS_5:15;
A81: t4.a2 = (Initialize t4).a2 by SCMPDS_5:15;
A82: t4.a4 = (Initialize t4).a4 by SCMPDS_5:15;
A83: t4.a1 = (Initialize t4).a1 by SCMPDS_5:15;
    set tp=IExec(Pt,Q4,Initialize t4);
    assume that
A84: t.a=0 and
A85: t.SBP=m1 and
A86: m1=m+1 and
A87: t.intpos mp=md and
A88: md >= p0+1 and
A89: n4=t.intpos (mp+1) and
A90: n4-md > 0 and
A91: n4 <= pn;
A92: t4.a=0 by A7,A84,A85,A79;
    assume that
A93: f1 is_FinSequence_on t,p0 and
A94: len f1=n;
A95: p0+1 >= 7+1 by A5,XREAL_1:6;
A96:    now
      let i be Nat;
      assume that
A97:  1 <= i and
A98:  i <= len f1;
      p0+i >= p0+1 by A97,XREAL_1:6;
      then
A99:  p0+i >= 8 by A95,XXREAL_0:2;
      then
A100:  p0+i > 2 by XXREAL_0:2;
A101:  p0+i > 4 by A99,XXREAL_0:2;
      thus f1.i=t.intpos(p0+i) by A93,A97,A98
        .=t4.intpos(p0+i) by A7,A84,A85,A100,A101,A79;
    end;
A102: t4.a4=n4 by A7,A84,A85,A89,A79;
A103: t4.a4=t.intpos(mp+1) by A7,A84,A85,A79;
A104: t4.a2=t.intpos mp by A7,A84,A85,A79;
    then Pt is_closed_on Initialize t4,Q4 by A5,A87,A88,A92,Th10,A80,A81;
    then
A105: Pt is_closed_on t4,Q4 by SCMPDS_6:125;
     Pt is_halting_on Initialize t4,Q4 by A5,A87,A88,A104,A92,Th10,A80,A81;
     then
A106: Pt is_halting_on t4,Q4 by SCMPDS_6:126;
    then
A107: lPt is_closed_on t,Q by A105,A79,SCPISORT:9;
    assume that
A108: f2 is_FinSequence_on IExec(TR,Q,t),p0 and
A109: len f2=n;
    consider f4 be FinSequence of INT such that
A110: len f4=n and

A111: for i be Nat st 1<=i & i <= len f4 holds f4.i=tp.
    intpos (p0+i) by SCPISORT:1;

A112: f1 is_FinSequence_on Initialize t4,p0
 proof let i be Nat;
  assume  1 <= i & i <= len f1;
   then f1.i=t4.intpos(p0+i) by A96;
  hence thesis by SCMPDS_5:15;
 end;
A113: f4 is_FinSequence_on tp,p0 by A111;
    then consider m4 be Nat such that
A114: m4=tp.a4 and
A115: md <= m4 and
A116: m4 <= t4.a4 and
A117: for i be Nat st md<=i & i < m4 holds tp.intpos m4 >=
    tp.intpos i and
A118: for i be Nat st m4 < i & i <= t4.a4 holds tp.intpos
    m4 <= tp.intpos i and
A119: for i be Nat st i >= p0+1 & (i < t4.a2 or i > t4.a4)
    holds tp.intpos i = (Initialize t4).intpos i
     by A5,A87,A88,A89,A90,A91,A94,A104,A103,A92,A112,A110,Th11,A80,A81,A82;

    tp.a=0 by A5,A87,A88,A89,A90,A91,A94,A104,A103,A92,A112,A110,A113,Th11,A80
,A81,A82;

    then
A120: t2.a=0 by A105,A106,SCPISORT:7;
A121: lPt is_halting_on t,Q by A105,A106,A79,SCPISORT:9;

    tp.a1=t4.a1 by A5,A87,A88,A89,A90,A91,A94,A104,A103,A92,A112,A110,A113,Th11
,A80,A81,A82,A83;

    then
A122: t2.SBP=t4.a1 by A105,A106,SCPISORT:7
      .=m1 by A7,A84,A85,A79;
    then
A123: IExec(L5,Q2,Initialize t2).intpos mp=t2.intpos mp by A19,A86,A120;

    IExec(L5,Q2,Initialize t2).a=0 by A19,A86,A120,A122;
    hence t1.a=0 by A107,A121,SCPISORT:6;
    IExec(L5,Q2,Initialize t2).SBP=m1+2 by A19,A86,A120,A122;
    hence t1.a1=m1+2 by A107,A121,SCPISORT:6;

A124: IExec(L5,Q2,Initialize t2).intpos (mp+3)=t2.intpos (mp+1)
 by A19,A86,A120,A122;
A125: IExec(L5,Q2,Initialize t2).intpos (mp+2)=t2.a4+1 by A19,A86,A120,A122;
A126: IExec(L5,Q2,Initialize t2).intpos (mp+1)=t2.a4-1 by A19,A86,A120,A122;
A127: 1+pn > pn by XREAL_1:29;
A128: m1 >= 1 by A86,NAT_1:11;
    then mp >= 1+pn by XREAL_1:6;
    then
A129: mp > pn by A127,XXREAL_0:2;
    then
A130: mp > t4.a4 by A91,A102,XXREAL_0:2;
    then
A131: m4 < mp by A116,XXREAL_0:2;
A132: dom f2 = Seg n by A109,FINSEQ_1:def 3;
A133: now
      let i be Nat;
      reconsider a = i as Nat;
      assume
A134: i in dom f2;
      then
A135: 1 <= i by A132,FINSEQ_1:1;
      then p0+i >= p0+1 by XREAL_1:6;
      then
A136: p0+i >= 8 by A95,XXREAL_0:2;
A137: i <= n by A132,A134,FINSEQ_1:1;
      then p0+i <= pn by XREAL_1:6;
      then
A138: p0+i < mp by A129,XXREAL_0:2;
      thus f2.i = t1.intpos(p0+a) by A108,A109,A135,A137
        .=IExec(L5,Q2,Initialize t2).intpos(p0+a) by A107,A121,SCPISORT:6
        .=t2.intpos (p0+a) by A19,A86,A120,A122,A136,A138
        .=tp.intpos (p0+a) by A105,A106,SCPISORT:7
        .=f4.i by A110,A111,A135,A137;
    end;
A139: mp >= 1+7 by A6,A128,XREAL_1:7;
    then
A140: mp > 4 by XXREAL_0:2;
A141: mp+1 > mp by XREAL_1:29;
    then
A142: mp+1 > t4.a4 by A130,XXREAL_0:2;
A143: pn >= p0 by NAT_1:11;
    then
A144: mp >= p0+1 by A128,XREAL_1:7;
    then
A145: mp+1 >= p0+1 by A141,XXREAL_0:2;
A146: mp+1 >= 8+1 by A139,XREAL_1:6;
    then
A147: mp+1 > 4 by XXREAL_0:2;
A148: t4.intpos mp = (Initialize t4).intpos mp by SCMPDS_5:15;
A149: t4.intpos (mp+1) = (Initialize t4).intpos (mp+1) by SCMPDS_5:15;
    mp > 2 by A139,XXREAL_0:2;
    hence md=t4.intpos mp by A7,A84,A85,A87,A140,A79
      .=tp.intpos mp by A119,A144,A130,A148
      .=IExec(L5,Q2,Initialize t2).intpos mp by A105,A106,A123,SCPISORT:7
      .=t1.intpos mp by A107,A121,SCPISORT:6;
    mp+1 > 2 by A146,XXREAL_0:2;
    hence n4=t4.intpos (mp+1) by A7,A84,A85,A89,A147,A79
      .=tp.intpos (mp+1) by A119,A145,A142,A149
      .=IExec(L5,Q2,Initialize t2).intpos (mp+3) by A105,A106,A124,SCPISORT:7
      .=t1.intpos (mp+3) by A107,A121,SCPISORT:6;
    hereby
      let j be Nat;
      assume that
A150: 1<=j and
A151: j<m1;
A152: pn+j < mp by A151,XREAL_1:6;
      pn+j >= pn+1 by A150,XREAL_1:6;
      then pn+j > pn by A127,XXREAL_0:2;
      then
A153: pn+j > t4.a4 by A91,A102,XXREAL_0:2;
A154: pn+j >= p0+1 by A143,A150,XREAL_1:7;
A155: pn+j >= 1+7 by A6,A150,XREAL_1:7;
      then
A156: pn+j > 2 by XXREAL_0:2;
A157: pn+j > 4 by A155,XXREAL_0:2;
A158: t4.intpos (pn+j) = (Initialize t4).intpos (pn+j) by SCMPDS_5:15;
      thus t1.intpos(pn+j)=IExec(L5,Q2,Initialize t2).intpos(pn+j)
       by A107,A121,SCPISORT:6
        .=t2.intpos (pn+j) by A19,A86,A120,A122,A155,A152
        .=tp.intpos (pn+j) by A105,A106,SCPISORT:7
        .=t4.intpos (pn+j) by A119,A154,A153,A158
        .=t.intpos(pn+j) by A7,A84,A85,A156,A157,A79;
    end;

    f1,f4 are_fiberwise_equipotent by A5,A87,A88,A89,A90,A91,A94,A104,A103,A92
,A112,A110,A113,Th11,A80,A81,A82;

    hence f1,f2 are_fiberwise_equipotent by A109,A110,A133,FINSEQ_2:9;
    take m4;
    thus md <= m4 & m4 <= n4 by A7,A84,A85,A89,A115,A116,A79;
    thus m4-1=t2.a4-1 by A114,A105,A106,SCPISORT:7
      .=t1.intpos (mp+1) by A107,A121,A126,SCPISORT:6;
    thus m4+1=t2.a4+1 by A114,A105,A106,SCPISORT:7
      .=t1.intpos (mp+2) by A107,A121,A125,SCPISORT:6;
A159: md >= 8 by A88,A95,XXREAL_0:2;
    then
A160: m4 >= 8 by A115,XXREAL_0:2;
    hereby
A161: tp.intpos m4=t2.intpos m4 by A105,A106,SCPISORT:7
        .=IExec(L5,Q2,Initialize t2).intpos m4 by A19,A86,A120,A122,A131,A160
        .=t1.intpos m4 by A107,A121,SCPISORT:6;
      let i be Nat;
      assume that
A162: md<=i and
A163: i < m4;
A164: i < mp by A131,A163,XXREAL_0:2;
A165: i >= 8 by A159,A162,XXREAL_0:2;
      tp.intpos i=t2.intpos i by A105,A106,SCPISORT:7
        .=IExec(L5,Q2,Initialize t2).intpos i by A19,A86,A120,A122,A164,A165
        .=t1.intpos i by A107,A121,SCPISORT:6;
      hence t1.intpos m4 >= t1.intpos i by A117,A162,A163,A161;
    end;
    hereby
A166: tp.intpos m4=t2.intpos m4 by A105,A106,SCPISORT:7
        .=IExec(L5,Q2,Initialize t2).intpos m4 by A19,A86,A120,A122,A131,A160
        .=t1.intpos m4 by A107,A121,SCPISORT:6;
      let i be Nat;
      assume that
A167: m4 < i and
A168: i <= n4;
A169: i < mp by A89,A103,A130,A168,XXREAL_0:2;
      i >= md by A115,A167,XXREAL_0:2;
      then
A170: i >= 8 by A159,XXREAL_0:2;
      tp.intpos i=t2.intpos i by A105,A106,SCPISORT:7
        .=IExec(L5,Q2,Initialize t2).intpos i by A19,A86,A120,A122,A169,A170
        .=t1.intpos i by A107,A121,SCPISORT:6;
      hence t1.intpos m4 <= t1.intpos i by A102,A118,A167,A168,A166;
    end;
    hereby
      let j be Nat;
      assume that
A171: p0+1<=j & j<md or n4<j & j <= pn;
A172: now
        per cases by A171;
        suppose
A173:     p0+1<=j & j<md;

          hence j >= p0+1 & (j < t4.a2 or j > t4.a4) by A7,A84,A85,A87,A79;

          md < mp by A115,A131,XXREAL_0:2;
          hence j < mp by A173,XXREAL_0:2;
        end;
        suppose
A174:     n4<j & j <= pn;
          n4 >= md by A102,A115,A116,XXREAL_0:2;
          then j >= md by A174,XXREAL_0:2;
          hence j >= p0+1 by A88,XXREAL_0:2;
          thus j < t4.a2 or j > t4.a4 by A7,A84,A85,A89,A174,A79;
          thus j < mp by A129,A174,XXREAL_0:2;
        end;
      end;
      then
A175: j >= 8 by A95,XXREAL_0:2;
      then
A176: j > 2 by XXREAL_0:2;
A177: j > 4 by A175,XXREAL_0:2;
A178: t4.intpos j = (Initialize t4).intpos j by SCMPDS_5:15;
      thus t1.intpos j=IExec(L5,Q2,Initialize t2).intpos j
       by A107,A121,SCPISORT:6
        .=t2.intpos j by A19,A86,A120,A122,A172,A175
        .=tp.intpos j by A105,A106,SCPISORT:7
        .=t4.intpos j by A119,A172,A178
        .=t.intpos j by A7,A84,A85,A176,A177,A79;
    end;
  end;

A179: for t be State of SCMPDS,Q
  for m be Nat st t.a=0 & t.SBP=m holds
  IExec(l1 ';' l2,Q,Initialize t).a2=t.intpos (m+pn+1)-t.intpos (m+pn)
   & for i be Nat st i <> 2
 holds IExec(l1 ';' l2,Q,Initialize t).intpos i=t.intpos i

  proof
    let t be State of SCMPDS,Q;
    let m be Nat;
    assume that
A180: t.a=0 and
A181: t.SBP=m;
    set t0=Initialize t,
     t1=IExec(l1 ';' l2, Q,Initialize t), t2=Exec(l1, t0), mp=m+pn;

A182: t0.a =0 by A180,SCMPDS_5:15;
    then
A183: DataLoc(t0.a,2)=intpos (0+2) by SCMP_GCD:1;
    then t2.a=0 by A182,AMI_3:10,SCMPDS_2:47;
    then
A184: DataLoc(t2.a,2)=intpos (0+2) by SCMP_GCD:1;
A185: t0.SBP =m by A181,SCMPDS_5:15;
    then
A186: t2.SBP=m by A183,AMI_3:10,SCMPDS_2:47;
    mp >= 0+7 by A6,XREAL_1:7;
    then mp > 2 by XXREAL_0:2;
    then
A187: t2.intpos mp=t0.intpos mp by A183,AMI_3:10,SCMPDS_2:47
      .=t.intpos mp by SCMPDS_5:15;
A188: t2.a2=t0.DataLoc(t0.SBP,pn+1) by A183,SCMPDS_2:47
      .=t0.intpos (m+(pn+1)) by A185,SCMP_GCD:1
      .=t.intpos (mp+1) by SCMPDS_5:15;
    thus t1.a2 =Exec(l2, t2).a2 by SCMPDS_5:42
      .,,CARD_1 ,  java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
      .=t.intpos (mp+1)-t.intpos mp by A186,A188,A187,SCMP_GCD:1;
    hereby
leti ;
      assume
 i> 2;
 t1.ntposi=(l2,t2intpos i  :
        .intpos   ,,MI_3:10,:50
        .=t0.intpos  A183A189,:,:java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        .=t.intpos i by SCMPDS_5:15;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  end;
A190: pn+1 >     h+ + f=A  B+ CbyBINOP_2 java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

for - tateQ
   ex ejava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 29
intpos(+pn1 = t.ntpos(+pn holdsIExec(,,)ajava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
 & IExec(thesis
  & (for j be Nat +   t+   ex+=&     
  holds IExec(WB4,Q,t).intpos(pn+j)=t.
  intpos(pn+j)) & for j be Nat st 1<=j & j <= n
   holds IExec(WB4,Q,t).
  intpos (p0+j) = t.intpos (p0+j)
  proof
    let t be 0-started State of SCMPDS,Q;
    let m be Nat;
set=m+,t1IExec(l1 ';' l2,Q,t), Q1 = Q;
take;
    assume that
:.0 
A194: t.SBP=m and
A195: t.intpos (mp+1) <= t.intpos mp;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
197 .= m+1-.  byA179,193,A194,192;
    
:t1. =0by A195XREAL_147;
=GBP,,2) 0=nitialize;
.  (  )by,BINOP_2def;
A200: t1.  take e;
    . hjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
thus    -)+Aby:efjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 .= by A200SCMPDS_515java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
     , Element G
A203: DataLocA3 for being Element of Gholds h + e2 = h & e2 + h = h;
A204: lb is_closed_on t1,Q1 by SCMPDS_6:20;

A205: IF4 is_halting_on t1,Q1 by A201,A198,A199,SCMPDS_6:69;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
      let x;
 Initialize t1)GBP= t1.GBPby SCMPDS_515java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
 Initialize ).(.GBP)=.ataLoct1.GBP,)by SCMPDS_5:;
      thus IExec(WB4,Q,t).x =     ;
                A206,SCPISORT7
 .=IExec(lb,Q1,nitialize t1).x
         java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        .=java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 5
    end;
A210: now
      let i be Nat;
      assume i <> 1;
      . _
A211: intpos i <> DataLoc(t0.a,1) by A202,AMI_3:10,SCMP_GCD:1;
      thus IExec(Def5
        .=t0.intpos i by A211,SCMPDS_2end;
        .=t1.intpos i by SCMPDS_5:15;
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    hence hence  byTh11
thusIExecW,,)a1E(lit0).by
.=t0.a1+- by A203,:48
      =a1-
      .m2by A196,SCMPDS_515java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

      let j be Nat    .= h+g
      assume thatassume
212:1=j and
      j< theng+-  (-g + h) by Th11
        then g -  )= -+g+ by:ef3java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
      then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      then
A214:pnj>2byXXREAL_0:2;
      pn+j > 1 by A213,XXREAL_0:2;
  IExec(,,t.(+j=1.p+)byA210
        .=t.intpos(pn+    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    end;
    
      let j be Nat;
      assume that
A215: 1<=j and
      j<=n;
A216: let hElement  ;
p0j>= p0+1 by A215X:;
      then
java.lang.StringIndexOutOfBoundsException: Range [23, 4) out of bounds for length 35
     java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
 p0+> 2 :2;
 byA217,:2;
      hence IExec(WB4,Q - having_an_inverseOp;
        .=t.intpos(p0+j) by A179,A193,A194,A218,A192;
    end is  &add_inverseG  obyTh22java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
  end;
  be  ofSCMPDS,Q
  m1m  st .a0&t.m1 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
intpos+)md  md =p0+ & t.intpos(+n1)-d   TR
  is_closed_on t,Q & TR is_halting_on      assume x  the carrier of G;

  proof
    let t be State of SCMPDS  as
    let m1,md beend;
set lPtl3';' l4 '; Pt,t2IExec(l3 Initializet)
m1pn   ;
:.=( t2. bySCMPDS_515java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
:a2=( t2.by 15java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    assume     assume that

A223: t.SBP=m1 and
 g1sequence java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 68
  + java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
+1->;
:t2a A7A222A
   java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 43
    then
    then
2,Q2bySCMPDS_6:;
ed_onInitializet2Q2 ,A224A,A226Th10,A220,221;
      
A229: Pt    thesisjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
      h Gby;
A230: java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 7
    lPt;
    hence thesis by A230,SCPISORT:8;thesis;
 java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6

for  0started State SCMPDS,
   for m,java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5

f2 be FinSequence of INThencethesis ;

>= p0+1 & n4=t.intpos(m1+pn+1) & n4-md > 0 & n4 <= pn & f1 is_FinSequence_on t,

p0 & len f1=n & f2 is_FinSequence_on IExec(WB4,Q,t),p0 & len f2=n
 holds IExec(WB4,Q,t).a=0 & IExec(WB4,Q,t).a1=m1+2 &
md=IExec(WB4,Q,t).intpos(m1+pn)
 & n4=IExec(WB4,Q,t).intpos (m1+pn+3) &
  (for j be Nat st (1<=j & j<m1)
 holds IExec(WB4,Q,t).intpos(pn+j)=t.intpos(pn+j)) &
 f1,f2 are_fiberwise_equipotent & ex m4 be

 md <  m4< 
 & m4-=IExec(,,).intpos (m1++)&m4
  +1=IExec(WB4(  )*)byDef7java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
   & (for i be Nat st md<=i & i < m4
  holds IExecdefpredP] +    implies +($ * h =1*h +gjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  IExec(WB4,,t)intpos ijava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   & (for i be=h+(   )+gb A2R:ef java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
 holds IExec(WB4,Q,t).intpos m4 <=
 IExec(WB4,Q,t).intpos i)

  jbeNat p0+<j &j or<  < +
 holds IExec(WB4,Q,t).A1  P[ Pn1



MPDS;
    let m,m1,md bejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    FinSequence of INT;
A232: Initialize t = t by java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 15
    set mp=m1+pn,t1=(l1 '; l2Q,),Q1 = Q;
    assume that
A233: t.a=0 A3 g+  h+g;
A234:tSBPm1 
A235: m1=m+ and
A236: t.intpos mp=md and
A237: md >= p0. n +)*g+( (+1) *h)byA3Lm10java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
A238: n4=t.intpos (      0*  _ Def7
A239: n4-md > 0 and :
A240 n4 < pn
 endjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
A242: mp >= 0      =-|i| )A2A:def 1;
    then java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 5
    then
A243: t1.intpos mp=md  (1 *h = h
     .- byTh25;
: tp0 
 len f1n;
+1=7+ 
        end
      let i be Nat;
      assume that
A247: 1 <= i and
A248: i <= len f1;
      .-.|  1 =  -1+  A3XREAL_119A: 1
 p0+>8byA246XXREAL_02;
     java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
A249: p0+i > 2 by XXREAL_0:2;
t .=.(+)by A244,,248
        .= t1.intpos(p0+i)        . (|j-. *h +((  -j) *h) byA7ABSVALUE:def1
    end;
    then
A250: f1 is_FinSequence_on
    mp+1 > . h+h+( -j *h java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 51
 mp > 2 by2;
    then
 =. m+)byA179A233,A234,238,java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54

    then
A253: DataLoc.a2)=(+2) :;
  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    then
A255A2:   j >=0
A256: TR       hence
    proof
Q1stopTR halts_on Initialize Initialize t1 by A255,SCMPDS_6def;
     hence thesis by SCMPDS_6:def 3;
    end;
257 (Initializet1.  t1.GBPbySCMPDS_5:15;
A258: (Initialize t1).DataLoc(      then
A259: TRis_closed_ont1 byA219A,,A254,A251A252;
A260: TR is_closed_on Initialize t1,Q1
     proof
 for k being Nat holds
   IC Comput(    ;
             by A259,SCMPDS_6:def 2;
     hence thesis  SCMPDS_6:def ;
     end;
    then
A261: IF4 is_halting_on Initialize t1,Q1
byA253,241A257,A258,A256,SCMPDS_6:68;
thusj+)  = ( ( (j  1
    proof
      Q1+*stop IF4 halts_on    . (- ( j)) * h + -( (-1) * h) by Lm12
     hence thesis by SCMPDS_6:def 3;
    nd
    assume that
A263: f2 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 10
A264: len f2=n;
A265: IF4 is_closed_on Initialize t1,Q1
 by A253,A241,A257,A258,A256,A260,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
A266: IF4 is_closed_on thus (i + (j + 1)) * h(  1)   java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
  proof
  for k java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 7
   IC Comput(Q1+*stop IF4,  for j holds P[j] from INT_1:sch 4(A3,A1);
           by A265,SCMPDS_6:def 2;
   hence thesis by SCMPDS_6:def 2;
  end;

67:now
      let x;
thusW,,t. = (F4Q1, t1.
           by A266,A262,    hence i * (g + h) = -(|.i.|*( + )=-|.i|*(  ) A1java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
       =T,Q1Initializet1.java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
         by A253,A241,Th1,A257,A258,A260,A256;
      g i.*g&j*h  ..| *  byD;
now
      let isuppose
      assume that
A268: 1 <= i A6   *   (|i.  )&j*h= -( |.j.| * h) by Def8;
A269: i <= len        + (j  )  (.j. *+(|i.)*g)byTh16
      thus f2.i=IExec(WB4  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
,,
        .= IExec(TR,Q1,Initialize t1).intpos(p0+i) by A267;   . i * h  g by Th25java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    endjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
then
A270: f2 is_FinSequence_on java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 10

A271: (Initialize t1). 
:(Initialize t1). =t1. by SCMPDS_5:5java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
 Initialize t1)intpos(m1+pn)=t1.intpos(1pn by SCMPDS_5:15;
 ( t1)intpos(1pn1  intpos(1pn+1 bySCMPDS_5:15;
uence_on t1,0
   proof let i be Nat;
    assume 1 <= i & i  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
     then f1.i    assume that
    hence thesis by SCMPDS_5n1< m)&n2* h=0G&(n2< 0 &for stm *h=0_G&m<>  holds n2
   end;

    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
     by A78,
A273,A274
,A275;
    IExec(B4,t).a=0 byA267java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

m4beNatsuchthat
 <  and
A277: m4 <=  reconsider 0=addMagma ( , addreal #  addGroup  ;
A278: m4-1=IExec(TR,Q1,Initialize t1).    A=,= java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
:1=(,Q1).(p2 java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
A280: for i be Nat st   = ,=as
holds IExec(TR,Q1,Initialize t1).
    reserve a,  java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 29

A281: for i be Nat st java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 5
holds IExec(TR,Q1,Initialize t1).
    intpos m4 <= IExec(    +     =+ by;

  Natp01=  mdorj& <n
holds IExec    java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 26
 by A78,A235 java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 35
A274,A275;

A283: for j be01=1java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
holds IExec(TR,Q1,
 proof  be-java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 41
  assume p0+1<=j & j<md java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 4
   then IExec(TR,Q1,Initialize t1).intpos j =    mL.y
by;
  hence thesis by SCMPDS_5:15;
end
   TR,Q1,nitializet1)a1m1+
 AA,A243,,java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
A


    hence;

    md=IExec(TR,Q1,Initialize t1).intpos mp
    by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A273,A274
,A275;

I(,t.  

    n4=IExec 
    A78,A237A239A,java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 76
A3: a = -g and


    hence n4=IExec(WB4,Q,t).intpos (
    hereby
      let:  hand
      assume that
A284: 1<   gby ;
 j<m1;
      pn+j >= pn+1 by java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
      thenthen a 
      then
:pn+j>2byXXREAL_02;
      thus IExec(,Qt)intpospn+)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
      IExec(TR,Q1,Initialize t1).intpos(pnend

t1).ntpospn)
         by A78,A235,A237,A239,  
,A285,A271,A272,A273,A274,A275  (#t java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 45
        .=t1.intpos(pn+j) by SCMPDS_5:15

        .=t.intpos(pn+j) by A179,A233,A234,A286,A232;
    end;

    thus f1,f2 are_fiberwise_equipotent by A78,A235,A237,A239,A240,A245,A264
,A254,A243,A251,A252,A270,A271,A272,A273,A274,A275;

    take m4;
    thus md < let x beobject;
    thus m4-1  --ain (]thecarrierof 
    thus   A < {}iff- >{
    hereby
      let i be Nat;
      assume that
A287: md<=i   assume- >{;
:i<m4;
      IExec(TR,Q1,Initialize t1).intpos m4 >=
      IExec(TR,Q1,Initialize t1).intpos i by A280,A287,A288;
      then IExec(WB4,Q,tcluster-- java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
      IExec(TR,Q1,Initialize t1).intpos i
       by A267;
(WB4,t. >java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
WB4Qt.i A267java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    end;
    hereby
      let i be Nat;
      assume that
:   
A290: i <= n4;
      IExec(TR,Q1: >{java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
,A289,java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    IExecW,,.m4=
      IExec(TR,Q1,Initialize t1  ;
       by A267;
      hence IExec(WB4,Q,t).intpos m4 <=
W,,)intpos  byA267;
    end;
    A5: g g2and
      let j be Nat;
      assume that
A291: p0+1<=j,java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 26
      now
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        suppose
          p0+1<=j & j<md;
          hence p0+1<=j;
        endAg1 in - java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
        suppose
          n4<j & j <= p0+n;
j = m4by XXREAL_0:2;
          then j >=  then java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 33
          hence j >= p0+1 by A237,XXREAL_0:2;
        end;
      end;
      then j >= 8 by A246,XXREAL_0:2;
      :=g1+   inAand
A292: j > 2 by XXREAL_0:
      thus IExec(WB4,Q,t).intpos j =
        IExec(TR,Q1,Initialize t1).intpos j by A267
        .=t1.intpos j by A283,A291
        .=t.intpos        .=t.intpos 
    end;
  end;
   ofINT 
 =nand
:f  sp0 bySCPISORT:;
A295: pn+2 >= 7+2 by A6,XREAL_1:6;
A296: s1.a=0 & s1.a1=1 & s1.intpos(pn+1)=java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 35
  be Nat st i >= 8 & i <=A4:xin(+ /(B+C;

    set t2=IExec(m1 ';' m2 ';' m3,P,s),
    t3=IExec(m1 ';' m2,P,s), t4=Exec(m1,       byA5,A7;
A297: t4.a =0 by SCMPDS_2:45;
A298: t3.a=Exec(m2, t4).a by SCMPDS_5:42
      .=0 by A297,SCMPDS_2:45,SCMP_GCD:3;
A299: t3.SBP=Exec(m2, t4).SBP by SCMPDS_5:42
      .=1 by SCMPDS_2:45;
    then
A300: DataLoc(t3.SBP,pn)=intpos (pn+1) by SCMP_GCD:1;
A301: t2.a=Exec(m3,t3).a by SCMPDS_5:41
      .=0 by A298,A300,AMI_3:10,SCMPDS_2:46;
A302: t2.intpos (pn+1)=ExecA10: in C;
      .=p0+1 by A300,SCMPDS_2:46;
A303:   thesis
A304: pn+1 > 1 by A190,XXREAL_0:2;
 .SBPE(,)SBP bySCMPDS_5:41
      .=1 by A299,A300,A304A2:g2   \C;
    then
A306: DataLoc(t2.SBP,pn+1)=intpos (pn+(1+1)) by SCMP_GCD:1;
    thus s1.a=Exec(  hencethesisA3java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
      .=0 by A301,A306,AMI_3:10,SCMPDS_2:46;
    thus s1.a1=Exec(m4  +
      .=1 by A305,A306,A303,AMI_3:10,SCMPDS_2:46;
 +> 1byXREAL_16java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    thus s1.    set x = the El ofA+{t  G)
      .p0+1 byA302,306,,:,CMPDS_246
    thus s1.java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
      .=pn by A306,SCMPDS_2:46;
A308
           by AMI_3:10,SCMPDS_2:45;
A309: now
      let i be Nat;
      assume
A310: i >= 8;
      then
A311: i > 1 by XXREAL_0:2;
      thus t3.intpos i =Exec(m2, t4).intpos i by SCMPDS_5:42
.t4i   ,1,:java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
        .=sthus #(carrier G   =thecarrier ;
    end;

      let i be Nat;
      assume that
:> 8 
  =;
5:pn1>pn :;
      thus t2.intpos i =Exec(m3, t3).intpos i by SCMPDS_5
        .=t3.intpos i by A300,A314,A315,AMI_3:10,SCMPDS_2:46
        .=s.intpos i by A309,A313;
    end;
A316: pn+2 > pn+0 by XREAL_1:6;
      let i be Nat;
        {g} + {g1,g2} = {g + g1,g + g2}
A317:g}+{g2  g+g+java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
A318: i <=pn;
      thus s1.intpos iA2:h1 in{}and
        .=t2.intpos i by A306 A4java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        .=  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 30
  end;
  now
A319A{,}+gc g  ,+}
    let i be Nat;
    assume ,h2
A3201<  
  =by TARSKI1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
A322: p0+i  x{ g, }
+i=1by:;
    then
A323
    thus f.i=s.intpos(p0+i) by java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 5
..+ y A;
  asx A
  then
A324: f is_FinSequence_on s1,p0;
considergbe FinSequence ofINT such
A325:      x=g+or     x   : ;
A326: g is_FinSequence_on endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 by SCPISORT:2;
A327: b1  A g )java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 46
A328: for t be State of SCMPDS,Q
   for m,md  
  .intpos(m     ex g1,  Elementof  stx =g1+g2   inA&g2in A;
 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
  proof
    let:G  Aby
    m,md be Nat;
    set mp=m+pn, t1=java.lang.StringIndexOutOfBoundsException: Range [8, 25) out of bounds for length 8
    assume that
A329: t.a    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 19
A330: t.SBP=m and
A331: t.intpos mp=md and
A332: md >= p0+1 java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 12
A333: t1.a2=t.intpos (mp+1)-t.intpos mp by A179,A329java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A334: t1.a=0 by A179,A1: for a,b st a in A & b java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 51
    then
(.,)i2 :java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    per cases;
    suppose
A336:   &a  ;
A337: mp >= 0+7 by A6,XREAL_1:7;
      then mp
      then mp+1 > 2 by XXREAL_0:2;
      then
A338: t1a
A339: t1.SBP=m by A179,A329,java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
mp   XXREAL_0:;

A340: t1.intpos mp=md by A179,A329,A330,A331;

      then
A341: TR is_halting_on t1,Q1
 by A219,A179,A329,A330,A331,A332,A334,A335,A336,A339,A338;

:(nitializet1.ataLoct1,)=t1.ataLoct1a2 SCMPDS_5:;
A343: (Initialize t1).a = t1.a by SCMPDS_5:15;

A344: TR is_closed_on t1,Q1
 by A219,A179,A329,A330,A331,A332,A334,A335,A336,A339,A340,A338;

A345: TR is_halting_on Initialize t1,Q1
  proof
     Q1+*stop TR halts_on Initialize Initialize t1 by A341,SCMPDS_6:def 3;
   hence thesis by SCMPDS_6:def 3;
  end;
A346: TR is_closed_on Initialize t1,Q1
  proof
   for k being Nat holds
   IC Comput(Q1+*stop TR,Initialize Initialize t1,k) in dom stop TR
            by A344,SCMPDS_6:def 2;
hence thesisby SCMPDS_6:def 2;
  end;
      then
A347: IF4 is_halting_on Initialize t1,Q1 by A336,A345,A342,A343,SCMPDS_6:68;
A348: IF4 is_halting_on t1,Q1  b  suchthat

         Q1+*stop IF4 halts_on   in   java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
         hence thesis by SCMPDS_6let,g,;
        end;
A349:   IF4 is_closed_on Initialize t1,Q1 by A336,A346,A345,A342,A343
,SCMPDS_6:68;
      IF4 is_closed_on t1,Q1
       proof
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   IC Comput(Q1+*stop A3 g2in A;
         by A349,SCMPDS_6:def 2;
        java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 39
         hence thesis by A4;
      hence java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 4

suppose
A350: t1.DataLoc(t1.a,2) <= 0;
A351: lb is_halting_on t1,Q1 by SCMPDS_6:21;
A352: lb is_closed_on t1,Q1 by SCMPDS_6:20;
      then
A353: IF4 is_halting_on t1,Q1 by A350,A351,SCMPDS_6:69;
      IF4 is_closed_on t1,Q1 by A350,A352A351,SCMPDS_6:69;
      hence thesis by A353       add-associative implies g + A + B =g+ (  B)by ;
    end;
  end;

A354:
  now let t be 0-started State
f    ky, 
   java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    set mm=2*k1+1, md=p0+y1, n4=p0+yn;
    assume that
A355: t.a=0 and
A356: mm=t.b1 and
:=pnk1+
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
A359:n4.(+1)and
A360: 1 
     mp=mm+n
A361: md=t.intpos mp by A357,A358;
    now
 ;
      case
        1 <= y1 & yn <= n;
        hence p0+1 <hence java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
end
      case
        y1 >= yn;
        then  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
        hence t.intpos (mp+1) -    let x be object
      end;
    end;
WB4java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 54
     by A328,A327,A355,A356,A361;
      G isAbelian addGroup   + A=A+  by;
A362: len f3=n and
A363:for i be Nat st1=   <  f3 holds .=t
    intpos( p0+i) by SCPISORT:1;
    consider f4 be FinSequence of INT such that
A364: len f4=n andthe   the G|;
A365: for i java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 11
     holds f4.i=IExec(WB4,Q,t).intpos(p0+i) by SCPISORT:1;
A366: f4 is_FinSequence_on IExec(WB4,Q,t),p0 by A365java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
A367: f3 is_FinSequence_on t,p0 by A363;
    hereby
       casesjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      suppose
        t.intpos (mp+1) <= t.intpos mp;

        hence
        IExec(WB4,Q,t).a=t.a &
        for j be Nat st 1<=j & j<mm holds
        IExec(WB4,Q,t).intpos(pn+j)=t.intpos(pn+j)
191,,A355,356

      end;
      suppose
A368:   t.intpos (mp+1) > t.intpos mp;
        then
A369:   n4
A370:   n4 <= pn  yzof    =G by DefA5;
        p0+1 <= md by A357,A358,A359,A360,A368,XREAL_1:6;

        hence
        IExec(WB4,Q,t).a=t.a &
forjjava.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 41

IExec(WB4,Q,t).java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
 by A231,A327,A355  reconsider g =h,g9 =0G by ,TRUCT_0 ;

      end;
    end;
    hereby
      assume y1    = 0H2  Th44;
      then
A371: t.intpos java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      hence IExec(WB4,Q,t).b1=2*k1+1-2 by A191,A327,A355,A356
        .=2*k1-1;

      thus for j be Nat stjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      holds IExec(WB4,Q,t).intpos
      (p0+j) = t.intpos (p0+j) by A191h  ;

    end;
A372: k2=mp by A357;


set s = Initialize s1,
    a = GBP,
  add_inverse))=  carrier of H  doma(G) = the arrier
    m = p0,
    i = 1,
    I = WB4,
     ,
    pn = p0+n,
    m1 = pn+1;
thus
y1<  hen 
 & (for j be Nat  java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
st 1<=j & j<y1 or yn<j & j <= n
 holds IExec(I,Q,t).intpos(m+j) = t.intpos (m+
j)) & (ex ym be Nat st y1 <= ym & ym <=     asjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 39
 & m+y1=IExec(I,Q,t).intpos
k2      thus s+ a = - + x.=tby Def5;
m++1IExec(,Q,).ntpos (22java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 & m+yn=
IQ).ntpos (2+) &
 (for j be Nat st y1 <= j & j < ym holds
IExec(I,Q,t).: < }and
IExec(I,Q,t).intpos (m+ym)) &
 (for j be Nat
 ym      IQt.ntpos(+java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
Qt. (+ym)))
    proof
      assume       objectjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
A373: y1<yn;
      then
:p0+= md A360,:6;
       > by A373,REAL_1:;
      then
A375: n4-md > 0 by XREAL_1:50;
A376: n4 <= pn by A360,A373,java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 29

      hence
      IExec(WB4,Q,t).b1=2*k1+1+2
      A231A327,,,,,361,A362A367,364,366,375,374

        .=2*k1+3;
      consider m4     reconsidert  _   HDef5;
A377: md <= m4 and
A378: m4 <= n4 and
A379: m4-1=IExec(WB4,Q,t).intpos (mp+1) and
A380: m4+1=IExec(WB4,Q,t).intpos (mp+2) and

A381: for i be Nat st md<=i & i < m4
holds IExec(WB4,Q,t).
      intpos m4 >= IExec(WB4,Q,t).intpos i and

A382: for i be Nat st m4 < i & i <= n4
holds IExec(WB4,Q,t)
      . intpos m4 <= IExec(WB4,Q,t).intpos i and

A383: for js=x   byA3

holds IExec(,Q,).ntpos =t. java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42


      hereby
        let j be Nat;


        then p0+1<=p0+j & p0+j<      .= g2+g1 by A1,Lm2

        hence IExec(WB4,Q,t).intpos(p0+j) = t.   G  ;
      end;
      m4-p0 >= y1 by A377,XREAL_1:19;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      take ym;
      m4=p0+ym;
      hence y1 <= ym & ym <= yn by A377,A378,XREAL_1:6;

      theorem :
       by A231,A327,A355,A356,A358,A359,A372,A362,A367,A364,A366,A375,A374,A376
;

      thus p0+ym-1=IExec(WB4,Q,t).intpos (k2+1) by A357,A379;
      thus p0+ym+1=IExec(WB4,Q,t).intpos (k2+2) by java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 28

      thus n4=IExec(WB4,Q,t).intpos (k2+3)
       A231,A327A355A356,A358,A359,A,367A,AA374,A376
;

      
        let j be Nat;
        assume that
   =j java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
:j java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
A386:   p0+j < A5: A c= C by A3;
        y1<  byA384XREAL_1:;

        hence
        IExec(WB4,Q,t).intpos (p0+j) <=
        IExec(WB4,Q,t).intpos (p0+ym)
         A381,386;

;
      hereby
        let j be Nat;
        assume that
  (forg  gin H1holds g in )  is Subgroupof
A388:j< yn
A389:   p0+j <= p0+yn by A388,XREAL_1:6;
        p0+ym < p0+j by A387,XREAL_1:6;

        hence
        IExec(WB4,Q,t).intpos (p0+j) >=
        IExec(WB4,Q,t).intpos (p0+ym)
         by A382,A389;

      end;
    end;
    hereby
      assume that
A390: f1 is_FinSequence_on t,p0    reconsider gas of G,TRUCT_0: 5;
A391: f2 is_FinSequence_ongin;
 f1nand
A393: len f2=n;
      per cases;
      suppose
A394:   t.intpos (mp+1) <= t.intpos mp;
A395:nd;
        now
          leti Nat;
          reconsider a = i as Nat;
          assume
A396:     i in dom f1;
          then
A397:     1 <= i by A395,FINSEQ_1:1;
A398:     i <= n by A395,A396,FINSEQ_1:1;
          hence f1.i = t.intpos(p0+a) by A390,A392,A397

            .=IExec(WB4,Q,t).intpos(java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            by A191,A327,A355,A356,A394,A397,A398

            .=f2.i by A391,A393,A397,A398;
     
        hence f1,f2 are_fiberwise_equipotent by A392,A393,FINSEQ_2:9;
      end;
      suppose
A399:   t.intpos (mp+1) > t.
        then
A400:   the carrierofit={_}java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    =pnAA,,399X:;
        p0+1 <= md by A357,A358,A359,A360,A399,XREAL_1:6;

        hence
        f1,f2 are_fiberwise_equipotent by A231,A327,A355,A356,A357,A359,A361
,A390,A391,A392,A393,A400,A401;

      end;
    end;
  end;
A402: (Initialize s1).GBP = s1.GBP by SCMPDS_5:15;
A403: (Initialize s1).intpos (pn+1) = s1.intpos (pn+1) by SCMPDS_5:15;
A404: (Initialize s1).intpos((pn+1)+1) = s1.intpos((pn+1)+1) by SCMPDS_5:15;
A405: (Initialize s1).DataLoc(0,1) = s1.DataLoc(0,1) by SCMPDS_5:15;
A406: WH4 is_closed_on Initialize s1,P by      hence g1 + g2in{_G}by TARSKI:def 1;
A405;
java.lang.StringIndexOutOfBoundsException: Range [9, 4) out of bounds for length 27
    proof
  for k being Nat holds
   IC Comput(P+*stop WH4,Initialize Initialize s1,k) in dom stop WH4
            java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 7
     hence thesis by SCMPDS_6:def    proof
    A1:  hElementof holds  +  h  +h = h&exg
ing_ons1  A327A354A,Lm5A402,A403,A404java.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
A405;
A409:  WH4 is_halting_on s1,P
   proof
     P+*stop WH4 halts_on Initialize Initialize s1 by A408FUNCT_2: 1;
    hence thesis by SCMPDS_6:def 3;
   end;
  hence QuickSort(n,p0) is_halting_on s,P by A407,A1,SCPISORT:9;
  take f,g;
  thus len f=n & f is_FinSequence_on s,p0 & len g=n & g is_FinSequence_on
  IExec(QuickSort(n,p0),P,s),p0 by A293,A294,A325,A326;
  now
    let i be Nat;
    assume that
A410: 1 <= i and
A411: i <= len g;
    thus g.i=IExec(M4 ';' WH4,P,s).intpos(p0+i)
     by A326,A410,A411
      .=IExec(WH4,P1,Initialize s1).intpos(p0+i) by A409,A407,SCPISORT:7;
  end;
  then
A412  (.1 = ()H2
A413: (Initialize s1).GBP = s1.GBP by SCMPDS_5:15;
A414: (Initialize s1).DataLoc(0,1) = s1.DataLoc(0,1)theorem Th65:
A415:(Initialize s1)intpos (+) .p+  :;
A416: (Initialize s1).intpos((pn+1)+1) = s1.intpos((pn+1)+1) by SCMPDS_5:15;
 f is_FinSequence_on Initialize s1,p0
     proof let i be Nat;
      assume 1 <=      assume 1 <= 
       then f.i=s1.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
thesisbySCMPDS_515;
     end;
 hence thesis
     by Lm3,A325,  let java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
end;

begin :: The Basic Property of Quick Sort and Its Correctness

theorem
  card QuickSort(n,p0)=57 by Lm28;

theorem
  for p0,n being Nat st p0 >= 7 holds QuickSort(n,p0) is
  
proof
  let p0,n be Nat;
  assume
A1:  p0 >= 7;
  for s be State of SCMPDS,P
   holds QuickSort(n,p0) is_halting_on s,P
prooflets eStateofSCMPDS,;
    QuickSort(n,p0) is_halting_on Initialize s,P by A1,Lm28;
    hence thesis by SCMPDS_6:126;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  hence thesis by SCMPDS_6:21;


  assumecardH=1java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  for s being 0-started State of SCMPDS,p0,n being Nat st p0 >= 7
Tstlen=&f  sp0     java.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
  & g is_FinSequence_on IExec(QuickSort(n,p0),P,s),p0 & f,g
  are_fiberwise_equipotent & g is_non_decreasing_on 1,n by Lm28;theorem


Messung
CHZG
8110010093

¤ Dauer der Verarbeitung: 0.372 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,057
#Domains=861,589