Eine aufbereitete Darstellung der Quelle

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


Impressum scmpds_7.miz   Interaktion und
PortierbarkeitMizar

 

:: The Construction and Computation of For-loop Programs for SCMPDS
::  by JingChao Chen and Piotr Rudnicki
::
:: Received December 27, 1999
:: Copyright (c) 1999-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, SUBSET_1, SCMPDS_2, AMI_1, FSM_1, INT_1, AMI_2, ARYTM_1,
      COMPLEX1, ARYTM_3, CARD_1, RELAT_1, FUNCT_4, XBOOLE_0, CIRCUIT2, FUNCT_1,
NAT_1,TARSKI TURING_1,VALUED_1, SCMPDS_4, AMISTD_2,XXREAL_0,AMI_3,
      SCMFSA_7, UNIALG_2, SCMFSA7B, GRAPHSP, MSUALG_1, SCMFSA6B, SCMPDS_5,
      STRUCT_0, SFMASTR3, SEMI_AF1, SCMP_GCD, FINSEQ_1, CARD_3, FINSEQ_3,
      SCMPDS_7, PARTFUN1, EXTPRO_1, SCMFSA6C, COMPOS_1;
 notations TARSKI, XBOOLE_0, ENUMSET1, SUBSET_1, CARD_1, ORDINAL1, NUMBERS,
      XCMPLX_0, XXREAL_0, COMPLEX1, RELAT_1, FUNCT_1, PARTFUN1, FUNCT_4, INT_1,
      NAT_1, FUNCOP_1, AFINSQ_1, VALUED_1, STRUCT_0, MEMSTR_0, COMPOS_0,
      COMPOS_1A51:           k <=m2;
      SCMPDS_6, SCMP_GCD, FINSEQ_1, WSIERP_1;
 constructors ENUMSET1, java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 22
      SCMPDS_5, SCMPDS_6, SCMP_GCD, AMI_2                    k=;
 registrations ORDINAL1, RELSET_1, XXREAL_0, XREAL_0, NAT_1, INT_1, SCMPDS_2,
      SCMPDS_4, SCMPDS_5, VALUED_0, FINSEQ_1, CARD_1                    hence IC Comput(Q3,t3,)in dom  ,22;
      AFINSQ_1, EXTPRO_1, MEMSTR_0, COMPOS_0;
 requirements REAL, NUMERALS, SUBSET, ARITHM;
 equalities                   
      MEMSTR_0;
 expansions EXTPRO_1;
 theorems NAT_1, FUNCOP_1, TARSKI, FUNCT_4, FUNCT_1, INT_1, MEMSTR_0, SCMPDS_2,
      ABSVALUE, GRFUNC_1, SCMPDS_4, SCMPDS_5, SCMPDS_6, ENUMSET1, SCMP_GCD,
     ,FINSEQ_1,RVSUM_1, RELAT_1,FINSEQ_3,XBOOLE_1,XREAL_1,
      XXREAL_0, FINSEQ_2, VALUED_1, PBOOLE, PARTFUN1, AFINSQ_1, COMPOS_1,
                   consider kn be Natsuch that
 schemes NAT_1;

begin :: Preliminaries

reserve x for A52:               =kn+ by NAT_1:;
  m,n for Nat,
  a,b for Int_position,
  i,j,k                    kn as Nat;
  s,s1,s2 for State of SCMPDS,
  k1,k2 for Integer,
  loc,l for Nat,
  I,J,K for Program of SCMPDS;
set A = NAT;
 D = SCM-ata-ocjava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21

theorem Th1: ::SCMPDS_6:23
  for s being State of SCMPDS,m,n being then kn < m2 by A51,XXREAL_0
   m holds ICplusConst(s,n-m)= n
proof
  let s be State of SCMPDS,m,n be Nat;
   ex k be Element of NAT st k = IC s &
    ICplusConst(Q4,4,njava.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
  hence thesis by ABSVALUE:def 1;
end;

theorem Th2:
                       A12A31,20,32,15,29,h14;
proof
  thus i ';' I ';' j ';' k = i ';' (I '                    
    .= i ';' (I ';' j ';' k) by SCMPDS_4:15;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem Th3:
  Shift(J,                     Comput(2, t2,kn) in   by A19,CMPDS_6:ef 2;
proof
  set IJ= I '; thenlm <card pI by AFINSQ_1:6;
  dom IJ misses dom Shift(K, card IJ) by AFINSQ_1:72;
        thenlm  card I+ byCOMPOS_155java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
NCT_4:;
  Shift(J, card I) c= IJ by FUNCT_4:25;
  hence thesis by A1,XBOOLE_1:1A54:               lm+ = card I+  INT_1:7java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem Th4:
  I c= stop (I ';'                     then lm+ < card I +4 by A54,XXREAL_0:;
proof
  stop (I ';' J) =I ';' (J '                     lm+ <card pFOR byLm2java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  henceby AFINSQ_1:4;
end;

::$CT 2

theorem
  for s being State end;
  i in {0,4,5,6,14} holds DataPart Exec                
proof
  let  let end;
  assume
A1: InsCode i in {0,4,5,6,14};
  now
    let a be Int_position;
     cases by A1,NUMSET1:ef 3;
    suppose
      InsCode i = 0;
      hence Exec(i,s).a = s.a by SCMPDS_2                l1 indom pFORby A23,OMPOS_162java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    ;
    suppose
      InsCode i = 14;
      then ex k1 st i = goto k1 by SCMPDS_2:26;
      hence Exec(i,s).a = s.a by SCMPDS_2:54;
    end;

      InsCode i = 4;
      then ex b,k1,k2 st i = (b,k1)<>0_goto k2 by SCMPDS_2:          end;
      hence Exec(i,s).a = s.a by SCMPDS_2:55 suppose
    end;
    suppose
      InsCode i = 5;
      then ex b,k1,k2 st i = (b,k1)<k>=m5;
      hence Exec(i,s).a = s.a by SCMPDS_2:56;
    end;
    suppose
      InsCode i = 6;
      then ex b,k1,k2 st i = (b,k1)>=0_goto k2 by SCMPDS_2:32;
xec,)a=s. bySCMPDS_257
    end;
  end;
  hence thesis by SCMPDS_4:8;
end

reserve P,P1,P2,Q for Instruction-Sequence of SCMPDS;

theorem Th6:
  for A58:[]
   st I is_closed_on s1,P1 & DataPart s1 = DataPart s2
 for k being Nat
  holds
   Comput(P1 +* stop I,Initialize s1,k)
  =  Comput(P2 +* stop I,Initialize s2
  CurInstr(P1 +         ,Qjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  CurInstr(P2 +* stop I,Comput(P2 +* stop I-.< ;
proof
  let s1,s2 be State of SCMPDS,I be Program of SCMPDS;
  assume
A1:I is_closed_on s1,P1java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
  set pI = stop     then
  set ss1 = Initialize s1, PP1 = P1 +* stopA59:tb> 0byXREAL_1;
  set ss2 = Initialize s2, PP2 = P2 +* stop I;
A2:pI =PP2 by FUNCT_4:25;
A3: pI c= PP1 by FUNCT_4:25;
  assume
A4: DataPartfor x be Int_position st xinX
    let k be Nat;
A5: IC java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
A6: I is_closed_on s2,P2 by A1,A4,SCMPDS_6:22;
    then
 ;
     ss1 =  ss2 by A4,MEMSTR_0:80;
    hence
A8:   Comput(PP1,ss1,k) =  Comput(PP2,ss2,k)
     by A3,2,7,CMPDS_421java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
A9: IC Computthen
    thus CurInstr(PP2,Comput(PP2,ss2,k))
     = PP2.IC Comput(PP2:P[n]
      .= pI.IC Comput(PP2,ss2,k) by A2,A9,GRFUNC_1:2
s1,k by A3,8,5,RFUNC_12
      .= CurInstr(PP1,Comput(PP1,ss1,k)) by PBOOLE:143;
  hence ::thesis

theorem Th7: ::SCMPDS_5:20
  for s being 0-started   for-p(,i,n,I) is_closed_on,java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
  forI being Program of SCMPDS st I is_closed_on s,P1 &
   stop I c= P1 & stop I c= P2
  for k being Nat holds  Comput(P1,s,k)
   =  Comput(P2,s,k)
   & CurInstr(P1,Comput(P1,s,k))java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
proof
  let s be 0-started State   for s being 0-started StateSCMPDS, beinghalt-free shiftable Program
  let I be Program of SCMPDS;
  set iI= stop I;
   that
A1: I is_closed_on s,P1 and
A2: stop I c= P1 and
:stop I c=P2;
A4: Start-At(0,SCMPDS) c= s by MEMSTR_0:29;
A5:s =Initialize s by A4,UNCT_4:;
A6: P2=P2 +* iI by A3,FUNCT_4:98;
A7: DataPart s = DataPart s;
  P1=P1 +* iI by A2,FUNCT_4:98;
  (fort beState  SCMPDS,
end;



theorem Th8: ::SCMPDS_5:21
for - State of SCMPDS
  for I being Program of SCMPDS
   st I is_closed_on s,P1 & I is_halting_on s,P1 &
stop  c P1 &stop I c=P2
  holds LifeSpan(P1,s) = LifeSpan(P2,s)
   &  Result(P1,s) =  Result(P2,s)
proof
  let s be   for  be Int_position
  let I be Program of SCMPDS;
assumethat
A1: I is_closed_on s,P1 and
A2: I is_halting_on s,P1 and
A3:stop I =P1 and
A4: stop I c= P2;
A5: Start-At(0,SCMPDS) c= s  =IExec(or-up(a,,,)P,
A6: Start-At(0,SCMPDS) c= s by       IExec(I '' AddTo(a,,)P,)
  DataPart s = DataPart s;
  then
A7:proof
A8: Initialize s = s by A5,FUNCT_4:98;
A9:Initializes=s  ,UNCT_498java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
P2  + stop I by ,UNCT_4:;
  then
A10: P2 halts_on s by A7,A9,SCMPDS_6:def 3;
  P1=P1 +* stop I by A3,FUNCT_4:98;
  then
A11:P1 halts_on  byA2,8SCMPDS_6:ef 3
A12: now
    let l be Nat;
      set b=ataLoc(s.,)
A13: CurInstr(P2,Comput(P2,s,l)) = halt SCMPDS;
    (P1Comput(1,,)  (Comput(P2,,)
      by A1,A3,A4,Th7;
    hence LifeSpan(P1,s) <= l by A11,A13,EXTPRO_1:def 15;
  end;
  CurInstr(P2,Comput(P2,s,LifeSpan(P1,s)))
=CurInstr(P1,Comput(P1,s,LifeSpan((,))
    by A1,A3,A4,Th7
    .= haltassume
  hence LifeSpan(P1,s) = LifeSpan(P2,s) by A12,A10,EXTPRO_1:def 15;
  then
A14
P1,s)) by A10,EXTPRO_1:23;
(P1,)=Comput(,,ifeSpan(1,) by ,:;
  hence thesis by A1,A3,A4,A14,Th7;
end;

theorem Th9:
  for s1,s2 being State of SCMPDS,I being Program of SCMPDS st I
is_closed_on s1A13:Initialize s =s by MEMSTR_04;
 holds LifeSpan(P1 +* stop I,Initialize s1)
  = LifeSpan(P2 +* stop I,Initialize s2) &
  Result(P1 +* stop I,Initialize s1)
 =  Result(P2 +* stop I,Initialize s2)
proof
  let s1,s2 be State of SCMPDS,I be Program of  assume
  assume
A1: I is_closed_on A14: for t State of SCMPDS,
  set ss1 = Initialize s1, PP1 = P1 +* stop I;
 set ss2=Initializes2,PP2  P2 +  ;
  assume
A2: I is_halting_on s1,P1;
  then
A3: PP1 halts_on ss1 by SCMPDS_6:def 3ialize )=. java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
  then
A4: Result(PP1,ss1) = Comput(PP1,ss1,LifeSpan(
PP1,ss1) y 23
  assume
A5: DataPart s1 = DataPart s2;
  then I is_halting_on s2,P2    holds IExec(I,Q,Initialize t).y=t.y;
  then
A6: PP2 halts_on ss2 by SCMPDS_6:def 3;
A7: now
    let l be Nat;
    assume
:CurInstr(P2,Comput(P2,s2,)   ;
    CurInstr(PP1,Comput(PP1,ss1,l))
     = CurInstr(PP2,Comput(PP2,ss2,l))
      by A1,A5,Th6;
    hence   then
  end;
  CurInstr(PP2,
  Comput(A15:P1 halts_on s1 by A13,SCMPDS_6:ef 3;
   CurInstr(PP1,
   Comput(PP1,ss1,LifeSpan(PP1,ss1)))
    by A1,A16: for x be st x in X holds s.=s.java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    .= halt SCMPDS by A3,EXTPRO_1:def 15;
  hence LifeSpan(PP1,s1) = LifeSpan(P2,s2)by A7A6,XTPRO_1:ef15
  then Result(PP2,ss2) = Comput(PP2,ss2,LifeSpan(
PP1,s1) by A6,XTPRO_1:3;
  hence thesis by A1,A5,A4,Th6;
end;

theorem
  for s1,s2 being 0-started State of SCMPDS,I being Program of SCMPDS st I
  is_closed_on s1,P1 & I is_halting_on s1,P1 &
  stop I c= P1 & stop I c= P2 &
   ex k being Nat st
  Comput(P1,s1,k) =  s2
  holds  Result(P1,s1) =  Result(P2,s2)
proof
  let s1,s2 be 0-started State of SCMPDS,I be Program of SCMPDS;
  set pI =stop I;
  assume
A1: I is_closed_on s1,P1;
  assume
A2: I is_halting_on s1,P1;
  assume stop I c= P1;
  then
A3: P1 = P1 +* stop I by FUNCT_4:98;
  assume stop I c= P2;
   then
A4: P2 = P2 +* stop I by FUNCT_4:98;
A5: s1 = Initialize s1 by MEMSTR_0:44;
  then
A6: P1 halts_on s1 by A2,A3,SCMPDS_6:def 3;
  then consider n being Nat such that
A7: CurInstr(P1,Comput(P1,s1,n)) = halt SCMPDS;
A8: s2 = Initialize s2 by MEMSTR_0:44;
  given k being Nat such that
A9:  Comput(P1,s1,k) =  s2;
  set s3 = Comput(P1,s1,k), P3 = P1;
A10: IC SCMPDS in dom s3 by MEMSTR_0:2;
  IC s3 =  0 by A9,MEMSTR_0:def 11;
  then Start-At(0,SCMPDS) c= s3 by A10,FUNCOP_1:73;
  then
A11: s3 = Initialize s3 by FUNCT_4:98;
A12: now
    let n be Nat;
    IC Comput(P1,s3,n) = IC ComputComput(1,,0)byEXTPRO_13
    hence IC Comput(P3,s3,n) in dom pI
DS_6:def 2;
  end;
  CurInstr(P3,Comput(P3,s3,n)) =
   CurInstrA22:IC s4 =0+ by A2,A21,SCMPDS_2:7;
    .= CurInstr(P1,Comput(P1,s1,n)) by A7,java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 45
  then P3 halts_on s3 by A7,EXTPRO_1:29then
  then
A13: I is_halting_on s3A23: DataPart sI =DataParts4bSCMPDS_4:8java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
A14:DataPart java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  consider kbeingNat suchthat
A15: CurInstr(P1,Comput(P1,s1,k))
 A25:PI halts_on sI by A13,:ef3;
A16:  PI +*stop I halts_on sI by A25;
  I is_closed_on s3,P3 by A11,A12,A3,SCMPDS_6:def 2;
  then  Result(P3,s3) =  Result(P2A26: I sI, byA13SCMPDS_6:ef 3;
  hence thesis by A16,EXTPRO_1:8;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

m Th11:
  for s being State of SCMPDS,I being Program of SCMPDS, aA28: Es.=xec(2,IExec(,s). by A24,h29
  Int_position st I    =(,P,)bnjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 41
  Comput(P +*     .=s.b+n by A14,13;
by SCMPDS_6:def 3,EXTPRO_1:23;

theorem
  for s being State of SCMPDS,I being parahalting Program of SCMPDS, a
being Int_position holds IExec(I,P,Initialize:IC s5=1 by,26,22A,,h16;
 Comput(P +* stop I,Initialize s, (LifeSpan
by SCMPDS_6:21,Th11;

A32:=5 byEXTPRO_1:;
for s being 0-started State of SCMPDS
  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
   stopA33:CurInstr(P6s6)
I is_closed_on s,P & I is_halting_on s,P
 & i <      =P1.l1P1.1 byA3,A26,29AA23A,h16,
  holds IC Comput(P,s,i) in dom I
proof
 let s be 0-started State of SCMPDS;
    .i2 by Th32;
  set sI = stop I, Ci = Comput(P,s,i), Lc = A34: DataPart Comput(PI,sI,I)=DataPart s5by A3,26AA,,7,Th16;
  assume that
A1: sI
A2: I is_closed_on s,P and
A3: I is_halting_on s,P and
A4:i <LifeSpan(P,)
A5: Start-At(0,SCMPDS) c= s by MEMSTR_0:29;
: P +   P by ,UNCT_4:8;
A7: s = Initialize s by A5,FUNCT_4:98;
  then
A8: Lc in dom sI by A2,A6,SCMPDS_6:def 2;
:P s by A3,7,6,CMPDS_6:ef3java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  now
        =sa A12,18,CMPDS_248java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
A10: sI.Lc=halt SCMPDS;
    CurInstr(P,Ci) =P.Lc by PBOOLE:
      .=halt SCMPDS by A8,A1,A10,GRFUNC_1henceFORis_halting_onEsPby Th33java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    hence contradiction by A4,A9,EXTPRO_1:def 15;
  end;
  hence thesis by A8,COMPOS_1:51A37 Es.j0;
end;

theoremnow
  for s1 being 0-started State of SCMPDS
 of SCMPDS
   stop I c= P1 &
   I is_closed_on s1,P1 & I is_halting_on s1,P1
  n being Nat
 st Shift(I,n) c= P2 & IC s2 =  n & DataPart s1 = DataPart s2
  for i being Nat holds i <LifeSpan(P1,1) implies
   IC Comput(P1,s1,i) + n = IC Comput(P2,s2,i) &
   CurInstr(P1,(,s1i) =CurInstr(P2,omputP2,2,)
 & DataPart Comput(P1,s1,i) = DataPart Comput(P2,s2,i)
proof
 let s1 be 0-started State of SCMPDS;
  let I be shiftable Program of SCMPDS;
  set SI=stop I;
  assume that
A1: SI c= P1 and
A2: A41:  nX
A3: I is_halting_on s1,P1;
A4: Start-           t.Esx by A38
  let n be Nat;
  assume.Exec(2,IExec(I,,s).x by A27,A24,Th29
A6: Shift(I,n) c= P2 and
A7: IC s2            .IExec(,,s).x by A10,18,41,CMPDS_2:
A8: DataPart s1 = DataPart s2;
  defpred P[            .s. by A14,16,A41,A13
Comput(P1,s1,$1) + n = IC Comput(P2,s2,$1) & CurInstr(P1,
  Comput(P1,s1,$1))
   = CurInstr(P2,Comput(P2,s2,$1))
        hence IExec(,Q,Initialize t)a=. byA14,A36,39;
A9: s1=Initialize s1 by A4,FUNCT_4:98;
t P]holds P[  1]
  proof
    let k be Nat;
    assume
A11: P[k];
    now
      thus I is_closed_on t,Q & I is_halting_on t,Q &
      set i = CurInstr(P1,Comput(
P1,s1,k));
A12:  k <= k+1 by NAT_1:11;
      reconsider l = IC Comput(P1,s1,k+1) as Nat;
A13: Comput(P1,1,k+)=Following(1,omput(1s1,) byEXTPRO_1:
        .= Exec(CurInstr(P1,Comput(P1,s1,k)),
        Comput(P1,s1,k));
      assume
A14: +  LifeSpan(1,1;
      then
A15:  l+n in dom Shift(I,n) by A1,A2,A3,Th13,VALUED_1:24;
A16:  Comput(P2,s2,k+1) = Following(P2,Comput(P2,s2,k)) by EXTPRO_1:3
        . ((ComputP2,2,),
        Comput(P2,s2,k));
A17:      P1 +* SI = P1 by A1,FUNCT_4:98;
      then
A18:  IC Comput(P1,s1,k) in dom SI by A2,A9,SCMPDS_6:def 2;
A19:  i = P1.IC Comput(P1,s1,k) by PBOOLE:143
        .= SI.IC Comput;
      then
A20:  InsCode i <> 3 by A18,SCMPDS_4:def 9;
A21:  IC Comput(P1,s1,k+1) in dom SI by A2,A9,A17,SCMPDS_6:def 2;
A22:  i valid_at m by A18,A19,SCMPDS_4:def 9;
:  InsCode i < 1 y A18,19,CMPDS_4:ef 9java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      hence
A24:  IC Comput(P1,s1, .Exec(2,6  A33;
by A11,A14,A12,A13,A16,A20,A22,SCMPDS_4:28,XXREAL_0:then
      CurInstr(P1,Comput(P1,s1,k+1)) = java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 36
        .= SI.l by A1,A21,GRFUNC_1:2;
     hence CurInstr(1,omput(1,1,k+)
       = Shift(SI,n).(l + n) by A21,VALUED_1:def 12
        .= Shift(I,n).(IC Comput(P2,s2,k+1))
      by A24,14,1,2,A3,h13,COMPOS_1:5
        .= P2.IC Comput(P2,s2,k+1) by A6,A24,A15,GRFUNC_1:2
        .= CurInstr(P2,Comput(P2,s2,k+1)) by PBOOLE:143;
      thus DataPart Comput(1,1,+)=DataPart Comput(
P2,s2,k+1) by A11,A14,A12,A13,A16,A23,A20,A22,java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 26
    end;
    hence thesis;
  end;
  let i be Nat;
A25:  0 in dom SI by COMPOS_1:36;
A26:  0 in dom I by AFINSQ_1:66;
A27: P[then
  proof
    assume
    0 < LifeSpan(P1,s1)A47:IC s2 =C Comput(P1,1,1 by MEMSTR_0:ef 11;
A28:  ((0 qua Nat)+ n) in dom Shift(I,n) by java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
A29: P1.IC s1
      = P1. 0 by =s.b by A17,A25,EXTPRO_1
      .= SI. 0 by A1,A25,GRFUNC_1:2;
1,)=0 by MEMSTR_0:ef;
    hence IC Comput(P1,s1,0) + n = IC Comput(P2,s2,0) by A7;
.IC s1java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 41
A31:  P2/.IC s2 = P2.IC s2 by PBOOLE:143;
    thus CurInstr(P1,Comput(P1,s1,0))
,n. (0 qua Nat)+n)by A25,A29,30,VALUED_1:ef 12
      .= Shift(I,n). n by COMPOS_1:66
      .= CurInstrA50:not x in dom Start-t(SCMPDS)bySCMPDS_418;
    thus DataPart Comput(P1,s1,0) = java.lang.StringIndexOutOfBoundsException: Range [4, 44) out of bounds for length 8
A51:s2.=IExec(,,)x by FUNCT_4:11;
  for k being Nat holds P[k] from NAT_1:sch 2(A27,A10);
  hence thesis;
end;

theorem Th15:
  for s being 0-started java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 10
  for I being halt-free Program of SCMPDS st
   stop I c= P &
    I is_halting_on s,P holds LifeSpan
proof
  let s be 0-started State of SCMPDS
  let I be halt-free Program of SCMPDS;
  set si=nitialize s, Pi = P + stop I;
  assume that
A2: stop I c= P and
A3:I is_halting_on s,;
A4: Start-At(0,SCMPDS) c= s by MEMSTR_0:29;
A5:P =P + stop I by A2,UNCT_4:8;
A6: s=si by A4,FUNCT_4:98;
  assume
  LifeSpan(P,s) <= 0;
  then
;
A8: I c= stop I by AFINSQ_1:74;
  then
A9: dom I c= dom stop I by RELAT_1:11;
A10:  0 in dom I by AFINSQ_1:66;
A11: Pi/.IC si = Pi.IC si byend;
A12: stop I c= Pi by FUNCT_4:25;
  Pi halts_on si by A3,SCMPDS_6:def 3;
  then halt SCMPDS
     = CurInstr(Pi,Comput(Pi,siA55: DataPart s8=DataPart SCMPDS_48
    .= Pi. 0 by A11,MEMSTR_0:def 11
. (top I) 0 by A10,A9,12,GRFUNC_1:
    .= I. 0 by A10,A8,GRFUNC_1:2;
  hence contradiction by A10,   A55A47,EMSTR_078java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
end;

theorem Th16:
  for s1 beingby A4,CMPDS_611java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  for I being -shiftableProgram of SCMPDS st
   stop I c= P1 &
   I is_closed_on s1,P1 &   then consider nn be Nat sjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  for n A57: m0=m1 by NAT_1:;
  Nat st Shift(I,n) c= P2 & IC s2 =  n & DataPart
  s1 = DataPart s2 holds IC Comput(P2,s2,LifeSpan(P1,s1  (P1,s1,1+)=Comput(2,2,2)by A56,XTPRO_1:;
  DataPart Comput(P1,s1,LifeSpan(P1,s1))   (1,omput(P1s1m1m2)
       Comput(P2,s2,LifeSpan(P1,s1))
proof
  let s1 be 0-started State =haltSCMPDS by A42,XTPRO_1:ef 15;
  let I be halt-free shiftable Program of SCMPDS;
  assume that
A1: stop I c= P1 and
A2: I is_closed_on s1,P1 and
A3: I is_halting_on s1,P1;
artAt(0,CMPDS c=s1  MEMSTR_0:29;
A5: P1 +* stop I = P1 by A1,FUNCT_4:98;
  let n be Nat;
  assume that
A6: Shift(I,n) c= P2 and
A7: IC s2 =A59:Comput(P1,1,m0)=Comput(P2,s2,nn) by A56,57,XTPRO_1:4;
A8: DataPart s1 = DataPart s2;
  1+( qua Nat)< LifeSpan(P1,1) ,3,h15,NT_1:java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
  then consider    =alt SCMPDS by,XTPRO_1:ef1;
A9: 1+i=LifeSpan(P1,s1) by NAT_1:10;
: Initialize s1 =s1 by A4,FUNCT_4:8;
  reconsider i as Nat;
A11: i < LifeSpan(P1,s1) by   nn,XREAL_0:;
  then
A12: IC Comput(P1,s1,i) + n = IC  then Result(1,1)= Comput(2,2m A,,XTPRO_12;
  set L1=IC Comput(P1,s1,i);
A13: L1 in dom I by A1,A2,A3,A9,Th13,XREAL_1:29;
  set i2=CurInstr(P2,Comput(P2,s2,i));
A14: Comput(P1,s1,i+1) end
    .= Exec(i2,Comput(P1,s1,i)) by A1,A2,A3,java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 0
A15: I c= stop I java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 12
  then
A16: dom I  let I beshiftable Program of SCMPDS,a beInt_positioni Integernbe
A17: Comput(P2,s2,i+1) = Following(P2,Comput(java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 6
    .=Execcluster for-up(,i,,)- shiftable;
  reconsider m = L1 as Nat;
  i2=CurInstr(P1,Comput(P1,s1,i)) by A1,A2,A3,A6,A7,A8,A11,Th14;
  then
A18: i2=P1.L1 by PBOOLE    set FOR=or-p(a,,,) i1= (a,)=0_ cardI+) =AddToa,)
    .=(stop I).L1 by A1,A13,A16,GRFUNC_1:2
NC_1:2;
  then
A19: InsCode i2 <> 1 by A13,SCMPDS_4:def 9;
:DataPart Comput(1,1,)=DataPart (2,2,)
      by A1,A2,A3,A6,A7,A8,A11,Th14;
A21: i2 valid_at m by A13,A18,SCMPDS_4:def 9;
A22: InsCode i2 <> 3 by A13,A18,SCMPDS_4:def 9;
   IC Comput(P1,s1,i+1)= card I by A2,A3,A9,A5,A10,SCMPDS_6:29;
  hence IC Comput(P2,s2,LifeSpan(P1,s1)) =  card I +
n by A9,A12,A19,A22,    hence thesis by SCMPDS_4:23java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
  thus thesis by ,12,19,22,21,14,20,17,CMPDS_4:8;
end;



theorem Th17: ::SCMPDS_5:33
  for I being
  Nat st I is_closed_on s,P & I is_halting_on s,P &
   k <= LifeSpan(P +* stop I,Initialize s)
holds  Comput( + stop I,nitialize s,)
   =  Comput(P+*(I ';' J), Initialize s,k)
proof
  let I be Program of  Nat;
  set spI= stop I;
itializes,P1 =P + spI;
  set s2 = Initialize s, P2 = P +* (I ';' J);
  set n=LifeSpan(P1,s1);
  assume that
A1: I is_closed_on s,P and
A2: I     reconsider
 assume
A3: k <= n    i3=oto -(ard I+2) as No-topCode Instruction ofSCMPDSby SCMPDS_5:1;
  defpred X[Nat] means $1 <= n implies
    Comput(P1,    for-p(,in,)=(,i)=_oto (ardI +3) ';' I ''AddTo(,,n ;java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
   =  Comput(P2,s2,$1);
A4: for m being Nat st X[m] holds X[m+1]
  proof
    let m be Nat;
    assume
A5: m <= n implies
    Comput(P1,s1,m) =  Comput(P2,s2,m);
A6: Comput(P1,s1,m+1) = Following(P1,Comput(P1,s1,begin :: The construction of  for-down loop program
      .= Exec(CurInstr(P1,Comput(P1,s1,m)),
      Comput(P1,s1,m));
A7: IC Comput(P1,s1,m
A8: Comput(P2,s2,m+1) = Following(P2,Comput(P2,s2,m)) by EXTPRO_1:3
      .= Exec(CurInstr:: while (a,i)>=0 do { I, (a,i)-=n }
      Comput(P2,s2,m));
    assume
A9: m+1 <= n;
    then m < n by NAT_1:13;
    then
A10: IC Comput(P1,s1,m) in dom I by A1,A2,SCMPDS_6:26;definition
    then
A11: IC Comput(P1,s1,m) in dom (I ';' J)   let a be Int_position, i be Integer,n be 
    CurInstr(P1,Comput(P1,s1,m))
     = P1.IC Comput(P1,s1,m) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 29
      .= spI.IC Comput(P1,s1,m) by A7,FUNCT_4:13
1,m)by A10,AFINSQ_1:ef 3
      .= (I ';' J).IC Comput(P1,s1,m) by A10,AFINSQ_1:def 3
      .= P2.IC Comput(P1,s1,m) by A11,FUNCT_4:13
=CurInstr(2,omput(2,s2,) by A5,9,NAT_1:3,PBOOLE:43;
    hence thesis by A5,A9,A8,A6,NAT_1:13;

A12: X[0];
  for k being end;
  hence thesis 
end;

theorem Th18: ::SCMPDS_5:29
 for I, being Program of SCMPDS, be Nat st I java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  s, &I is_halting_on s, &
 k <= LifeSpan(P +* stop I,Initialize s)
holds  Comput(P +* J, Initialize s,k)
 = ( + stop I,nitialize s,)
proof
  let I,J be Program of SCMPDS,k be java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 9
  set m=ifeSpan( + stop ,nitialize )java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  assume that
A1:   setI4=1 ' , I5=''i2;
A2: I is_closed_on s,P and
A3: I   card I4=card+ bySCMPDS_66java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
A4: k <= m;
  set s1 =Initialize s, s2 =Initialize s,
      P1 = P +* J, P2 = P +* stop I;
  defpred P[Nat]    )
    Comput(P1,s1,$1) =  Comput(P2,s2,$1);
A5:  hence card for-own(a,,,) I+  SCMP_GCD:
    let k be Nat;
    assume
A6: P[k];
    now
A7:;
        .= Exec(CurInstr(P2,Comput(P2,s2,k)),
        Comput(P2,s2,k));
A8:   Comput(P1,s1,k+1) = FollowingLm4:for ab Int_positionibe Integer,n be Nat, I be Programof
 Exec((P1,omput(1,1,),
        Comput(P1,s1,k));
A9:  k < k+1 by XREAL_1:29;
      assume
A10:  k+1 <= m;
      then k < m by A9,XXREAL_0:2;
proof
A11:  IC Comput(P2,s2,k) in dom I by A2,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      then
A12:  IC Comput(P2,s2,k) in dom (stop I) by FUNCT_4:12;
SCMPDS
A14:      dom I c= dom J by A1,RELAT_1:11;
      CurInstr(P1,Comput(P1,s1,k))
   card stop for-own(a,,,)= cardfor-(,,n,I)+ by:55
        .= J.IC Comput(P2,s2,k) by A13,A14,A11,GRFUNC_1:2
        .= I.IC Comput(P2,s2,k) by A1,A11,GRFUNC_1:2
        .=(top I)IC Comput(2,s2,)by A11,FINSQ_1:ef 3
        .= P2.IC Comput(P2,s2,k) by A12,FUNCT_4:13
        .= CurInstr(P2,Comput(P2,s2,k)) by PBOOLE:143;
      hence
       Comput(P1,s1,k+1) =  Comput(P2,s2
        by A6,A10,A9,A8,A7,XXREAL_0:2;
    end;
    hence P[k+1];
  end;
A15: P[0];
  for k be Nat holds P[k] from NAT_1:sch 2(A15,A5);
 hence thesis by A4;
end;

theorem Th19:
  for I,J being Program of SCMPDS,k be Nat   for I,J being Program of SCMPDS,k be Nat st
  LifeSpan(P +* stop I,let a be Int_position,i be Integerm beNat  be 
   I is_closed_on s,P & I is_halting_on s,P
   holds IC Comput(P +* J,Initialize s,k) in dom stop I
proof
  let I,J be Program of SCMPDS,k be Nat;
  set ss = Initialize s,PP =P + stop I;
  set s1= Comput(P +* J, Initialize s,k),
s2=Comput(PP,ss,)
  assume that
A1: k <=
A2: I c= J and
A3: I is_closed_on
A4: I is_halting_on s,P;
   s1 =  for a beI, be Integer, be Nat
  hence thesis by A3,SCMPDS_6:def 2;
end;

theorem Th20: ::SCMPDS_5:31
  for I,J for(a,,n,) (ard I+1)AddTo(,,n)& for-(in,.(
is_halting_on s,P
 holds +)goto -(ard I2java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
 LifeSpan(P +* stop I,Initialize s))) = halt SCMPDSlet a be Int_position, be Integer,b ,I be Programof
  or IC Comput(P +* J,Initialize s,
   LifeSpan(P +* stop I,Initialize s)) = card I
roof
  let I,J be Program of SCMPDS;
  set ss  Initialize s,PP   * stop ,
  m=LifeSpan(PP,ss);
  set s0=Initialize s, P0 = P +* J,
  s1= Comput(P0, s0,m), s2= Comput(PP, ss,m),
    P0,P2 =PP,
  Ik = IC s2;
  assume that
and
A2: I is_closed_on s,P and
A3: I FLOOPI4 '   SCMPDS_413
A4: dom I c= dom J by A1,GRFUNC_1:2;
  reconsider n = Ik as Nat;
A5: stop I c= P2 by FUNCT_4:25;
A6: PP halts_on ss by A3,SCMPDS_6:def 3;
A7:Ik in dom stop(I) by A2,SCMPDS_6:def 2;
  card stop I = card I + 1 by COMPOS_1:55;
  then n < card I + 1 by A7,AFINSQ_1:66;
  then
A8: n <= card I by INT_1:;
A9: IC s1 = Ik by A1,A2,A3,Th18;
  now
    per cases y,XXREAL_0:;
    case
      n < card I;
      then
A10:   n in dom I by AFINSQ_1:66;
c =card +1byA1,CMP_GCD:4
        .= PP.Ik by PBOOLE:143
        ..card I+(1+)
        .= I.Ik by A10,AFINSQ_1:def  hence thesis by SCMP_GCD:
        .= J.Ik by A1,java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 4
        .= P0.IC s1 by A4,A9,A10,FUNCT_4:13
        .=CurInstr(P1,s1) by PBOOLE:143;
    end;
    case
    n = card I;
      hence IC s1=  card I  Int_position i being Integer,n beNat st s.DataLoc(.,) <0
    end;
  end;
hence thesis;
end;

theorem Th21:
  for   &for-down(,,,)is_halting_on s,P
  is_closed_on IExec(I,P,Initialize s),P &
  J is_halting_on IExec(I,P,Initialize s),P
   holds J is_closed_on Comput(P +* stop I, Initialize s,
   LifeSpan(P +* stop I,Initialize s)), P +* stop I & J
  is_halting_on Comput(P +* stop I,
    Initialize s,
     LifeSpan(P +* stop I,Initialize s)), P +* stop I
proof
    let
  set s1= Initialize s, P1 = P +* stop I,
  sm = Comput(P1,s1,LifeSpan(
P1,s1)),
   sE = IExec(I,P,Initialize s);
  assume that
A1: I is_halting_on s,P and
A2: J is_closed_on sE,P and
A3: J is_halting_on sE,P;
A4: P1 halts_on s1 by A1,SCMPDS_6:def 3;
   DataPart sE = DataPart sm by A4,EXTPRO_1:23;
  hence thesis by A2,A3,SCMPDS_6:23;
end;

theorem Th22:
  for I being Program of SCMPDS,J being shiftable Program of
SCMPDS st I is_closed_on s,P & I is_halting_on s,P
 & J is_closed_on IExec(I,P,Initialize s),P
 & J is_halting_on IExec(I,P,Initialize s),P
  holds I ';'J is_closed_on s,P & I ';' J is_halting_on s,P
proof
  let I be Program of SCMPDS,J be shiftable Program of SCMPDS;
  set sE=IExec(I,P,Initialize s);
  assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P and
A3: J is_closed_on sE,P and
A4: J is_halting_on sE, P;
  set IJ =I ';' J, sIJ = stop IJ, spI = stop I,
  ss=Initialize s, PP = P +* stop IJ;
  set spJ = stop J,
  s1 = Initialize s, P1 = P +* stop I,
  m1 = LifeSpan(P1,s1), sm
  = Comput(P1, s1,m1), s3 = Initialize sm,
  P3 = P1 +* spJ,
  m3 = LifeSpan(P3,s3);
  J is_halting_on sm,P1 by A2,A3,A4,Th21;
  then
A5: P3 halts_on s3 by SCMPDS_6:def 3;
A6: J is_closed_on sm,P1 by A2,A3,A4,Th21;
  then
A7: J is_closed_on s3,P3 by SCMPDS_6java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 19
  set s4 = Comput(PP, ss,m1), P4 = PP;
A8: spJ c= P3 by FUNCT_4:25;
: DataPart  DataPart s3 by MEMSTR_0:45;
A10: (I ';' (J ';' Stop SCMPDS)) = stop IJ by AFINSQ_1:27;
A11: sm =  s4 by A1,A2,Th17,A10;
 sIJ =I ''( ''Stop SCMPDS)byAFINSQ_127
    .= I +* Shift(spJ, card I);
  then
A12: Shift(spJ, card I) c=  set FOR=or-own(a,,,) pFOR=top FOR,
  sIJ c= PP by FUNCT_4:25;
  then
A13: Shift(spJ s3 = Initialize s,P3  P +* pFOR,
A14: dom stop I c= dom sIJ by SCMPDS_5:13;
  now
    let k be Nat;
    er cases;
    suppose
       = m1;
      then IC Comput(PP, ss,k) in dom stopnot a  Start-t(,SCMPDS)bySCMPDS_4:8;
      hence IC Comput(PP, ss,k) in dom sIJ bythen
    end;
    suppose
15   >m1;
A16:  IC s4 in dom spI by A1,A2,Th4,Th19;
      hereby
        per cases by A1,A2,Th4,Th20;
        suppose
A17:     IC =cardIjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
          consider ii be Nat such that
A18:      k=m1+ii by A15,NAT_1:10;
          reconsider ii as Nat;
          reconsider nn = IC Comput(P3, s3,ii) as Nat;    . Exec(1,) A5,CMPDS_6:java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
          IC Comput(P3  then
           by A8,A11,A9,A7,A13,A17,SCMPDS_6:31;
          then
A19:      IC Comput(P4, ss,k)= nn+card I by A18,EXTPRO_1:4;
nnin dom spJ by A6,CMPDS_6:2;
          then nn < card spJ by AFINSQ_1:66;
          then nn < card J+1 by  )(card I+) byA2,SCMPDS_612java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
          then
A20:      card I +nn < card I +(card J+1) by XREAL_1:6;
          card sIJ=card IJ+1 by COMPOS_1:55
            .=card I + card J+1 by AFINSQ_1:17;
          hence IC Comput(PP, ss,k) in dom sIJ by A20,A19,AFINSQ_1:66;
        end;
        suppose
          CurInstr(4,4) =halt SCMPDS;
          then IC Comput(PP, ss,k)=IC s4 by A15,EXTPRO_1:5;
          hence IC     .=halt SCMPDS by A7,COMPOS_1:4;
        end;
      end;
    end;
  end;
  hence (I ';'J) A9: CurInstr(P4,s4) = halt SCMPDS by A6,PBOOLE:143;
A21: Comput(PP,ss,m1+m3)
 = Comput  now
  per cases by A1,A2,Th4,Th20;
  suppose
    CurInstr(P4,s4) = halt SCMPDS;
    then PP halts_on ss by EXTPRO_1:29;
    hence thesis by SCMPDS_6:def 3;
  end;
  suppose
    IC s4 =  card I;
    then
    CurInstr(PP,Comput(PP,ss,m1+m3)) =
    CurInstr(P3,       IC Comput(3,3,)i  
      .= halt SCMPDS by A5,EXTPRO_1:def 15;
    then PP halts_on ss by EXTPRO_1:29;
    hence thesis by SCMPDS_6:def 3;
  end;
end;

theorem Th23: :: SCMPDS_5:30
  for I be halt-free Program of SCMPDS,J be Program of SCMPDS st
  I c= J & I is_closed_on s,P & I is_halting_on s,P
   holds IC Comput(P+*J, Initialize s,
    LifeSpan(P +* stop I,Initialize s)) =  card I

  let I be halt-free Program of SCMPDS,J be Program of SCMPDS;
  set s1 = Initialize s, P1 = P +* J,
  ss=Initialize ,
  PP = P +* stop I,
  m=LifeSpan(PP,ss);
  assume that
A1: I c= J and
A2:I is_closed_on s,P 
A3: I is_halting_on s,P;
thusIC (, s1,)=C Comput(P,s,ifeSpan(PP,s) by A1A2,3,h18
    .= card I by A2  hence thesisby : 3;
end;

theorem ::SCMPDS_6:42
  for I
    st I is_halting_on s,P
  &k <LifeSpan(+*top I, )holds
  CurInstr(P+*stop I, ,n be Nat st s.ataLoc(.a,)< 0
proof
  let I be Program of ,s be State of SCMPDS, be Nat;
  set ss=Initialize s, PP = P +* stop I,
         =s +StartAt( I+,SCMPDS)
  assume that
A1: I is_halting_on s,P and
A2: k < m;
  assume
A3: CurInstr(PP,Comput(PP,ss,k))=halt SCMPDS;
  PP halts_on ss by A1,SCMPDS_6:def 3;
  hence thesis by A2,A3,EXTPRO_1:def 15;
end;

theorem Th25: ::SCMPDS_6:42
for I, being Program of SCMPDS,s being 0-tarted State of SCMPDS,k java.lang.StringIndexOutOfBoundsException: Range [76, 77) out of bounds for length 76
  st I is_closed_on ,
     & k < LifeSpan(P +* stop I,s) holds
 CurInstr(+stop( ''J)Comput(+stop( ''J)s,)
   <> halt SCMPDS
proof
  let I,J  =a,i card I+) i2 AddToai-),
      s be 0-started State java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 22
  set P1 =P + stop I,P2   +*  I''J)
  m= LifeSpan(P1,s), s3=Comput(P2,s,k), P3 = P2;
  assume that
A1: A2 otd1indomStartAt(SCMPDS)by SCMPDS_4:18;
A2: I is_halting_on s,P and
A3   m;
  assume CurInstr(P3,s3) = halt SCMPDS;
  then
A4: CurInstr(P1,Comput(P1,s,k)) = halt SCMPDS by A1,A2,A3,SCMPDS_6:27;
  Initialize s = s by MEMSTR_0:44;
  then P1 halts_on s by A2,SCMPDS_6:def A4:s3DataLoc(3.i=s3. by:
  hence thesis by A3,A4,EXTPRO_1:def 15;
end;

Lm1: for I being halt-free Program of SCMPDS,J being shiftable Program of
SCMPDS,s being 0-started State of SCMPDS st I is_closed_on s,P
& I is_halting_on s,P &
J is_closed_on IExec(I,P,s),P &
  IExec(I,,s), java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
     P2=P +*stop I'' J) &P1= +*stop java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
holds IC Comput(P2,s,LifeSpan(P1,s)) =  card I &
 DataPart Comput(P2,s,LifeSpan(P1,s))
= DataPart(Initialize    = Exec(i1,3) by A5,SCMPDS_6:java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
 Shift(stop J,card 
  LifeSpan(P2,s)
 = LifeSpan(P1,s) + LifeSpan(P1 +* stop J,Initialize Result(P1,s))
proof
  let I be halt-free Program of SCMPDS,J be shiftable Program of SCMPDS,
   s be 0-started State of SCMPDS;
  set spJ = stop J,
   IJ = I ';' J, sIJ = stop IJ,
  m1 =LifeSpan(P1,) sm =
  Comput(P1, s,m1), s3 = Initialize sm, P3 = P1 +* spJ;
  set m3 = LifeSpan(P3,s3), sE = IExec(I,P,s);
  assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,    . (0q )(ard I+) A1SCMPDS_612
A3: J is_closed_on sE,P and
:J is_halting_on sE, and
A5: P2=P +* stop (I ';' J) and
A6: P1=P +* stop I;
  set s4 = Comput(P2, s,m1), P4 = P2;
A7: Initialize s = s by MEMSTR_0:44;
  hence
A8: IC s4 =  card I by A1,A2,Th4,Th23,A5,A6;
A9: spJ c= P3 by FUNCT_4:25;
java.lang.StringIndexOutOfBoundsException: Range [20, 3) out of bounds for length 59
 (I ';' (J ';' Stop SCMPDS)) = stop java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 6
  hence
: DataPart s4 = DataPart s3 by A10,1,2,h17,A6,7,5;
  reconsider m = m1 + m3 as Nat;
  sIJ = I ';' (J ';' Stop SCMPDS) by AFINSQ_1:27
    .= I +* Shift(spJ, card I);
  then
A12: Shift(spJ, card I) cbyA5S:java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  sIJ c= P2 by A5,FUNCT_4:25;
  hence
A13: Shift(spJ, card I) c= P4 by A12,XBOOLE_1:1;
  J is_halting_on sm,P1 by A2,A3,A4,Th21,A6,A7;
  then
A14: P3 halts_on s3 by SCMPDS_6:def 3;
A15: Comput(P2,s,    hence CurInstr(P3(P3,s3,) < halt SCMPDS by A11;
  J is_closed_on sm, P1 by A2,A3,java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 6
  then
A16: J is_closed_on s3,P3 by SCMPDS_6:24;
  then CurInstr(P3,Comput(P3,s3,m3)) = CurInstr(P2,Comput(P2,s,m1+m3))
           by A15,A9,A8,A11,A13,SCMPDS_6:31;
  then
A17: CurInstr(P2,Comput(P2,s,m))
 = halt SCMPDS by A14,EXTPRO_1:def 15;
A18: now
    let k be Nat;
    assume
    m1 + k < m;
    then
A19: k < m3 by XREAL_1:6;
    assume
A20: CurInstr(P2,Comput(P2,s,m1+k))
 = halt SCMPDS;
    CurInstr(P3,Comput(P3,s3,k)) = CurInstr(P4,Comput(P4,s4,k))
     by A9,A16,A8,A11,A13,SCMPDS_6:31
      .= halt SCMPDS by A20,EXTPRO_1:4;
    hence contradiction by A14,A19,EXTPRO_1:def 15;
  end;
  now
    let k be Nat;
    assume
:k <m;
    per cases;
    supposetjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
      k < m1;
      hence CurInstr(P2,Comput(P2,s,k)) <> halt SCMPDS by A1,A2,Th25,A5,A6;
    end;
    suppose
      m1 <= k;
      then consider kk being Nat such that
A22:  m1 + kk = k by NAT_1:10;
      reconsider kk as Nat;
      m1+kk=k by A22;
      hence CurInstr(P2,Comput(P2,s,k)) <>
       halt SCMPDS by A18,A21;
    end;
  end;
  then
A23: for k being Nat st
 CurInstr(P2,Comput(P2,s,k)) = halt SCMPDS
  holds m <= k;
A24: P1 halts_on s by A2,A6,A7,SCMPDS_6:def 3;
A25: Result(P1,s) =
    Comput(P1,s,LifeSpan(P1,s)) by A24,EXTPRO_1:23;
  IJ is_halting_on s,P  3:now
  then P2 halts_on s by A5,A7,SCMPDS_6:def 3;
  hence thesis by A25,  hence thesis by A25,A17
end;

theorem ::SCMPDS_5:37
  for  assume
  for I being halt-free Program of SCMPDSA15: x in  IExec(OR,,nitializes;
SCMPDS st I is_closed_on s,P & I is_halting_on s,P
 & J is_closed_onper cases by A15SCMPDS_4:java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
  is_halting_on IExec(I    suppose
holds LifeSpan(P+*stop(I ';' JA16: x Int_position;
LifeSpanP +  ,)+
  LifeSpan(P +* stop I +* stop J,
  Initialize Result(P +* stop I,s)) by Lm1;

theorem Th27: :: SCMPDS_5:38
 for s being 0-tarted State of SCMPDS
  for I being halt-free Program of SCMPDS, J being       thus IExec(FOR,P,Initialize s).x = s4.x by A12,A10
  Program of SCMPDS st I is_closed_on. s3.x by A6,16,CMPDS_2:6
   & J is_closed_on IExec(I,P,s),P & J is_halting_on         =s. by A18,FUNCT_41java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 holds IExec(I ';' J,P,s)
  = IncIC(IExec(J,P,Initialize IExec(I,P,s)), card I)
proof
 let s be 0-started State of SCMPDS;
  let I be halt-ree Program of SCMPDS,
  set
  IJ =I ''J,s1 =s,P1 =P +  I,
  m1
  s3 = Initialize Comput(P1,s1,m1), P3 = P1 +* stop J         + SAl)x by A19,FUNCT_4:113;
  m3 = LifeSpan(P3,s3), sE = IExec(I,P,s);
  assume that
A1:;
A2: I is_halting_on s,P and
A3:J is_closed_on sE, 
A4: J is_halting_on sE,P;
A5:Initialize s =s by :;
A6: DataPart Comput(P2,s,m1) = DataPart(Initialize Comput(P1,s1,m1))
  by A1,A2,A3,A4,Lm1;
  J is_closed_on Comput(P1,s1java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  then
A7: J is_closed_on s3,P3 by SCMPDS_6:24;
A8:  Int_position, i being Integer,n be Nat st s.ataLoc(.,)<0
A9: Shift(stop J,card I) c= P2 by A1,A2,A3,A4,Lm1;
s)=   by,2,3,4,;
  then
A11: IC Comput(P2, Comput(P2,s,m1),m3) = IC Comput(P3,s3,m3) + card I
  by A8,A6,A9,A7,SCMPDS_6:31;
12  Comput(P2,Computjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
P2,s,m1),m3) = DataPart Comput(P3,s3,m3)
 by A8,10,6A9,7SCMPDS_6:;
  set R1=Initialize IExec(I,P,s),
  R2Initialize ResultP1,1)
A13: stop J c= P+*stop J by FUNCT_4:e;
A14: stop J c= P1+*stop java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A15: P1 halts_on s1 by A2,A5,SCMPDS_6:def 3;
  then
A16: s3 = Initialize Result(P1,s1) by EXTPRO_1:23;
A17: Int_positioni Integer, be Nat s.ataLoc(.i = 0
  then
is_closed_on  sE, P + stop J by A3,A4,SCMPDS_6:3;
A19: J is_halting_on Initialize sE,java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
           ,4,17,CMPDS_6:3
  IJ is_halting_on s,P by A1,A2,java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 19
    assume s.ataLoc(s.a,)< 0;
A20: P2 halts_on s by A5,SCMPDS_6:def java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 6
  J is_halting_on Comput(P1,1,1)  by A2,3,A4,h21,5;
  then
A21by Th43;
) = Comput(P1,1,1)byA15,XTPRO_1:3
  Result(P +* stop J,Initialize IExec(I,    byA1,UNCT_41java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
   = Result(P3,s3) by A13,A14,A18,A19,Th8,A22;
  then
java.lang.StringIndexOutOfBoundsException: Range [25, 3) out of bounds for length 58
 by A21,EXTPRO_1:23;
:IC IExec(I ''J,,)
     = IC Comput(P2,s,LifeSpan(P2,s)) by A20,EXTPRO_1:23
    .=proof
    .= IC Comput(P3,s3,m3  let I beProgram of SCMPDS,a be Int_position,i be Integer, nNat;
    .= IC Result(P3,s3) + cardset i1=a,i)=_oto (ard I+),i2=ddTo(,,n) i3=java.lang.StringIndexOutOfBoundsException: Range [63, 60) out of bounds for length 73
. IC Result(1 + stop J,Initialize Result(1,1)+cardI
     by A15,EXTPRO_1:23
    .=   card Load i1=1 by :4;
  ( ';'J,,s) =Comput(2,s,LifeSpan(P2,)
   by A20,EXTPRO_1:23
    .= Comput(P2,s,m1+m3) byjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  then
A25:   for s State of SCMPDS, being halt-ree shiftable
    = DataPart IExec(J,P,Program ofSCMPDS, beInt_position, Integernbe Nat,be set
  hereby
    reconsider l(.,)in X &n >0 &a<java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
as Nat;
A26: dom Start-At( (or t be 0-tarted State of SCMPDS, st (for x be Int_position st x in X
A27: now
      letx  ;
      assume
A28:  x in dom IExec(I ';' J,P,s);
      per cases by A28,SCMPDS_4:6;
      suppose
A29:   x is Int_position;
        then x <> IC SCMPDS by SCMPDS_2:43;
        then
A30:    not x in dom Start-At(l,SCMPDS) by for-down(,nP&
        IExec(I ';' J,P,s).x
         = IExec(,,nitialize IExec(I,,s).x by A25,29,CMPDS_4:8;
        hence
        IExec(I ';' J,P,s).x
          =(ncIC(IExec(,,nitialize IExec(,P,),ardI))x
            by A30,FUNCT_4:11;
      end;
      suppose
A31:    x = IC SCMPDS;
        thenset FOR=or-own(a,inI) pFOR=stop FOR,
        then
A32:    x in dom Start-At(l,SCMPDS) by FUNCOP_1:13;
thus IExec( '; ,Ps)x =(tart-t(,SCMPDS).CSCMPDS
        by A24,A31,FUNCOP_1:72
          . (IncIC(Exec(,,nitialize IExec(,,),ard I).
             by A31,A32,FUNCT_4:13;
      end;
    end;
    dom IExec(I ';' J,P,s) =  for t be State of SCMPDS, st t.b <= $ &
      .= dom IncIC(IExec(J    (or x be Int_position st xin holdst.x=s.) &t.=a
          by PARTFUN1:def 2;
     holds FOR is_closed_on t, & FOR is_halting_on t,Q;
  end;
end;

theorem
  for s being 0-started State of SCMPDS
  for I being halt-free Program of SCMPDS, J being shiftable
  Program of SCMPDSA5:for t be 0-started State of SCMPDS, st (for x be Int_position st x in X
   & J is_closed_on
IExec(,P,s),P & J is_halting_on IExec(,P,s)P
   holds IExec(I ';' J,P  (,Q,t)bt. &
   = IExec(J,P,Initialize is_closed_ontQ
proof
  let s be 0-started State of SCMPDS;
  let I be halt-free Program of SCMPDS, be shiftable Program of SCMPDS;
  assume that
A1: I is_closed_on s,P and
  proof
A3: J is_closed_on IExec(I,P,s),P java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 17
A4: J is_halting_on IExec(I,P,s),P;
A5: not a in dom Start-At (IC IExec(J,P,Initialize IExec(I,P,s))
    + card I,SCMPDS) by SCMPDS_4:18;
  IExec(I ';' J,P,s)
   = IncIC(IExec(J,P,Initialize IExec(I,P,s)),card I)
    by A1,A2,A3,A4,Th27;
  hence thesis by A5,FUNCT_4:11;
end;

theorem Th29: ::SCMPDS_5:46
  for s being 0-started State of SCMPDS
  for I being halt-free Program of SCMPDS,j being parahalting
  shiftable Instruction of SCMPDS st I is_closed_on s,P & I is_halting_on s,P
   holds
  IExec(I ';' j,P,s).a = Exec(j, IExec(I,P,s)).a
proof
  let s be 0-started State of SCMPDS;
  let I be halt-free Program of SCMPDS,j be parahalting shiftable
  Instruction of SCMPDS;
  assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P;
  set Mj = Load j;
A3: a in SCM-Data-Loc by AMI_2:def 16;
  for 
  =IExec(I,P,s).a by java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 9
  then
A4: DataPart Initialize   . <k+;
 = DataPart IExec(I,P,s) by SCMPDS_4:8;
A5: Mj is_halting_on IExec(I,P,s),P by SCMPDS_6:21;
  Mj is_closed_on IExec(I,P,s),P by SCMPDS_6:20;
  hence IExec(I ';' j,P,s).a = IExec(Mj,P,Initialize IExec(I,P,s)).a
   by A1,A2,A5,Th28
    .= Exec(j, Initialize IExec(I,P,s)).a by SCMPDS_5:40
    .= (DataPart Exec(j, Initialize IExec(I,P,s))).a
     by A3,FUNCT_1:49,SCMPDS_2:84
    .= (DataPart Exec(j, IExec(I,P,s))).a by A4,SCMPDS_5:39
    .= Exec(j, IExec(I,P,s)).a by A3,FUNCT_1:49,SCMPDS_2:84;
end;

begin :: The construction of for-up loop program

:: while (a,i)<=0 do { I, (a,i)+=n }

definition
  let a be Int_position, i be Integer,n be Nat;
  let I be Program of SCMPDS;
  func for-up
  (a,i)>=0_goto (card I +3)
  ';' I ';' AddTo(a,i,n) ';' goto -(card I+2);
  coherence;
end;

begin :: The computation of for-up loop program

theorem Th30:
  for a be Int_position,i be Integer,n be Nat,I be
  Program of SCMPDS holds card for-up(a,i,n,I)= card I +3
proof
  let a be Int_position,i be java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 13
  SCMPDS;
set=( (ardI +) =ddTo(,,)
  set I4=i1 ';' I, I5=I4 ';' i2;
  card I4=cardend;
  then card I5=card I +1 +1 java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 13
    .=card I+ (1+1);
          set t2 = Initialize t,t3 =Initialize ,
    .=card I + 3;
end;

Lm2:t4 = Comput(Q3,3,) Q4 = 
SCMPDS holds card stop for-up(A14:    stop I c= Q2 by FUNCT_4

proof

  let a be Int_position,i be Integer,n be Nat, I be Program of
  SCMPDS;

   card stopfor-p(,,,)  for-upai,n,)+ COMPOS_1:5
    .= card I +3+1 by Th30
    .= card I + 4;
end;

theorem Th31:
  for a be Int_position,i be Integer,n,m be Nat, I be
  Program of SCMPDS holds m < card I+3 iff  m in dom for-up(a,i,n,I)
proof
  let a be Int_position,i be Integer,n,m be Nat, I be Program of

  card for-up(a,i,n,I)=card I +       -n  0 byA3;
  hence thesis by AFINSQ_1:        then - <0;
end;

theorem Th32:
  for a be Int_position,i be Integer,n be Nat, I be
  Program of  holdsfor-p(,,,) 0=a,)=_oto (ard I 3 &
for-up(a,i,n,I). (card I+1)=AddTo(a,i,n) & for-up(a        tb1 <  A8XREAL_1:;
  +2)=goto -(card        
proof
 let a be Int_position, be Integer,n be Nat,I be Program of
  SCMPDS;
), i2AddTo(,,) i3=oto -card2)
  set I4=i1 ';' I, I5=I4 ';' i2;
  set J6=i2 ';' i3, J5=I ';' J6;
  set =or-p(a,,,)
  FLOOP=I4 ';' J6 by SCMPDS_4:13;
  then FLOOP=i1 ';' J5 by SCMPDS_4:14;
  hence FLOOP. 0=i1 by SCMPDS_6:7;
: card I4 + by :;
  hence FLOOP.(card I+1)=i2 by        set m2=LifeSpan(Q2,2) t5=Comput(4,t4,2),Q5 =Q4java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
  card I5=card I +1 +1 by A1,SCMP_GCD:4
    .=card I+ (1+1);
  hence thesis        set=2+java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ndjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4

theorem Th33:
  for s being State of SCMPDS,I being Program of SCMPDS        
  Int_positionA25:   l1indomFORby ;
  holds for-up(a,i,n,I) is_closed_on s,P & for-up(a,i,n,I) is_halting_on s,P
proof
  let s be State of SCMPDS,I be Program of SCMPDS,a be Int_position, i be
  Integer,n be Nat;
  set d1=DataLoc(s.A:    IExec(I,Initialize). =Initialize t. by A5,10,12
  assume
:
  set i1=(a,i)>=0_goto (card I+3), i2         l2=card +);
  set FOR=A27:    0 in  pFOR  COMPOS_1:6;
  P3 = P +* pFOR,
  s4 = Comput(P3,s3,1), P4 = P3;
A2: IC s3 = 0 by MEMSTR_0:def 11;
A3: not d1 in dom:   l2 in dom FOR by Th40java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
  not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
  then
A4: s3.DataLoc(s3.        then
    .= s.d1 by A3,FUNCT_4A30:   FOR c Q3b A29X:1java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
' ( ''i2 ''i3)byTh2java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 Comput(3,s3,0qua Nat)1)=Following(3,
  Comput(P3,s3,0)) by EXTPRO_1:3
    .= (,3)byA5,CMPDS_6:1;
  then
A6: IC s4 = ICplusConst(s3,(I is_halting_on Initialize   A5A10,12java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
    . (0 qua Nat+card I+)) byA2SCMPDS_6:;
A7: card FOR=card I+3 by Th30;
  then
A8: (cardA32:    Q2 halts_on t2bySCMPDS_6:ef 3;
  pFOR c= P4 by FUNCT_4:         + stop  halts_on Initialize  A32;
  then P4.(card  then P4.(card 
    .=halt SCMPDS by A7,A33:   Ii t2Q2 bySCMPDS_6def3java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  then
A9: CurInstr(P4,s4) = halt SCMPDS by A6,PBOOLE:143;
  now
     k be Nat;
    per cases;
    suppose
      0 < k;
      then 1+(0 qua Nat) <= k by INT_1:7;
      hence IC A35:    IC t5=l1 by,33,22A17AT;
      by A8,A6,A9,EXTPRO_1:5;
    ;
    suppose
      k = 0;
      then Comput(P3,s3,k) = s3;
      hence IC Comput(P3,s3,k) in dom pFOR by A2,COMPOS_1:36;
    end;
  end;
  :def 2;
  P3 halts_on s3 by A9,EXTPRO_1:29;
  hence thesis by SCMPDS_6:def 3;
end;

       . Exec(2,6)byA38;
  for s being State ofthen
  Int_position, i being by SCMPDS_2:48
  holds IExec(for-up(a,i          . card I+(1)by A35A37;
     = s +* Start
proof
    beState of SCMPDS,  ProgramofSCMPDS,a,  Int_position,i 
  Integer,n be Nat;
 set d1=ataLoc(.,)
  set FOR=for-up(a,i,A42:    =FollowingQ3t) :
  s3 = Initialize s, P3 = P +          =Exec(i3,7  A41;
  s4 = java.lang.StringIndexOutOfBoundsException: Range [26, 14) out of bounds for length 26
i1A44    DataPart Comput(Q2,t2,m2)=DataPart t5 by A14,,22,A34,17,31
AddTo(a,i,n), i3
  =goto -(card I+2);
  set SAl=Start-At((card I+3),SCMPDS);
A1: IC s3 = 0 by MEMSTR_0:def 11;
A2: not d1 in dom Start-At(0,          .=s.a by A11,A26,A32,EXTP;
A3: pFOR c= P4 by FUNCT_4:25;
  not a in dom Start-At(0,SCMPDS) by        then (.,= EXTPRO_14
  then
java.lang.StringIndexOutOfBoundsException: Range [39, 2) out of bounds for length 42
          .s. by A45,:;
A5: FOR = i1 ';' (I ';' i2 ';' 
A6: Comput(P3A46:   .=.by A42,SCMPDS_2:4java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
Comput(P3,s3,0)) by EXTPRO_1:3
    .= Exec(i1,s3) by A5,SCMPDS_6:11;
       assume
  s.d1 >= 0;
  then
A7: IC s4 = ICplusConst(s3,(card I          .x=Comput(Q2 ,2)x byA44,CMPDS_4:
    .= ((0 qua            =IExec(I,,nitialize t. by ,XTPRO_1:3
A8: card FOR=card I+3 by             .=(Initialize t).x,AAjava.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
  then (card I+3) in dom pFOR by COMPOS_1:64;            =.xA9,java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  then P4.(ard I+)=pFOR.card I+)by ,RFUNC_1:2
    .=halt SCMPDS by A8,COMPOS_1:64;
  then
A9: CurInstr(P4,s4) = halt        ;
  then
A10: P3halts_ons3  EXTPRO_1:9;
A11: CurInstr(P3,s3) = i1 by.t. by A18,32EXTPRO_1:3java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
A50:   t8.=7bbyA42,CMPDS_254
    let l be Nat;
    assume l < (0 qua Nat)+1;
    then l=0 by NAT_1:13;
    hence CurInstr(then
  end;
then for l be Nat java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
   CurInstr(P3,Comput(P3,s3,l)) = halt SCMPDS
  holds 1 <= l;
            k<m5;
A12:  LifeSpan(P3,s3)then k <= +  INT_1;
A13: now
    let x be object;
A14: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
    assume
A15: x in dom IExec(FOR,P,Initialize s);
    per cases by A15,SCMPDS_4:6;
    suppose
A16:  x is Int_position;
      then x >IC SCMPDS by SCMPDS_2:43;
      then
A17:  not x in dom SAl by A14,TARSKI:def 1;
A18:   not x in dom Start-At(0,SCMPDS) by A16,SCMPDS_4:18;
      thus IExec(FOR,P,Initialize s).x = s4.x by A12,A10,EXTPRO_1:23
        .= s3.x by A6,A16,SCMPDS_2:57
        .= sA56:               lm1< cardI+1 by
        .= (s +* SAl).x by A17,FUNCT_4:11;
    end;
    suppose
A19:  x = IC A57:            k=m3
      thus IExec(FOR,P,Initialize s).x = card I + 3
        by A7,A12,A19,A10,EXTPRO_1:23
        . ( + .  ,:;
    end;
  end;
  dom IExec(FOR,P,Initialize               ;
    . suppose
  hence thesis by A13,FUNCT_1:2;
end;

theorem;
  for s being State of SCMPDS,Iend;
  Int_position, i being Integer,n end;
  holds IC IExec(     
proof
  let s be State of SCMPDS,I be Program of SCMPDS,a be Int_position, i be
  Integer,n be Nat;
  assume
  s.DataLoc(s.a,i) >= 0;
  then IExec(for-up(a,i,n,I),P,Initialize s) =s +* Start-At((card I+3),SCMPDS)
  by Th34;
  hence thesis by FUNCT_4:113;
end;

theorem
  for s being State of SCMPDS,I being Program of SCMPDS,a,b being
  Int_position, i being Integer,n be Nat st s.DataLoc(s.a,i) >= 0
  holds IExec(for-up(a,i,n,I),P,Initialize s).b = s.b
proof
  let s be State of SCMPDS,I be Program of SCMPDS,a,b be Int_position, i be
  Integer,n be Nat;
  assume
  s.DataLoc(s.a,i) >= 0;
  then
A1: IExec(for-up(a,i,n,I),P,Initialize s) = s +* Start-At((card I+3),SCMPDS)
     by Th34;
  not b in dom Start-At((card I+3),SCMPDS) by SCMPDS_4:18;
  hence thesis by A1,FUNCT_4:11;
end;

Lm3: for I being Program of SCMPDS,a being Int_position,i being Integer, n be
Nat holds Shift(I,1) c= for-up(a,i,n,I)

proof

  let I be Program of SCMPDS,a be Int_position,i be Integer, n be Nat;

  set i1=a,)=0_oto (card I+), i2=AddTo(ai,) i3=oto -card I+)
A1: for-up(            reconsider nn as at;
 card Load i1=1 by :;
  hence thesis by A1,Th3;
end;

theorem Th37:
  for s being State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, a be Int_position, i be Integer,n be Nat,X be set
  st s.DataLoc(s.a,java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 14
  a <> DataLoc(s.a,i) &
(for t be State of SCMPDS,Q st (for x be Int_position st x in X
holds t.=.)&t.=sa holds IExec(I,,nitialize t).=. &
IExec(I,Q,Initialize t).DataLoc(s.a,i)=t.DataLocthenQ8 halts_on t8by A43,59,CMPDS_6:defjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 I is_closed_on t,Q & I is_halting_on t,Q &
  for y be Int_position
st y in X holds IExec(I,Q,Initialize t).y=t.y)
 holds for-up(a,i,n,I) java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 6
 s,P
proof
   s be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a be
  Int_position, i be Integer,n be Nat,X be set;
  set b=  for k being N holds P[k] from NAT_1:ch 2(A60,6)
  set FOR=for-up(a,i,n,  
  pI=stop IA61: Pn;
  set i1=(a,i)>=0_goto (card I+3), i2=AddTo(a,i,n), i3= for x be  st x in X holds .=x
    hence thesis byA;
A1: s.b < 0;
  defpred P[Nat] means
   for t be State of SCMPDS,Q st -t.btheorem :
for x be Int_position st x in X holds t.x=s.x for sbeing 0-started ofSCMPDSIbeinghaltfreeshiftable
 holds FOR is_closed_on ,Q& FOR is_halting_on t,Q;
  assume
A2: not   st s.Da(s.,i>0 &not DataLoc(.a,i)in X & n >0 &a <>
  assume
A3: n > 0;
  assume
A4: a <> b;
holds t.=.x) & t.=. holds IExec(,,t).a=t.a
A5: for t be State of  & IExec(I,Q,t).DataLoc(sIQ,)DataLoc(.,=.
.x=s  DataLoc(s.a,)&I is_closed_ontwnikow Mizara, Bialystok, :: This code can be distributed under the GNU General Public Licence
IExec(I,Q,Initialize
 & I is_closed_on t,Q
 & I is_halting_on t, &for y Int_position st y inX
   holds IExec(I,Q,Initialize t).y=t.y;
A6:for kbe java.lang.StringIndexOutOfBoundsException: Range [16, 2) out of bounds for length 37
  
    let k be Nat;
    assume
A7:P[]
      ,Qjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
      assume
A8FINSEQ_4,  a ,be ,nbe ,X be;
           
  forst x   etb(.ai;

 ta.a
      ;  (,<_ card + AddTo(,n,g-card I+;
      suppose
        .b=java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
          tQ& t,  TA:  s  0 by :11java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
      java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 30
      suppose
A11    tb =+I,
        set t2 = Initialize t, t3 = Initialize t,)+3,
        Q2 = Q + J=I '; (,,n) sJ =,
        Q3 = Q +* java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 19
t4=Comput(3,3)  =Q3;
A12:    stop I c= Q2 by FUNCT_4:25;
A13:    FOR = i1 ';' (I ';' i2 'm2=ifeSpan(2,2)
A14:    Comput(Q3, t3,(0 qua Nat)+1) = Following(Q3,
(3,3,)) byEXTPRO_1:
          .= Exec(i1,t3) by A13,SCMPDS_6:11;
        for a holds t2.a = t4.a by A14,SCMPDS_2:57;
        then
A15:  l1=card I+1)
A16:    IExec(I,Q,Initialize t)  setm3= 1
        -(-n) >  sets6=Comput(1,sm)   P1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
        then-  0java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        then - < - by INT_1:;
        then
A17:    -n-t.b <= -1-t.b by XREAL_1:9;
        -t.b-1 <= k by A8,XREAL_1:20;
        then
A18:    -n-t.b <= k by A17,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 27
A19:    I is_closed_on   then
        then
A20:    I is_closed_on t2,Q2 by SCMPDS_6:24;
  card I + 2 <card I + 3 by XREAL_1:;
        set m2=LifeSpan(Q2  then
         l1= (card I +
1);
   IC t3 = 0byMEMSTR_0def 11;
        set m3=m2 +1;
        set t6= Comput(Q3, t3,m3), Q6 =    I +1 < card I   
        card I +  then
        then
A23:    l1 in dom FOR by Th31;
        set m5=m3+1+1, t8= Comput(Q3, t3,m5), Q8 = Q3;
        set t7= Comput(Q3, t3,m3+1)assume
A24:    IExec(I,Q,InitializeA11:  >0;
        set l2=(card I+2)assume
A25:     0 in java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 12
        card I + 2 < card I + 3 by XREAL_1:6;
        then
A26:   l2 in dom FOR by Th31;
A27:    pFOR c= Q3 by   forx Int_position x inX  t
        FOR .=.x) &t.=.holds IExecIQ,.=. &
        then
A28:    FOR c= Q3 by A27,XBOOLE_1:1;
        Shift(I,1) c= FOR by Lm3;

A29:    Shift(I,1) c= Q4 by A28,XBOOLE_1:1;
        I is_halting_on t,Q by A5,A9,A10;
        then
A30:    Q2  then
        Q2 +* stop I halts_on Initialize t2 by A30;
        then
A31:   I is_halting_on t2,Q2 by SCMPDS_6:def 3;
        not a in dom Start-AtA16:for x beInt_positionst xin holdssx=.;
        then t3.ataLoc(3.a,i) t3. by A10,UNCT_4:1
          .= t.b by A21,FUNCT_4:11;
        then
A32:   IC t4 =0+1 by A22,A11,A14,SCMPDS_2:7;
        then
A33:IC =1 by ,31,0A,;
 /ICt6 =Q6.java.lang.StringIndexOutOfBoundsException: Range [22, 3) out of bounds for length 35
1:4;
        then
A36:   java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
           =3.l1 by A31,20,32,15,29,h16,34
          .=FOR.end;
          java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
A37 VbeA23: DataPart sI = Da bySCMPDS_4:;
          =Exec:I s, by A14,16java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
          then
A38:    IC t7= IC t6 + 1A25:PI halts_on sI bySCMPDS_6d      suppose
          .= card. v    +I;
        en
A39:    CurInstr(Q7,t7)=Q3.l2 by PBOOLE:143
          =FORl2 by,,java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 40
          .=i3 by Th32;
    =- .   by
          . (t7A28:s.Execi2,I,)bA24Th29
(t7(0    =(P,.+n ,CMPDS_248
          .= 0 by A38,Th1 .s.b+      INT;
        then. a *A29:P6/IC =.s6 PBOOLE143java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
byA41:    Initialize t8=t8 by MEMSTR_0
A42Vis   then
T;
        then
:t5.a A32:;
beingVector  holds
        a Element ofA33 P,Pl1 ,A26A30,,TAjava.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
        t7.t6.byA,:48
          =.aby,:4;
        then
 t8as.by,CMPDS_254
45:  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
          let x be Int_position;
          assume
A46:      x in X;
          t5.= Comput(Q2,,m2. by A42SCMPDS_48
.IExec(I,,nitialize t. byE23
            txbyA5,A10,A46
      .sx .s.  ,A25E23java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
thent7=. byA2,A43,,A37A46,SCMPDS_2:       ay AS:48;
          t8=  
letVZ_Module    per 
A47:    t5.b= thus a * (v - w   v + a * (- w) by VECTSP_1:14
          
        t8bt7 A40,SCMPDS_254
          .=t Element  INTRing,
        then
A48 -    suppose
        then
:FOR ,  ,,,;
        now
           now
          per cases;
          
              5java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
then  =m31by Int_positionjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
            then
A50:        k <= m3 or k=m3+1 by NAT_1:8;
            hereby
             per cases by A50,AT_1:;
              suppose
A51:            k <= m2;
                hereby
                  per cases;
                  suppose
                    k=0;
                    IC Comput(3, ,)indom pFOR by ,22;
                  end;
                  suppose
                    k<>0;
                    then consider kn be Nat         for y  Int_position y
          =kn1byNAT_16java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
                    reconsider kn as Nat;
                    reconsider lm = IC Comput(Q2, t2,kn) as
Nat;
                    kn <k by A52,REAL_1:9;
                    then kn < m2 by A51,XXREAL_0:2;
                    then IC
Q4: IC =IC +1 bySCMPDS_248
                    by A12,A31,A20,A32,A15,A29,Th14;
                    then
A53:                IC Comput(Q3, t3,k)= lm +1 by A52,EXTPRO_1then
                  (Q2, t2,kn) in   A19,SCMPDS_6:ef ;
                        =. A6,8,RFUNC_1:2
                    then lm <    .i3 by ;
                    then
A54:                lm+1 <= card I +1 by INT_1:7;
                    card I + 1 < card I + 4 by XREAL_1:6;
                    then lm+1 < card I +4 by A54,XXREAL_0:2;
                    then lm+1 < card pFOR by Lm2;
                    hence IC Comput(Q3, t3,k) in dom pFOR by A53,AFINSQ_1:66;
                  end;
                end;
              end;
              suppose
A55:            k=m3;
                l1 in dom pFOR by A23,COMPOS_1:62;
                hence
                IC Comput    thenv -w =0.Vby A2,A1;
,A55,Th16 a  Elementof.Ring
              end;
              suppose
    =m31
                hence IC Comput(Q3, t3,k) in dom v Vectorof;
              end:v <>0.Vand
            
          end;
          suppose
            k >= m5;

A56:km5+nn  :10
            nn  ;
            Comput(Q3,t3,k)=
            Comput(Q8 +* pFOR, Initialize t8,nn) by A41,A56,EXTPRO_1:4;
            hence  etS= *( carrierofV)

        
             25EXTPRO_1:;
A57:  Q8 +* pFOR:s8java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        FOR is_halting_on t8,Q8 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
        then Q3 halts_on t8 by A41,A57  len      let x be ;
ts_onA50  xin StartAt,) SCMPDS_4:;
        hence   then
      end;
  end;
    per cases;
A58: P[0]
  proof
    let t be State of SCMPDS, Q;
    assume
    -t.b <= 0;
    then -t.b <= -(0 qua Nat);
    then
tb > 0 by XREAL_1:24java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    assume
    for x be         .=IExec(I,P,s).xA25,XTPRO_123
    assume
    t.a=s.a;
    hence thesis by A59,Th33;     Es.=xec(i2,IExec(P,).x by A24,h29
  end;
  for k being Nat holds P[k] from NAT_1:sch 2(A58,A6);
  then
A60: P[nn];
  for x be Int_position st x in X holds s.x=s.x;
  hence ::thesis
   for-up(a,i,n,I) is_closed_on s,P
   & for-up(a,i,n,I) is_halting_on s,P by A60;
end;

theorem
  for s being 0-started State of SCMPDS,I being halt-free shiftable Program of
  SCMPDS, a be Int_position, i be Integer,n be Nat,X
    then nn be such 
       DataLoc(s.a,i) &
  (for t be State of SCMPDS,Q
 ( x be Int_position st x in X
holds t.x=s.x) & t.a=  Comput(1sm1+)=Comput(2,s2,m2)by A56,EXTPRO_1:
 & IExec(I,Q,Initialize t).DataLoc  then CurInstr(1,omputP1,,1+)
n t, &I is_halting_on t,Q &
   for y be Int_position
st y inthen +m2> m0  A15,XTPRO_1:ef 15;
 holds IExec(for-up(a,i,n,  then
 = IExec(for-up(a,i,n,I),P,
      Initialize IExec(I ';' AddTo(a,i,n),P,s))
proof
  let s be 0-tarted State of
      I be halt-  hence  byA42,XTPRO_123
  Int_position, i be Integer,n be Nat,X be java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  et b=DataLoc(.,)
  set FOR=for-up(a,i,n,I),
  pFOR = stop FOR,
  s1= s, P1 = P +* pFOR;
  set i1=(a,i)>=0_goto (card I+3), i2=AddTo(a,i,n), i3=goto -(card I+2);
  assume
A1: s.b < 0;
     FORfordown(,,,) i1= (,)=_oto (ard I +) =AddTo(,-n
A2: IC     )java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
  java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 25
    cardPF=ard 1'')   by :4
  set = s PI 1  SCMPDS_6:6
m1LifeSpanP,);
  J=I ';'          thencard+ (+)
  PJ = P     java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
  s2=Initialize IExec
  anP2,
  EsIExec(J
3stop In
A4: FOR = i1 ';' (I ';' i2 ';' i3) by Th2;hencepk         hence p.k =  SCMPDS  Int_position,i beInteger, 
  set mI=LifeSpan(PI,sI), s5= Comput(P4, s4,mI), P5 = P4,
      l1= card I  correctness
  setreconsider
   s6 ( ,m3,  P1;
omputP1,s1,3    -downa,, =(i0goto card  3 ; ';(,i-java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
A5 c FUNCT_4:;    java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
FOR= by :74;

=P1 ,BOOLE_1:java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  Shift(I,      hence 
  then
 A6XBOOLE_1:1;
  card
  then
A8:l2 A8: l2 in dom
  set m5=m3+java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 10
  card I + 1 < a*Sum< ,u* =a  sum(n >of  
   (:0)''(GBP)=) '' (GBPjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
9: l1 in dom FOR by Th31;
  assume
A10: not b in X;
  assume
A11: n > 0;
  assume
A12:a < ;
A13: s s :java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   (,,)sjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
rt State  SCMPDS,
    letV   of
lize t)a   =Load GBP,1;
IExec.     .= a * -  ;
 &  for    
_halting_on t,A1:s.BP=;
   holds IExec(I,Q,let  be LeftMod  INTRing,
     sPby A1A,A,;
      .=-a   byTh6;
A15:P1 halts_on   
  beInt_position  inXholds s.=.java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
  then
,,)b.bby ,
:IPs.=.aby,A16,A13;
s.,iby A,;
A20A5 =Fjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 6
,0A2:DataLoc(GBP2) 0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    . Exec(i1,1)by A4,13,CMPDS_6reserve  for ;
A22: IC s4 = 0+1 by A2,A1,A21,SCMPDS_2:57
  V:;
  hen
A23:
A24: I is_halting_on s,P by
  then
:PI sI,: 3
  PI +*  A1:V1      assume 
  
 let
      A4  inV3;

A28: Es.b=Exec(u2       t0.GBP=0 by A1,A5,SC15java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
   .IExec(IPs.+    .=IExec(I,P,s).b+n=(0qua Nat))SCMP_GCD:java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
b+java.lang.StringIndexOutOfBoundsException: Range [11, 1) out of bounds for length 10
I ,,A16
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 6
: IC s5=l1 by A3,26,22,23,A7,h16java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
A31 . =GBP  SCMPDS_5
A32: s6=s5 by
  then
   .t0.v by A6,8,MI_310,CMPDS_2java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      V1, is_closed_ont  is_halting_on t   java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
    .=FORl1 A9,6,:2
    .=i2::$CD 2
A34:        in {}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 6
A35: s5.java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 7
.=a  ,E:
A36:   xbeing objectholdsjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    =sa     sGBP=(  )2)by A1SCMP_GCD:java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60

cases;
    suppose
      . > ;
      w= v implies-v   java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
    

A37:  Es.bj<0;
      now
        let t be Stateu  &v  Wimplies+v in W by 2holdsIExec(rdown(21 LoadAddTo(BP,,1),s. java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
        assume that
A38:theorem
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

          let x be Int_position;
          assume
A41:      x in X;
          hence .=.xby java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
.=Execi2,A2 .tpos2n nd
            .=IExec(I,  (A3:.=java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
           =. by
            A4: M (  s be1&.GBP0
         IExecI,,Initializet.ata by A14,A36,A39;
        :  a ElementofR
thus    (,s1+
         for y be Int_position  let Vector  W
        in X holds IExec(I,=(thelmult of .      Nat;
      end;
FORis_halting_on [k;
    end;
  end;
  
:P2halts_on        assumejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
A43: s7 = FollowingA7thus W 
         BP>s2 A6,,:1;
        .=  java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
A44: IC letx,y,zbeof W;
            ( +y +z ( +y,z1) by A6        setcvDataLoc(GBP,;
  then
        =AV.x1y+ z  A6
    .=      
    = Th32;
A46: s8 = Following(P1,s7) by EXTPRO_1:3
    . Exec(i3, byA45
  then IC s8=ICplusConst(s7,(0 qua Nat)-(card I+2)) by SCMPDS_2:54
    .= 0 by A44,Th1;
  then
A47: IC s2 =IC A8:     x1 + v = 0 byALGSTR_0:def 11;
48 .b (PI,sI,mI)b by S:8
    .=s.b by         .= (the  .( 1R)x1)
A49: s8.b=s7.b by A46,SCMPDS_2: then reconsider  =v    W;
..+byA35,48A32A43,SCMPDS_2:48;
  now
letx Int_position
  x in dom -At(,CMPDS)by SCMPDS_4:java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
tjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
A51: s2.        . AV(V.a,1)a*  A5
        =a * x+a*yby A6;
    suppose
      =java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      hence s8.x=s2.reconsidery=        
    x  Int_position   {}holds tx.. and
    suppose
A52:  x        .A11:t.=sGBP;
A53:  s5.x= Comput(PI, sI,mI).x by A34,SCMPDS_4: set=Initialize t;
        .=              ;
A54:  s7.then
      EsA12:   DataLoc(0.BP, reconsidery x Vector V TARSKI:f ;
s.byA19then
      hence(  )*x=( b*
;
 ;
  then
A55: DataPart s8 = DataPart s2(R    theof. by A12,MI_310SCMPDS_2:
    .= .tGBP  :15java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  by A55,A47,
  then CurInstr   VXbeingstrict LeftMod of   Vis            .t0by ,SCMPDS_248
   
 m0  m1        thusI ,&  t, SCMPDS_6:,21
  then consider  let y java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A57:m0=1+nn byNAT_110java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    ;
  Comput(,m+)=Comput(,s2m2)byA56EXTPRO_1:;
  then CurInstrlet R  java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  cluster strict Submoduleof ;
then  +m2 >=setj(,-) =s =(I,s,
  then
_1     reconsider V1 = the carrier of V as Subset of V;
A59:       :theA15:(GBP,=0qua +  SCMP_GCD:java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  then CurInstr(P2,Comput(P2,s2,nn)A16  java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 32
   =halt SCMPDSendjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Range [22, 2) out of bounds for length 39
  then nn=m2 A58,XXREAL_01java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
  java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 41
   thesis          =1l2+-  ,
end;

registration
  for beingstrict         =byA6java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  Nat;
 cluster I >shiftablejava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  correctness
  proof
    set FORjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    set PF=
    V >{  is implies
     .I++  :6
      .=card I +(1+1)()W  (.  A17,MI_310SCMPDS_2:;
    then cards2)intpos 2=.   SCMPDS_5:15;
    hencethesis  java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 end;
end;

registration
  let I be halt-free ProgrambyA6A7,,A9,h47
  Nat;
  cluster for-up(a,i,n,I) -> halt-free;

  proof
    reconsider
+2 No-       ;
    for-up(A24 []
    i3;
    hence thesis;
  theore
end;

begin :: The construction of  for-down loop program

:: while (a,i)>=0 do { I, (a,i)-=n }

definition
  let a be Int_position, i be 
let I  Program  SCMPDS;
  func for-down  v  u      ,,
  a  end;
  ';' I ';  in  kbeNatholdsPk fromNAT_1: 2A24,);
    IExec(,s.n(qua by ,,A3
end;

begin :: The computation of  for-down loop program

theorem Th39:
  forfor eing -started of ,nbe java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  Program    (umn),)intpos

java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
set=i=_ cI+,AddTo(i-;
setI4='  i1 ,I3'  IExecI3Ps P3=Pjava.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
:6;
  then card I5
.=I:I3,:;
   is-closediff C carrierofWthen
    .card I  ;
end;

Lm4:     =java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
SCMPDS



letabeibeIntegerA:3GBP=ec(,) SCMPDS_541
      0 AMI_3:S:;

  thus card stop for-down(a,i,ntheorem
    .= card I +3+1 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
    .= card I + 4;
end;

java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
for be     . 2byAMI_3:,SCMPDS_246
  Program    .theorem
proof
  let a be Int_position,i be Integer
  SCMPDS;
  card for-down(a,i,n,I)=.0byA6SCMPDS_2:6java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  thesis by AFINSQ_1:66;
end;

theorem Th41:
  for a be Int_position,i be Integer,n be Nat, I be
Program of SCMPDS holds for-down(a,i,n,I). 0=(a,i       (D,3,Initialize s3). by A1A2,9,h28
for-down(a,i,n,I);
  card I+2)=goto -(card    +W2 :: sum=Sum x1x2+.+x2
proof
  aInt_positionibe Integer,n be Nat   Program f
  SCMPDS;
  set i1=(a,i)<=0theorem Th94:
setI4=i1 ;  =''i2;
  set J6=i2 ';' i3, J5= assume xinthe o W1;
 =for-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  FLOOP=I4 ';' J6 by SCMPDS_4:13;
  java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0
  hence FLOOP. 0=i1 by SCMPDS_6:7;
A1:card =card+bySCMPDS_6:java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  hence FLOOP.W1 is o W1  W2by:java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
  cardI5=card  + +java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    .=card I+ (1()V +(mega)V = the ModuleStrV by 10
  encethesis SCMP_GCD;


theorem Th42:
 sbeing State of ,I being Programof SCMPDS,being
  Int_position, i being Integer,n be Nat st s.DataLoc(s.a,i) <= 
lds for-down(,,,)is_closed_ons, carrier of W1 /\ W2 c= the carrier of W1
   & for-down(a,i,n,I) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
proof
  let s be State of SCMPDS,I be Program of SCMPDS,a end;
  Integer,n be Nat;
  set d1=DataLoc(s.a,i);
  assume
A1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  set i1=(a,i)<=0_goto (card I+3), i2=AddTo(a,i,-n), i3=goto -(card I+2);
  set FOR=for-down(a,i,n,I), pFOR=stop FOR,
  s3 = Initialize s, P3 = P +* pFOR,
  s4 = Comput(P3,s3,1), P4 = P3;
A2: IC s3 = 0 by MEMSTR_0:def 11;
:not in dom Start-t(,SCMPDS)by SCMPDS_4:8;
 SCMPDS_4:8;
  then
:s3.ataLoc(3.,)s3.d1 by FUNCT_4:1
. s.d1 by A3,UNCT_4:11;
A5: FOR = i1 ';' (I ';' i2 ';' i3) by Th2;
    () \W    VECTSP_5:;
  Comput(P3,s3,0  assume that
  ()1sP  sp java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
  then
:IC s4=ICplusConst(s3A4 .BP+<pand
    =(0qua )( I3)byA2,12java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 14
A7: card java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
  then
A8: (card I+3) in dom pFOR by COMPOS_1:64;
  pFOR c= P3 by    s.ataLoc(BP,v =0;
  then P4.(card I    hence thesis by Th42;
    .=halt SCMPDS by
  then
A9: CurInstr(java.lang.StringIndexOutOfBoundsException: Range [27, 15) out of bounds for length 27
  now
    let k be Nat;
    per cases;
    suppose
      0 < k;
      then 1+(0 qua Nat) <= k by INT_1:7;
      hence IC Comput(P3,s3,k) in dom pFOR
      by A8,A6,A9,EXTPRO_1:5;
    end;
    suppose
      k = 0;
      then Comput(P3,s3,k) = s3;
      hence IC Comput(P3,s3,k) in dom pFOR by A2,COMPOS_1:36;
    end;
  endproof
henceFORis_closed_on s,P by SCMPDS_6:def 2;
  P3 halts_on s3 by A9,java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 20
  hence thesis by SCMPDS_6:def 3;
end     vin W2;

theorem Th43:
  for s being State of SCMPDS,I end;
  Int_position, i being Integer,n be Nat st s.DataLocthecarrier of W2 c=the of ( /    Lm6java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  holds IExectheorem
       = s +* Start-At((card I+3),SCMPDS)
proof
  let s be State ofLm11:the of  \(  
  Integer,n be Nat;
  set d1=DataLoc(s.a,i);
  ,I,pFOR=stop FOR,
  s3 = Initialize java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  s4 =  being
  i1=(a,i)<=0_goto java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  i3=goto -(java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
   SAlStartjava.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38

:notd1   Start-At(S)by 1java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  c   :java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  not a in domhencetjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  
A4:s3.s3.i
    .= s.d1 by A2, :;
A5: FOR = i1 ';' (I ';' i2 ';' i3T
A6 ComputP3, s3,(0qua +A +fr
Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
. is3) by,1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  assume
  s.d1 <= 0;

A7: IC s4 = ICplusConst(s3,(card   v,usuch
    .= ((0 qua   : vin  2 for be st   BPP}holdsjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 61
A8:card FORcard I3by;
then(Initialize t,t1(2 )
 A14:  DataLoct0.)n A13,CMPDS_5:java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    .=halt SCMPDS by A8,COMPOS_1:64;
  then
A9: CurInstr(P4,s4) = halt SCMPDS by A7,PBOOLE:143;
  hen
A10: P3
java.lang.StringIndexOutOfBoundsException: Range [40, 3) out of bounds for length 44
  now

    assume
    l < (0 qua Nat)+1;
    then l=0 by NAT_1assumeW1  W2; then
     thecarrier  :  t1.=0Pby :9
  end;
  then for l be  then       in{,}byTARSKI java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  P,l) SCMPDSholds  = java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  then
A12: LifeSpan(P3,s3) = 1 by A9,A10A17  DataLoc(1.P,)intpos (pD+(0 qua Nat) by SCMP_GCD:1;
A13: now
    let x be A18  |t1.P  +u2  by ,A1A4;
SAl ={  F13
assume
A15: x in domendjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
per A15,MPDS_4:;
    suppose
A16:  x is Int_position;
      x >IC  by SCMPDS_2:43
      then
   W2  strict of holds: .BP+.  +by 
A18      then |t1.PP+(qua Nat    +   W1   byjava.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
      thus IExec(theorem
=.x by S56
        = x by|BPfr|=+ byA14X:;
        .=theorem
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    suppose
A19 x  SCMPDS
   thus IExec(,Initialize s)x=cardI +3)
       .tBP A16,A19,CMPDS_2:48;
        .= (s +* SAl).x by A19,FUNCT_4:      thus IExecend;
    end;
;
  dom IExec(OR,P,nitialize
.  =t.y:15;
    proof
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem
  for s being  SCMPDSIbeing rogramofSCMPDSa
  Int_position,.t V  R W  strictSubmodule  V;
  holds IC IExec
proof
  let sstv1 in   in st v1 in W1 & v2 in W2T:ef;
  Integer,n be Nat;
  assume s.DataLoc(          BP
  then IExec(for-down(a,i,n,I),P,Initialize s)
   =s +* Start-At((card I+3),SCMPDS) by Th43;
   hence thesisby FUNCT_4:13;
end;

        suppose
  for s being State           y=P;
  Int_position          hence (,,t.y=. by A24,MEMSTR_0:44;
  holds IExec(for-down(a,i,n,I),P        ;
proof
  let s be State njava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  Integer,n be Nat;
  c(s.,)< 0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  then
A1:IExec(forlet ;
by W SofV;
  not b in dom Start-At((card I+3),   Cbeing Submoduleof  V  C,;
  hence thesis by A1,FUNCT_4java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 4
end;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

Lm5: ;
Shift,)c down(,,,)
proof
     java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 70
  set i1=(a,i)<=0_goto (card I;
A1: for-down(a,i,n,2  is_the_direct_sum_of W1,W2 implies pDk
  card Load i1=1 by COMPOS_1:54;
  hence thesis by A1,Th3   AddTo(ntposhence  Def19,A1java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
end;

theorem Th46:
  let s be0startedState ofSCMPDS,
Program of SCMPDS,
  st s  proof
DataLocsa,)java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 (for t    W     
   holds t.x=s.A1:s.P  sp 
     IExec(I,Q,t).DataLoc(s.a,i)=t.DataLoc(  L being Linear_Compl of W holds W /\ L = (:<fr java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
     I is_closed_on     be ofW;
     for y     hence W /L=A5:pp<and
 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
       for-down(a.(.,java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
proof
  let s be State  V beZ_Module A9 or  Nat st  <enf  (1).(PD,);
 ,  IntegerbeNat,  setjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  set b=DataLocA1:A10: fr  by A5X:2java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  set FORend;
  pI=stop  V being  ,,,aDataLoc.;
  = [ 
  assume
:. >0;
  defpred P[Nat] means
   for tjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
.a=.
     holds FOR is_closed_on t,Q & FOR is_halting_on t,Q;
  assume
   Xjava.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
  assume
A3: n > 0;
  assume
A4:a <> C1  of W1;
  assume
A5: for t be 0-started State of SCMPDS then
  holds 
  IExec(Ijava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  I is_closed_on t,Q
  t,&y    java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
   holds IExec(I,Q,t).y=t.y;
A6:for k be Nat st [k holds Pk +1]
  proof
let  be;
    assume
A7: P[k];
  v1 in    inW2     by ;
      assume
A8:  b< k;
      java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
A9:  for  V =W1+W2 ex st for v1,2u1,2v1:t.=sBP 
orx be Int_position st x in X holds (nitialize )x.x
       proof let x be Int_position;
x A19:f=ataLoc.BPc)
         then t.x=s.x by A9lenf+ 
        :15;
       end;
      
A11:     v2    2W2 v =1 v2=
      then
A12:   (Initialize t).a=s.a bythen{.}c carrier of  \         =tBP,;
      per cases;
      suppose
         let U byA5:f ;
        hence FOR is_closed_on t,Q & FOR    u=xas Vector  V
      end;
      suppose
A13:    t.b > 0;
        set t2 = Initialize.= (   -) java.lang.StringIndexOutOfBoundsException: Range [41, 38) out of bounds for length 41
        Q2 = Q +* stop I, Q3 = Q +* pFOR,
A12: v2 -u inW2 by A9,Th39;
A14:    v1   inbyA8Th36
    FOR= '' I''i2 ;   Th2;
A16:    Computihencethesis by ,RLVECT_1:23;
Computjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
          .= Exec(i1,java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
foraholds .  t4a SCMPDS_256
        then
A17:    DataPart t2 = DataPart is_the_direct_sum_of W2 implies v |-- W1,W2))`java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 19
A18:    IExec(I,Q,Initialize t).b= (java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 7
          .= t.b by SCMPDS_5:15Initialize u =xec(2,t0)
        - holds t`A27:DataLoct0BP,)nf)by A26SCMPDS_515
        then -n < 0;
        L be Linear_Compl ;
        then
A19:    -n+tend
        t.b-1 <= k by A8,XREAL_1:20;
        then
:-+t.<  byA19:java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
I java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 53
        then
A21:    A30:    t1.P=D by A17,25,java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
       then
A22:    I  then|t1.P+ qua Nat)| < spby A30ABSVALUEdef 1java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
A23:pjava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
        set m2=LifeSpan(A31:   DataLoc(t1.P,)>BPVWL h124;
        l1=(ard I +
1);
A24:    IC t3 = 0 by MEMSTR_0:def 11;
         m3 ;
        set java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
        cardI+1<   3 XREAL_16
        then)`2  v |-(, Di(+)  SCMP_GCD:;
A25:    l1 in dom FOR by        
        set m5=m3+1+1, t8=theorem :
set t7=ComputQ        then |.0BP+r|>|tBP+| A2A;
        then
           .=t.a by SCMPDS_5:15;
        set l2=(card I+2))java.lang.NullPointerException
A27:     0 in dom pFOR by COMPOS_1:36;
        card          .
        then
A28:    l2 in dom FOR by Th40;
A29:    pFOR c= Q3 by FUNCT_4:Th145java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        FOR c= 
        java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
A30:    FOR c= Q3 by A29,XBOOLE_1proof
Shift,1)c=FOR by Lm5java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                  .t0.v  ,CMPDS_2:java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
A31:    Shift(I,1) c= Q4   for V being Z_Module holds ( ubmodules(V,
tialize   byA5,A12;
        then IforVA38 IExecIInitialize .=Execi3 .SCMPDS_5:java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65

32        SCMPDS_6d ;
        Q2 +* stopas    let beInt_position;
        then
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 48
        A2 A / ) per  ,: 2java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
         t3DataLoc          
. by .= SubJoin(V).(AC,BC VECTSP_5def java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        then
,,:56;
        then
A35:    IC t5=l1 java.lang.StringIndexOutOfBoundsException: Range [17, 19) out of bounds for length 0
A36: Q6/.IC t6 = Q6.IC t6 by PBOOLE:143;
A37:    t6=t5 by EXTPRO_1:4;
        then
A38:    CurInstr(Q6,t6)=Q5end
          .=FOR.      ;
          .=i2 by Th41;
letbenon empty ;
          .(i2t6by java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  then
A40:    IC t7= IC      =Delf1)java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
          .=       setIt=Exec(Q,)
        existence
A41 CurInstr(t)Q3.2
          .=FOR    (>0$=(-()(,2)&
          .=i3 by Th41;
XTPRO_1
.= Exec(i3,)by ;
        ex z beingof st [,zjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
.=0A40,;
        java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 10
  t8=8by  end;
A44:          n+fr <|It.P    let ,be :    , of]java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
T;
        A51: a>DataLocIt.BP,)byA40X1  (A52  It.=xec(3,t1.  SCMPDS_542
A45:    t5.a= Comput A5        .t1.  ,A7A43,CMPDS_2:java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
          .=s.a by A11,A26,A32,        .=t.a + f.1 by A16,A50,SCMPDS_2
        then DataLoc(t6.a,i)= for ,y being et inINT &in thecarrier  AG
        then t7.a    proof ,y be           + < N:11;
.saby EXTPRO_1:;
        en
A46:    t8.a=s.java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
A47:    now
A55: s2.=xec( )PD  :java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

      xf2.(x,y) by A5,A8;
          t5.x= Comput(Q2, t2,m2).x by A44,SCMPDS_4:8
            .e;
            .=(Initializetheorem
            .t.xbySCMPDS_5:15
.  ,A48
          then t7.x=s.x by A2,A45,A37,A39,A48,SCMPDS_2:48;R being empty beingofR,
          hence t8.x=s.x by A42,SCMPDS_2:54;
        end;
A49:    t5.b    a be  ofRbe java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
          =b A18,,;
A50:    t8.b=t7.b by A42,SCMPDS_2:54
          .=t.b+ -n by A45,A49,java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 23
        
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
        now
         let k be Nat;
          percases
          suppose
   k<59s2PD  ( s2). by:;
            then k <= m3+A60:s2. Pn;
            then      Nat--leftR)(+,.)=0.  .by B:      (Nat-mult-left(R)).(n+1,0.R) = 0.R + 0.R by A3,BINOM:def
A52:        k <= m3 or k=m3+1 by NAT_1:8;
            hereby
              per cases by A52,NAT_1:8;
              suppose
            k=;
                hereby
                  cases
                  ;
                    k=0;
                    hence IC Comput(Q3, t3,k) in dom pFOR by A27,A24;
                  end;
                  suppose  <= i; 
                    A64:   i+        (--(R).(,0.)=(at-ult-left().i1,0.)by Def23
                    then consider knA65:  .D =(nitialize s2)SD by java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 8
A54:                k=kn+1 by NAT_1:6;
reconsider knasNat;
                     t2,n) as.(mult-(R.i1,Rby RLVECT_1:java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
Nat;
                    kn < k A67:   DataLoc(1.PP,)<>SD by A59,XTUPLE_0:;
         =(i)by:11java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
thenIC         |0.r<|PD+| AA,,XXREAL_0:;
Q4,t4,kn)
                    by A14,A33,A22,A34,        be ofR
                    then
           IC Comput(3 ,k==m+byA54E:4
                    IC Comput(Q2, t2,kn) in dom  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [34, 20) out of bounds for length 53
                    then lm < card I+1 by COMPOS_1:55;
                    then
A56:                lm+1 <= cardletRbe          E(3, t1) bySCMPDS_542
       ofRi ,b  NAT;
                    then lm+1 < card I +4 by A56,XXREAL_0   = *a java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 28
                    then lm+1 < java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
                    .=.ataLoc(.     R, beingElementofNAT
                  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
                end;
              ;
              suppose

                l1 in dom pFORjava.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 9
                java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
dom  byA14,,,,A,java.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
,,;
              end;
              java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 10
                k=m3+1;
                hence IC Comput(Q3, java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 21
              ;
            end;
          end;
          suppose
 >= java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
            then consider nn be Nat such java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 20
A58:        k=m5+nn by NAT_1:10;
reconsidernn Nat;
            Comput(Q3,t3,k)=
            Comput(Q8 +* pFOR, Initialize t8,nn)
                by A43,A58,EXTPRO_1:4;
            hence IC Comput(Q3, t3,k) in dom pFOR byn+]java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
          end;
        end;
        hence FOR is_closed_ont,Qby :def 2;
A59: Q3 = Q8 +* pFOR;      by RLVECT_1:;
   is_halting_on t8,Q8 byA7,A47,,A20
        then Q8 halts_on t8 by A43,A59,SCMPDS_6:def 3;
        thenfor  right_zeroed associative 
        hence FOR is_halting_on t,Q by SCMPDS_6:def 3;
      end;
  end;
 n=s. Elementofby INT_1:3java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
A60: P[0] by Th42;
  for k being Nat holds P[k] from    be  ,   Element  .;
then
A61: P[n];
  for x be Int_position st x in X holds s.x=s.x;
  hence thesis by A61;
end;

 :
  for s being 0-started State of SCMPDS,I being halt-      reconsider k1=i1-j1 as Element of NAT by A4,INT_1:5
Program of SCMPDS, a be Int_position, i be Integer,W1   (-multleft))(,a  (mult-R)(j-a)by A2,Def23;
   sDataLoc(.,  0  DataLocs,) in      <
DataLoc      =(-mult).  Natmultleft(R)).j1,-a Th157
 in X
holds t.x=s.      .=(Int-(mult(R)(i,)+(nt-leftR)(,a) by W1
 & IExec(I,Q,t).DataLoc(s.a,i)=t      t
  DataLoc(s.a,i) & I is_closed_on t,Q &      :i1- < 0  ,java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 37
         NatmultleftR)
  st y in  .=(Natmult-R)(1,a  Nat-left))(i1-
   .(NatmultleftR)).(j1-)+(Nat-mult-leftR).(1,--)
    = IExec(for-down byRLVECT_117
proof
  let s be 0-started State of SCMPDSend;
      I be halt-free shiftable Program of SCMPDS,
       be, beIntegern ,Xbeset;
  set b=DataLoc(s.a,i);
  set FOR=for-down(a,i,n,Ijava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 7
set=a,i)<=0gotocardI+), i2=ai,-n), = -card )java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  assume
:s.b >0
 =Computs,1,P4 = P1;
 s =   java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
setm0=P1,s)
  l2(java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 20
  sI s PI = P *stop
  m1=LifeSpan in NAT & jin NAT;
  J=I ';' AddTo(a,i,-n), sJ =s,
  PJ = P +* stop J,
lize IExec(,Ps),
 P2 =P *pFORjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  m2=LifeSpan(java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 8
  set Es=henceInt73Itn+)=i3,t1.)by:java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
A3: stop I c= PI by         .=t1.intpos(n+cv) by A72,    suppose not i in NAT & not j in NAT
 by
  sI        =1 A19A20,SCMP_GCD1
  =    .BP+v.< by,,11;
  m3= 1;
  set      = -  *a BINOM:15
  set s7=  BP(,)BP 41
A5: pFOR c= P1         .=s.BP by,46,74,CMPDS_2 
  FOR      then DataLoc(2.BP,v)intpos(+v)by SCMP_GCD:1;
    ,        =.intpos(nc+1byA47SCMPDS_2
6 FORc=         . gbyA20A58,;
  Shift(I,1) c= FOR      ppNmult)0,ab)  0R  def3
  then
 =(--(R)  < It.BP, ;
  card I        s.Execj )PP  java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
then
A8: l2 in dom FOR by Th40;
   =+1,  P1,sm5);
  java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 68
  then
A9: l1 in dom FOR by Th40;
  assume
  ;
  assume
1: n  ;
  assume
A12: a <> java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 6
:java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 37
  assume
14:for  - Qjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
   (for x be Int_position java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 25
.sx &t...Sum (nitialize.a
IExec(I,Q,t)   =i         A20,A58AA8,,A,A61,
 & I    . +s2a bySCMPDS_51java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  &I is_halting_on tQ &for y be java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 29
holds +t ,,20;
  then FOR is_halting_on s,P by A1,A10,A11,A12,Th46;
  then
15 java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 41
:for xbest xin s.=.;
  then
A17: IExec(I,P,s).b=s.b by A14;
A18: IExec(I,P,s).a=s.a by java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 26
A19: b=DataLoc(IExec(I,P,stheoremjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
A20: IExec(I,P,s).a=s.a by A14,A16;
 )+1  P1,s,0) by :
    .= Exec(i1,s  NatR).(ij,a)=(-leftR)).i,(Nat-leftR)).ja))
A22: IC s4 = 0+1 by A2 letRbe -java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 70
  for a holds sI.a = s4.a by A21,SCMPDS_2:56;
  then
A23: DataPart sI = DataPart s4 by SCMPDS_4java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 54
A24:    proof
  then
:PI java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 42
  PI = PI+*stop I;
  then
A26: Ijava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 IsP byA14,A16java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  then
A28: Es.b=Exec(i2, IExec(I,P,s)).hence [+1];
    .for n NatholdsP[n] NAT_1sch2(A1,;
    .=s.b+ -n by A14,A16;
A29: P6/.IC s6 = P6.IC s6Lm19
A30: I is_closed_on sI, PI by A14,A16;
  then
A31: IC s5=l1i<>0  >0 holds
A32: s6=s5 by EXTPRO_1:4;
  then
A33: CurInstr(P6,s6)=P5.l1 by A3,A26,A30,A22,A23, nonempty
    .=FOR.l1 by A9,A6,GRFUNC_1:2
    .=i2 by Th41;
A34: DataPartcasesjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  
A35: s5.a= Comput(PI, sI,mI).a by SCMPDS_4:8
.s.aby A20A25,23java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
A36: Es.a=Exec(i2, IExec(I,P,s)).a by A27,A24. Nat-java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 64
    .=s.a by A12,A18,SCMPDS_2:48;
  now
    per a7: ii*jj   java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
s
      Es.bj <= 0;
      hence FOR is_halting_on Es, P by Th42;
    end;
    suppose
A37:  Es.bj > 0;
      now
        let t be 0-started State of SCMPDS,ImultR).(i
        assume that
A38:    for x be Int_position st x in X holds.(at)(-,((Natmultleft(R).(j1a)) 
A39:    t.a=Es.a;
A40:    now
          let x be Int_position A13   0&    3; then
          assume
A41:      x in X;
          hence t.x=Es.x by A38
            .=Exec(i2, IExec(I,P,s)).x by   now
            .=IExec(I,P,s).x by A10,A18,A41,SCMPDS_2:48
            .=s.x by A14,A16,A41;
        end;
        hence IExec    t.=sBP and
        thus IExec(I,Q,t).bj= t.bj by A14,A36,A39,A40;
thus   ,  is_halting_on, &
         for y be Int_position st y
        in X holds IExec(I,Q,t).y=t.y by A14,A36,A39,A40;
      end;
      hence FOR is_halting_on Es, P by A10,A11,A12,A36,A37A: len= and
    end;
  end;
  then
A42: P2 halts_on s2 by SCMPDS_6:def 3;
A43: s7 = Following(P1,s6) by EXTPRO_1:3
. (,)by java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  then
A83:[0]
    .  I+11Nat k java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 52
  then
 (,=l2byPBOOLE143
    .=FOR.l2 by A6,A8,GRFUNC_1:2
    .=i3 by Th41;
A46: s8 = Following  Abelianjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 69
.i3s7 
-Ijava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 66
    .= 0 by A44,Th1;
  then
:ICs2= ComputP1s,m1 : 11;
A48: s5.b= Computsuppose A2:   0;
    .=s.b by A17,A25,EXTPRO_1:23;
A49: s8.b=s7.b by A46,SCMPDS_2:54
    .=s.b+ -n by A35,A48,A32,A43,SCMPDS_2:48;
  now
    let x be Int_position;
java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 67
      of NAT
A51: s2.x=IExec(J,P,s   BPintpos,=pD intpos. java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 42
     cases;
    suppose
b
      hence s8aElement ,i  of. 
    end;
    suppose
A52:  x<>b;
 PI m)x,:
        .=IExec(I,P,s).x by A25,EXTPRO_1:23;
SCMPDS_248;
      Es.x=(R)(i,(Int-multR)(a)Lm20java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
        .=IExec(I,P,s).x by A19,A52,SCMPDS_2:48;
       s8xs.byA46,51AA,CMPDS_2:4;
    end;
  end;
  then
A55: DataPart s8 = DataPart s2 byAG nonadd-associative right_zeroed
A56right_complementable addLoopStrholds
  then   ( of    ,ofjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  then m0 > m1 by A15,EXTPRO_1:36;
      re   #1;
+n  NAT_110;
  reconsider nn as Nat;
  Comput(P1,s,m1+m2) = Comput(P2,s2,m2  0 |s0.+.|= +by XTUPLE_01     ML lmult ;
  then CurInstr(P1,Comput(P1,s,m1+m2))
   = halt SCMPDS by A42,EXTPRO_1:def 15;
  then     set = the ZeroFofZS
  then
A58 DataLoc(0.P,r) <>BP  XTUPLE_0:   :v   lementofZS v+   v
A59: Comput(P1,s,m0) = Comput(P2,s2,nn) by A56,A57,EXTPRO_1:4;
then(,s,)
   java.lang.StringIndexOutOfBoundsException: Range [15, 3) out of bounds for length 41
 = A42,     by 4java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    .. java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 8
  then Result(P1,s) = Comput(P2,s2,m2) by A15,A59,EXTPRO_1:23;
  hence thesis by A42,EXTPRO_1:23;
,=v1wElement

registration
  let I be shiftable Program of SCMPDS, a be Int_position,i be Integer,n be
  Nat;
  cluster for-down(a,i,n,I) -> shiftable;
  correctness
  .s1 byA14SCMPDS_245
    set FOR=    .n  ,CMPDS_24;
    );
    reconsider PF= Load i1 ';' I ';' i2 as shiftable Program of SCMPDS;
    card PF=      .= u1+(v1+  :ef3
+ +1by:
      = I (+);
     +-(I)=;
    hence thesis by SCMPDS_4:23;
  end;
end;

registration
  let java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
=vElement ;
  correctness
  proof
    reconsider
    i3=goto -(card I+2) as No-hence v is right_complementable
    for-down(a,i,    A6: for a, b b.   java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
    ' roof
     ;
ejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
end;

begin :: Two Examples for Summing

:: n=Sum 1+1+...+1

definition
  let n be Nat let be ElementofINT.,v being Vector;
  func sum(n) -> Program of SCMPDS equals
  (       v1,w1=w as Element of AG;
  )=)'' -down,1 G31)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  coherence;
end;

A8 , b Elementof.java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 61
     (  )* = a*(b*v by Th163
  Load AddTo(,1)is_closed_ons    orbeingVectorof  .(.)*v=v  ;
   & for-down(GBP,2,1, Load AddTo(GBP,3,1)) is_halting_on s,P

      VECTSP_1: 14V:  then
  A24: (n)< PP byXTUPLE_0:;
  assume
A1: s.GBP=0;
  per cases;
  suppose
    s.DataLoc(s.GBP,2) <= 0;
    hence thesis by Th42;
  end;
  
A2: s.DataLoc(    = by :java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
A3: now
      setby ,2,,4,,16,A13Th51A27,28A29;
      let t be 0  then
       ;
A4: Initialize t = t byA32:s2.(s2.Pcv)s2intpos(n+)by A16,CMP_GCD1
      assume that
      for x be Int_position st(i1 s1)intpos(+v  SCMPDS_5:
A5:   t..=s1.intposncv)by A24,CMPDS_245
      set t0=Initialize t;
      t0.GBP=0 by A1,A5,SCMPDS_5:15;
      then
A6:   DataLoc(t0.GBP,3)=intpos((0 qua Nat)+3) by SCMP_GCD:A33:s2.(2BP,)=(Initialize )DataLoc(2BP,r by SCMPDS_5:15;
      A34:  s2.ataLocs2.,cv  (nitializes2)DataLoc(2BP,)by SCMPDS_515java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
A7:   IExec(I,Q,t).GBP=Exec(AddTo(GBP,3,1),t0).GBP   by A1,2,,A4A5,16,A30AT,27A28,29;
        .=t0.GBP by A6,AMI_3:10,SCMPDS_2:48
        .=t.GBP by SCMPDS_5:15;
A8 =intpos((  )2 by A1,CMP_GCD1java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
      thus IExec(I,Q,t).cv=Exec(AddTo(GBP,3,1),t0).cv by A4,SCMPDS_5:40
        .=t0.cv by A6,A8,AMI_3:10,SCMPDS_2:48
        .=t.cv by SCMPDS_5:15;
      thus I is_closed_on t,Q & I is_halting_on t,Q by SCMPDS_6:20,21;
        let y be Int_position;
        assume
        y in {GBP};
        then y=GBP by TARSKI:def 1;
        hence IExec(I,Q,t).y=t.y by A7;
    end;
    DataLoc(s.GBP,2)=intpos((0 qua Nat)+2) by A1,SCMP_GCD:1;
    then DataLoc(s.GBP,2) <> GBP by AMI_3:10;
    then not DataLoc(s.GBP,2) in {GBP} by TARSKI:def 1;
    hence thesis by A1,A2,A3,Th46;
  end;
end;

theorem Th49:
  for s being 0-started State of SCMPDS,n be Nat
   st s.GBP=0 & s.intpos 2=n & s.intpos 3=0
   holds IExec(for-down(GBP,2,1, Load AddTo(GBP,3,1)),P,s).intpos 3
       =n
proof
  set i= AddTo(GBP,3,1), I= Load i, FD= for-down(GBP,2,1, I), a=intpos 3;
  let s be 0-started State of SCMPDS,n be Nat;
  assume that
A1: s.GBP=0 and
A2: s.intpos 2=n and
A3: s.a=0;
  defpred P[Nat] means
   for s be 0-started State of SCMPDS st s.intpos 2=$1 & s.GBP=0
    holds IExec(FD,P,s).a=$1+s.a;
A4: now
    let k be Nat;
    assume
A5: P[k];
    now
      let s be 0-started State of SCMPDS;
      assume that
A6:   s.intpos 2=k+1 and
A7:   s.GBP=0;
      GBP <> DataLoc(s.GBP,2) by A6,A7,SCMP_GCD:1;
      then
A8:   not DataLoc(s.GBP,2) in {GBP} by TARSKI:def 1;
A9:  now
        set cv=DataLoc(s.GBP,2);
        let t be 0-started State of SCMPDS;
        let Q;
A10:   Initialize t = t by MEMSTR_0:44;
        assume that
        for x be Int_position st x in {GBP} holds t.x=s.x and
A11:    t.GBP=s.GBP;
        set t0=Initialize t;
        t0.GBP=0 by A7,A11,SCMPDS_5:15;
        then
A12:    DataLoc(t0.GBP,3)=intpos(0 qua Nat+3) by SCMP_GCD:1;
        then
A13:    cv <> DataLoc(t0.GBP,3) by A6,A7,AMI_3:10,SCMP_GCD:1;
        thus
A14:    IExec(I,Q,t).GBP=Exec(AddTo(GBP,3,1),t0).GBP by A10,SCMPDS_5:40
          .=t0.GBP by A12,AMI_3:10,SCMPDS_2:48
          .=t.GBP by SCMPDS_5:15;
        thus IExec(I,Q,t).cv=Exec(AddTo(GBP,3,1),t0).cv by A10,SCMPDS_5:40
          .=t0.cv by A13,SCMPDS_2:48
          .=t.cv by SCMPDS_5:15;
        thus I is_closed_on t,Q & I is_halting_on t,Q by SCMPDS_6:20,21;
          let y be Int_position;
          assume
          y in {GBP};
          then y=GBP by TARSKI:def 1;
          hence IExec(I,Q,t).y=t.y by A14;
      end;
      set j=AddTo(GBP,2,-1), s0=s, s1=IExec(I,P,s),
          s2=IExec(I ';' j,P,s), l2=intpos 2, P2 = P;
A15:  DataLoc(s0.GBP,3)=intpos(0 qua Nat+3) by A7,SCMP_GCD:1;
A16:  s1.GBP=Exec(i, s0).GBP by SCMPDS_5:40
        .=0 by A7,A15,AMI_3:10,SCMPDS_2:48;
      then
A17:  DataLoc(s1.GBP,2)=intpos(0 qua Nat+2) by SCMP_GCD:1;
A18:  s2.l2=Exec(j, s1).l2 by SCMPDS_5:41
        .=s1.l2+ -1 by A17,SCMPDS_2:48
        .=Exec(i, s0).l2+-1 by SCMPDS_5:40
        .=s0.l2+ -1 by A15,AMI_3:10,SCMPDS_2:48
        .=k by A6;
A19:  s2.a=Exec(j, s1).a by SCMPDS_5:41
        .=s1.a by A17,AMI_3:10,SCMPDS_2:48
        .=Exec(i, s0).a by SCMPDS_5:40
        .=s.a+1 by A15,SCMPDS_2:48;
A20:  s2.GBP=Exec(j, s1).GBP by SCMPDS_5:41
        .=0 by A16,A17,AMI_3:10,SCMPDS_2:48;
A21: (Initialize s2).intpos 2=s2.intpos 2 by SCMPDS_5:15;
A22: (Initialize s2).a=s2.a by SCMPDS_5:15;
A23: (Initialize s2).GBP=s2.GBP by SCMPDS_5:15;
      DataLoc(s.GBP,2)=intpos(0 qua Nat+2) by A7,SCMP_GCD:1;
      hence IExec(FD,P,s).a =IExec(FD,P2,Initialize s2).a
       by A6,A7,A8,A9,Th47
        .=k+s2.a by A5,A18,A20,A21,A22,A23
        .=k+1+s.a by A19;
    end;
    hence P[k+1];
  end;
A24: P[0]
  proof
    let s be 0-started State of SCMPDS;
    assume that
A25: s.intpos 2=0 and
A26: s.GBP=0;
A27: Initialize s = s by MEMSTR_0:44;
    DataLoc(s.GBP,2)=intpos((0 qua Nat)+2) by A26,SCMP_GCD:1;
    hence thesis by A25,Th45,A27;
  end;
  for k be Nat holds P[k] from NAT_1:sch 2(A24,A4);
  hence IExec(FD,P,s).a=n+(0 qua Nat) by A1,A2,A3
    .=n;
end;

theorem
  for s being 0-started State of SCMPDS,n be Nat
   holds IExec(sum(n),P,s).intpos 3 =n
proof
  let s be 0-started State of SCMPDS,n be Nat;
  set i1= GBP:=0, i2= (GBP,2):=n, i3= (GBP,3):=0, i4= AddTo(GBP,3,1), FD=
  for-down(GBP,2,1, Load i4), a = intpos 3, I2=i1 ';' i2,
  s1=IExec(I2,P,s), s2=
  Exec(i1, s), I3=I2 ';' i3, s3=IExec(I3,P,s), P3 = P;
A1: I3 is_closed_on s,P by SCMPDS_6:20;
A2: I3 is_halting_on s,P by SCMPDS_6:21;
A3: s2.GBP=0 by SCMPDS_2:45;
  then
A4: DataLoc(s2.GBP,2)=intpos((0 qua Nat)+2) by SCMP_GCD:1;
A5: s1.GBP=Exec(i2, s2).GBP by SCMPDS_5:42
    .=0 by A3,A4,AMI_3:10,SCMPDS_2:46;
  then
A6: DataLoc(s1.GBP,3)=intpos((0 qua Nat)+3) by SCMP_GCD:1;
A7: (Initialize s3).GBP=s3.GBP by SCMPDS_5:15;
A8: s3.GBP=Exec(i3,s1).GBP by SCMPDS_5:41
    .=0 by A5,A6,AMI_3:10,SCMPDS_2:46;
  then FD is_halting_on Initialize s3, P3 by Th48,A7;
  then
A9: FD is_halting_on s3,P3 by SCMPDS_6:126;
A10: s3.intpos 2=Exec(i3,s1).intpos 2 by SCMPDS_5:41
    .=s1.intpos 2 by A6,AMI_3:10,SCMPDS_2:46
    .=Exec(i2, s2).intpos 2 by SCMPDS_5:42
    .=n by A4,SCMPDS_2:46;
A11: s3.a=Exec(i3,s1).a by SCMPDS_5:41
    .=0 by A6,SCMPDS_2:46;
A12: (Initialize s3).intpos 2=s3.intpos 2 by SCMPDS_5:15;
A13: (Initialize s3).a=s3.a by SCMPDS_5:15;
A14: (Initialize s3).GBP=s3.GBP by SCMPDS_5:15;
  FD is_closed_on Initialize s3, P3 by A8,Th48,A14;
  then FD is_closed_on s3,P3 by SCMPDS_6:125;
  hence IExec(sum(n),P,s).a
      = IExec(FD,P3,Initialize s3).a by A1,A2,A9,Th28
    .= n by A11,A8,A10,Th49,A12,A13,A14;
end;

:: sum=Sum x1+x2+...+x2

definition
  let sp,control,result,pp,pData be Nat;
  func sum(sp,control,result,pp,pData) -> Program of SCMPDS equals
  ((intpos sp
  ,result):=0) ';' (intpos pp:=pData) ';' for-down(intpos sp,control,1, AddTo(
  intpos sp,result,intpos pData,0) ';' AddTo(intpos pp,0,1));
  coherence;
end;

theorem Th51:
  for s being 0-started State of SCMPDS,sp,cv,result,pp,pD be Nat
st s.intpos sp > sp & cv < result & s.intpos pp=pD & s.intpos sp+result < pp &
pp <pD & pD < s.intpos pD
 holds for-down(intpos sp,cv,1, AddTo(intpos sp,result,intpos pD,0) ';'
  AddTo(intpos pp,0,1)) is_closed_on s,P &
   for-down(intpos sp,cv,1, AddTo(intpos sp,result,intpos pD,0) ';'
  AddTo(intpos pp,0,1)) is_halting_on s,P
proof
  let s be 0-started State of SCMPDS, sp,cv,fr,pp,pD be Nat;
  set BP=intpos sp, PD=intpos pD, PP=intpos pp;
  assume that
A1: s.BP > sp and
A2: cv < fr and
A3: s.PP=pD and
A4: s.BP+fr <pp and
A5: pp < pD and
A6: pD < s.PD;
  set i2= AddTo(BP,fr,PD,0), i3= AddTo(PP,0,1), I= i2 ';' i3;
  per cases;
  suppose
    s.DataLoc(s.BP,cv) <= 0;
    hence thesis by Th42;
  end;
  suppose
A7: s.DataLoc(s.BP,cv) > 0;
    reconsider n=s.BP as Element of NAT by A1,INT_1:3;
    n+cv <> sp by A1,NAT_1:11;
    then |.n+cv.| <> sp by ABSVALUE:def 1;
    then
A8: DataLoc(s.BP,cv) <> BP by XTUPLE_0:1;
A9: n+fr > n+cv by A2,XREAL_1:6;
A10: now
      set Dv=DataLoc(s.BP,cv);
      let t be 0-started State of SCMPDS;
      let Q;
A11:   Initialize t = t by MEMSTR_0:44;
      assume that
A12:  for x be Int_position st x in {BP,PP} holds t.x=s.x and
A13:  t.BP=s.BP;
      set t0=Initialize t, t1=Exec(i2, t0);
A14:  DataLoc(t0.BP,fr)=DataLoc(n,fr) by A13,SCMPDS_5:15
        .=intpos(n+fr) by SCMP_GCD:1;
      then DataLoc(t0.BP,fr) <> PP by A4,XTUPLE_0:1;
      then
A15:  t1.PP=t0.PP by SCMPDS_2:49
        .=t.PP by SCMPDS_5:15;
      n+fr <> sp by A1,NAT_1:11;
      then DataLoc(t0.BP,fr) <> BP by A14,XTUPLE_0:1;
      then
A16:  t1.BP=t0.BP by SCMPDS_2:49
        .=t.BP by SCMPDS_5:15;
      PP in {BP,PP} by TARSKI:def 2;
      then t1.PP=pD by A3,A12,A15;
      then
A17:  DataLoc(t1.PP,0)=intpos (pD+(0 qua Nat)) by SCMP_GCD:1;
      then
A18:  |.t1.PP+(0 qua Nat).| = pD by XTUPLE_0:1;
      n <= n+fr by NAT_1:11;
      then sp < n+fr by A1,XXREAL_0:2;
      then |.t1.PP+(0 qua Nat).| <> sp by A4,A5,A18,XXREAL_0:2;
      then
A19:  DataLoc(t1.PP,0) <> BP by XTUPLE_0:1;
      Dv=intpos(n+cv) by SCMP_GCD:1;
      then
A20:  |.s.BP+cv.| = n+cv by XTUPLE_0:1;
      then |.t1.PP+(0 qua Nat).| <> |.s.BP+cv.| by A4,A5,A9,A18,XXREAL_0:2;
      then
A21:  DataLoc(t1.PP,0) <> Dv by XTUPLE_0:1;
      |.t0.BP+fr.| = n+fr by A14,XTUPLE_0:1;
      then |.t0.BP+fr.| <> |.s.BP+cv.| by A2,A20;
      then
A22:  DataLoc(t0.BP,fr) <> Dv by XTUPLE_0:1;
      thus
A23:  IExec(I,Q,t).BP=Exec(i3, t1).BP by A11,SCMPDS_5:42
        .=t.BP by A16,A19,SCMPDS_2:48;
      thus IExec(I,Q,t).Dv=Exec(i3, t1).Dv by A11,SCMPDS_5:42
        .=t1.Dv by A21,SCMPDS_2:48
        .=t0.Dv by A22,SCMPDS_2:49
        .=t.Dv by SCMPDS_5:15;
      thus I is_closed_on t,Q & I is_halting_on t,Q by SCMPDS_6:20,21;
A24:  IExec(I,Q,Initialize t).PP=Exec(i3, t1).PP by SCMPDS_5:42
        .=t.PP by A3,A6,A15,A17,SCMPDS_2:48;
      hereby
        let y be Int_position;
        assume
A25:    y in {BP,PP};
        per cases by A25,TARSKI:def 2;
        suppose
          y=BP;
          hence IExec(I,Q,t).y=t.y by A23;
        end;
        suppose
          y=PP;
          hence IExec(I,Q,t).y=t.y by A24,MEMSTR_0:44;
        end;
      end;
    end;
    n+cv <> pp by A2,A4,XREAL_1:6;
    then |.n+cv.| <> pp by ABSVALUE:def 1;
    then DataLoc(s.BP,cv) <> PP by XTUPLE_0:1;
    then not DataLoc(s.BP,cv) in {BP,PP} by A8,TARSKI:def 2;
    hence thesis by A7,A8,A10,Th46;
  end;
end;

theorem Th52:
  for s being 0-started State of SCMPDS,sp,cv,result,pp,pD be Nat,
  f be FinSequence of NAT st s.intpos sp > sp & cv < result & s.intpos pp=pD &
  s.intpos sp+result < pp & pp <pD & pD < s.intpos pD & s.DataLoc(s.intpos sp,
result)=0 & len f = s.DataLoc(s.intpos sp,cv) & for k be Nat st k <
len f holds f.(k+1)=s.DataLoc(s.intpos pD,k)
 holds IExec(for-down(intpos sp,cv,
1, AddTo(intpos sp,result,intpos pD,0) ';'
AddTo(intpos pp,0,1)),P,s).DataLoc(s.
  intpos sp,result)=Sum f
proof
  let s be 0-started State of SCMPDS,
      sp,cv,fr,pp,pD be Nat, f be FinSequence
  of NAT;
  set BP=intpos sp, PD=intpos pD, PP=intpos pp;
  assume that
A1: s.BP > sp and
A2: cv < fr and
A3: s.PP=pD and
A4: s.BP+fr <pp and
A5: pp < pD and
A6: pD < s.PD and
A7: s.DataLoc(s.BP,fr)=0 and
A8: len f = s.DataLoc(s.BP,cv) and
A9: for k be Nat st k < len f holds f.(k+1)=s.DataLoc(s.PD,k);
  reconsider n=s.BP as Element of NAT by A1,INT_1:3;
A10: n+fr < pD by A4,A5,XXREAL_0:2;
  set i2= AddTo(BP,fr,PD,0), i3= AddTo(PP,0,1), I= i2 ';' i3, FD= for-down(BP,
  cv,1,I), a=DataLoc(s.BP,fr);
  defpred P[Nat] means
   for t be 0-started State of SCMPDS,f be FinSequence of
NAT st t.BP=s.BP & t.PP=pD & pD < t.PD & len f = t.DataLoc(t.BP,cv) & len f=$1
  & for k be Nat st k < len f holds f.(k+1)=t.DataLoc(t.PD,k) holds
  IExec(FD,Q,t).a=Sum f+t.a;
  n <= n+fr by NAT_1:11;
  then
A11: sp < n+fr by A1,XXREAL_0:2;
A12: n+fr > n+cv by A2,XREAL_1:6;
  then n+cv < pp by A4,XXREAL_0:2;
  then
A13: n+cv < pD by A5,XXREAL_0:2;
A14: now
    let k be Nat;
    assume
A15: P[k];
    now
      let t be 0-started State of SCMPDS,f be FinSequence of NAT;
      let Q be Instruction-Sequence of SCMPDS;
      assume that
A16:  t.BP=s.BP and
A17:  t.PP=pD and
A18:  pD < t.PD and
A19:  len f = t.DataLoc(t.BP,cv) and
A20:  len f=k+1 and
A21:  for i be Nat st i < len f holds f.(i+1)=t.DataLoc(t.PD,i );
A22:  f is FinSequence of REAL by FINSEQ_2:24, NUMBERS:19;
A23:  now
        set Dv=DataLoc(t.BP,cv);
        let u be 0-started State of SCMPDS;
        let U be Instruction-Sequence of SCMPDS;
A24:    Initialize u = u by MEMSTR_0:44;
        assume that
A25:    for x be Int_position st x in {BP,PP} holds u.x=t.x and
A26:    u.BP=t.BP;
        set t0=Initialize u, t1=Exec(i2, t0);
A27:    DataLoc(t0.BP,fr)=DataLoc(n,fr) by A16,A26,SCMPDS_5:15
          .=intpos(n+fr) by SCMP_GCD:1;
        then
A28:    |.t0.BP+fr.| = n+fr by XTUPLE_0:1;
        then
A29:    t1.PP=t0.PP by A3,A5,A7,A27,SCMPDS_2:49
          .=u.PP by SCMPDS_5:15;
        PP in {BP,PP} by TARSKI:def 2;
        then
A30:    t1.PP=pD by A17,A25,A29;
        then t1.PP+(0 qua Nat) <> sp by A4,A5,A11,XXREAL_0:2;
        then |.t1.PP+(0 qua Nat).| <> sp by A30,ABSVALUE:def 1;
        then
A31:    DataLoc(t1.PP,0) <> BP by XTUPLE_0:1;
A32:    t1.BP=t0.BP by A1,A7,A27,A28,SCMPDS_2:49
          .=u.BP by SCMPDS_5:15;
        thus
A33:    IExec(I,U,u).BP=Exec(i3, t1).BP by A24,SCMPDS_5:42
          .=u.BP by A32,A31,SCMPDS_2:48;
        Dv=intpos(n+cv) by A16,SCMP_GCD:1;
        then
A34:    |.t.BP+cv.| = n+cv by XTUPLE_0:1;
        then |.t0.BP+fr.| <> |.t.BP+cv.| by A2,A28;
        then
A35:    DataLoc(t0.BP,fr) <> Dv by XTUPLE_0:1;
A36:    DataLoc(t1.PP,0)=intpos (pD+(0 qua Nat)) by A30,SCMP_GCD:1;
        then |.t1.PP+(0 qua Nat).|=pD+(0 qua Nat) by XTUPLE_0:1;
        then |.t1.PP+(0 qua Nat).| <> |.t.BP+cv.|
         by A4,A5,A12,A34,XXREAL_0:2;
        then
A37:    DataLoc(t1.PP,0) <> Dv by XTUPLE_0:1;
        thus IExec(I,U,u).Dv=Exec(i3, t1).Dv by A24,SCMPDS_5:42
          .=t1.Dv by A37,SCMPDS_2:48
          .=t0.Dv by A35,SCMPDS_2:49
          .=u.Dv by SCMPDS_5:15;
        thus I is_closed_on u, U & I is_halting_on u, U by SCMPDS_6:20,21;
A38:    IExec(I,U,Initialize u).PP=Exec(i3, t1).PP by SCMPDS_5:42
          .=u.PP by A3,A6,A29,A36,SCMPDS_2:48;
          let y be Int_position;
          assume
A39:      y in {BP,PP};
          per cases by A39,TARSKI:def 2;
          suppose
            y=BP;
            hence IExec(I,U,u).y=u.y by A33;
          end;
          suppose
            y=PP;
            hence IExec(I,U,u).y=u.y by A38,MEMSTR_0:44;
          end;
      end;
A40:  a=intpos(n+fr) by SCMP_GCD:1;
      set t0=t, t1=Exec(i2, t0);
      set j=AddTo(BP,cv,-1), s2=IExec(I ';'j,Q,t), P2 = Q,
      g=Del(f,1);
      set It=IExec(I,Q,t);
  DataLoc(t0.BP,fr) =intpos(n+fr) by A16,SCMP_GCD:1;
      then
A41:  |.t0.BP+fr.| = n+fr by XTUPLE_0:1;
A42:  t1.BP =t.BP by A1,A7,A16,SCMPDS_2:49;
      t1.PP =t.PP by A3,A5,A7,A16,SCMPDS_2:49;
      then
A43:  DataLoc(t1.PP,0)=intpos (pD+(0 qua Nat)) by A17,SCMP_GCD:1;
      then
A44:  |.t1.PP+(0 qua Nat).|=pD+(0 qua Nat) by XTUPLE_0:1;
      then |.t1.PP+(0 qua Nat).| <> sp by A4,A5,A11,XXREAL_0:2;
      then
A45:  DataLoc(t1.PP,0) <> BP by XTUPLE_0:1;
A46:  It.BP=Exec(i3, t1).BP by SCMPDS_5:42
        .=t.BP by A42,A45,SCMPDS_2:48;
      then
A47:  DataLoc(It.BP,cv)=intpos(n+cv) by A16,SCMP_GCD:1;
      then
A48:  |.It.BP+cv.|=n+cv by XTUPLE_0:1;
      then pD <> |.It.BP+cv.| by A4,A5,A12,XXREAL_0:2;
      then
A49:  PD <> DataLoc(It.BP,cv) by XTUPLE_0:1;
A50:  f.((0 qua Nat)+1) =t0.DataLoc(t0.PD,0) by A20,A21;
      n+fr <> |.It.BP+cv.| by A2,A48;
      then
A51:  a <> DataLoc(It.BP,cv) by A40,XTUPLE_0:1;
A52:  It.a=Exec(i3, t1).a by SCMPDS_5:42
        .=t1.a by A6,A7,A43,SCMPDS_2:48
        .=t.a + f.1 by A16,A50,SCMPDS_2:49;
A53:  s2.a=Exec(j, It).a by SCMPDS_5:41
        .=f.1+t.a by A51,A52,SCMPDS_2:48;
      n+cv <> sp by A1,NAT_1:11;
      then |.n+cv.| <> sp by ABSVALUE:def 1;
      then
A54:  DataLoc(t.BP,cv) <> BP by A16,XTUPLE_0:1;
A55:  s2.PD=Exec(j, It).PD by SCMPDS_5:41
        .=It.PD by A49,SCMPDS_2:48
        .=Exec(i3, t1).PD by SCMPDS_5:42
        .=t1.PD+1 by A43,SCMPDS_2:48
        .=t.PD+1 by A6,A7,A16,SCMPDS_2:49;
      then t.PD < s2.PD by XREAL_1:29;
      then
A56:  pD < s2.PD by A18,XXREAL_0:2;
      1 <= k+1 by NAT_1:11;
      then 1 in Seg (k+1) by FINSEQ_1:1;
      then
A57:  1 in dom f by A20,FINSEQ_1:def 3;
      then
A58:  len g +1=len f by WSIERP_1:def 1;
A59:   s2.PD = (Initialize s2).PD by SCMPDS_5:15;
A60:   s2.DataLoc(s2.BP,cv) = (Initialize s2).DataLoc(s2.BP,cv) by SCMPDS_5:15;
A61:   s2.PP = (Initialize s2).PP by SCMPDS_5:15;
A62:   s2.BP = (Initialize s2).BP by SCMPDS_5:15;
A63:
    for k be Nat st k < len g
     holds g.(k+1)=(Initialize s2).DataLoc((Initialize s2).PD,k)
 proof
        reconsider m=t.PD as Element of NAT by A18,INT_1:3;
        let i be Nat;
        set SD=DataLoc((Initialize s2).PD,i);
        assume
        i < len g;
        then
A64:    i+1 < len g+1 by XREAL_1:6;
A65:   s2.SD = (Initialize s2).SD by SCMPDS_5:15;
        SD =intpos(m+(1+i)) by A55,A59,SCMP_GCD:1;
        then
A66:    |.s2.PD+i.| = m+(1+i) by A59,XTUPLE_0:1;
        then |.t1.PP+(0 qua Nat).| <> |.s2.PD+i.| by A18,A44,NAT_1:11;
        then
A67:    DataLoc(t1.PP,0) <> SD by A59,XTUPLE_0:1;
        m <= m+(1+i) by NAT_1:11;
        then |.t0.BP+fr.|<> |.s2.PD+i.|by A10,A18,A41,A66,XXREAL_0:2;
        then
A68:    DataLoc(t0.BP,fr)<> SD by A59,XTUPLE_0:1;
        n+cv < m by A13,A18,XXREAL_0:2;
        then |.s2.PD+i.| <> |.It.BP+cv.| by A48,A66,NAT_1:11;
        then
A69:    SD <> DataLoc(It.BP,cv) by A59,XTUPLE_0:1;
A70:    s2.SD=Exec(j, It).SD by SCMPDS_5:41
          .=It.SD by A69,SCMPDS_2:48
          .=Exec(i3, t1).SD by SCMPDS_5:42
          .=t1.SD by A67,SCMPDS_2:48
          .=t.SD by A68,SCMPDS_2:49;
        (0 qua Nat)+1 <= i+1 by XREAL_1:6;
        hence g.(i+1)=f.(i+1+1) by A57,WSIERP_1:def 1
          .=t.DataLoc(t.PD,i+1) by A21,A58,A64
          .=(Initialize s2).SD by A66,A70,A65,SCMPDS_5:15;
      end;
      |.t0.BP+fr.| <> n+cv by A2,A41;
      then
A71:  DataLoc(t0.BP,fr)<> intpos(n+cv) by XTUPLE_0:1;
      |.t1.PP+(0 qua Nat).| <> n+cv by A4,A5,A12,A44,XXREAL_0:2;
      then
A72:  DataLoc(t1.PP,0) <> intpos(n+cv) by XTUPLE_0:1;
A73:  It.intpos(n+cv)=Exec(i3, t1).intpos(n+cv) by SCMPDS_5:42
        .=t1.intpos(n+cv) by A72,SCMPDS_2:48
        .=t.intpos(n+cv) by A71,SCMPDS_2:49
        .=k+1 by A16,A19,A20,SCMP_GCD:1;
      |.It.BP+cv.| <> sp by A1,A48,NAT_1:11;
      then
A74:  DataLoc(It.BP,cv) <> BP by XTUPLE_0:1;
A75:  s2.BP=Exec(j, It).BP by SCMPDS_5:41
        .=s.BP by A16,A46,A74,SCMPDS_2:48;
      then DataLoc(s2.BP,cv)=intpos(n+cv) by SCMP_GCD:1;
      then
A76:  s2.DataLoc(s2.BP,cv)=Exec(j, It).intpos(n+cv) by SCMPDS_5:41
        .=It.intpos(n+cv)+ -1 by A47,SCMPDS_2:48
        .=len g by A20,A58,A73;
      pp <> |.It.BP+cv.| by A2,A4,A48,XREAL_1:6;
      then
A77:  PP <> DataLoc(It.BP,cv) by XTUPLE_0:1;
A78:  s2.PP=Exec(j, It).PP by SCMPDS_5:41
        .=It.PP by A77,SCMPDS_2:48
        .=Exec(i3, t1).PP by SCMPDS_5:42
        .=t1.PP by A3,A6,A43,SCMPDS_2:48
        .=pD by A17,A3,A5,A7,A16,SCMPDS_2:49;
      1 <= len f by A20,NAT_1:11;
      then
A79:  1 in dom f by FINSEQ_3:25;
      n+cv <> pp by A2,A4,XREAL_1:6;
      then |.n+cv.| <> pp by ABSVALUE:def 1;
      then DataLoc(s.BP,cv) <> PP by XTUPLE_0:1;
      then not DataLoc(t.BP,cv) in {BP,PP} by A16,A54,TARSKI:def 2;
      hence IExec(FD,Q,t).a =IExec(FD,P2,Initialize s2).a
       by A19,A20,A54,A23,Th47
        .=Sum g+(Initialize s2).a
         by A15,A20,A75,A58,A76,A78,A56,A63,A59,A60,A61,A62
        .=Sum g+s2.a by SCMPDS_5:15
        .=Sum g+f.1+t.a by A53
        .=Sum f+t.a by A79,A22,WSIERP_1:20;
    end;
    hence P[k+1];
  end;
  now
    let t be 0-started State of SCMPDS,f be FinSequence of NAT;
    assume that
    t.BP=s.BP and
    t.PP=pD and
    pD < t.PD and
A80: len f = t.DataLoc(t.BP,cv) and
A81: len f=0 and
    for k be Nat st k < len f holds f.(k+1)=t.DataLoc(t.PD,k);
A82:  Initialize t = t by MEMSTR_0:44;
    f = <*>NAT by A81;
    hence IExec(FD,Q,t).a =Sum f + t.a by A80,Th45,A82,RVSUM_1:72;
  end;
  then
A83: P[0];
  for k be Nat holds P[k] from NAT_1:sch 2(A83,A14);
  hence IExec(FD,P,s).a=Sum f+(0 qua Nat) by A3,A6,A7,A8,A9
    .=Sum f;
end;

theorem
  for s being 0-started State of SCMPDS,
   sp,cv,result,pp,pD be Nat, f be
FinSequence of NAT st s.intpos sp > sp & cv < result & s.intpos sp+result < pp
  & pp <pD & pD < s.intpos pD & len f = s.DataLoc(s.intpos sp,cv) & for k be
Nat st k < len f holds f.(k+1)=s.DataLoc(s.intpos pD,k)
 holds IExec(
  sum(sp,cv,result,pp,pD),P,s).DataLoc(s.intpos sp,result)=Sum f
proof
  let s be 0-started State of SCMPDS,
      sp,cv,fr,pp,pD be Nat, f be FinSequence
  of NAT;
  set BP=intpos sp, PD=intpos pD, PP=intpos pp;
  assume that
A1: s.BP > sp and
A2: cv < fr and
A3: s.BP+fr <pp and
A4: pp < pD and
A5: pD < s.PD and
A6: len f = s.DataLoc(s.BP,cv) and
A7: for k be Nat st k < len f holds f.(k+1)=s.DataLoc(s.PD,k);
  reconsider n=s.BP as Element of NAT by A1,INT_1:3;
A8: PD <> PP by A4,XTUPLE_0:1;
  set i0= (BP,fr):=0, i1= PP:=pD, Hi= i0 ';' i1, i2= AddTo(BP,fr,PD,0), i3=
AddTo(PP,0,1), FD= for-down(BP,cv,1,i2 ';' i3), s2=IExec(Hi,P,s),
  P2 = P,
  s0=s, s1=Exec(i0, s0), a =DataLoc(s.BP,fr), a1=DataLoc(s2.BP,fr);
A9: DataLoc(s0.BP,fr) =intpos(n+fr) by SCMP_GCD:1;
  then
A10: |.s0.BP+fr.| = n+fr by XTUPLE_0:1;
  then |.s0.BP+fr.| <> sp by A1,NAT_1:12;
  then
A11: DataLoc(s0.BP,fr) <> BP by XTUPLE_0:1;
A12: DataLoc(s0.BP,fr) <> PD by A3,A4,A9,XTUPLE_0:1;
A13: s2.PD=Exec(i1, s1).PD by SCMPDS_5:42
    .=s1.PD by A8,SCMPDS_2:45
    .=s.PD by A12,SCMPDS_2:46;
  n <= n+fr by NAT_1:12;
  then sp <> pp by A1,A3,XXREAL_0:2;
  then
A14: BP <> PP by XTUPLE_0:1;
A15: intpos(n+fr) <> PP by A3,XTUPLE_0:1;
A16: s2.BP=Exec(i1, s1).BP by SCMPDS_5:42
    .=s1.BP by A14,SCMPDS_2:45
    .=n by A11,SCMPDS_2:46;
  then
A17: s2.DataLoc(s2.BP,fr)=s2.intpos(n+fr) by SCMP_GCD:1
    .=Exec(i1, s1).intpos(n+fr) by SCMPDS_5:42
    .=s1.intpos(n+fr) by A15,SCMPDS_2:45
    .=0 by A9,SCMPDS_2:46;
A18: n+fr < pD by A3,A4,XXREAL_0:2;
A19: now
    reconsider m=s.PD as Element of NAT by A5,INT_1:3;
    let k be Nat;
    assume
A20: k < len f;
    pp < m by A4,A5,XXREAL_0:2;
    then m+k <> pp by NAT_1:11;
    then
A21: intpos(m+k) <> PP by XTUPLE_0:1;
    m <= m + k by NAT_1:11;
    then |.s0.BP+fr.| <> m+k by A5,A10,A18,XXREAL_0:2;
    then
A22: DataLoc(s0.BP,fr) <> intpos(m+k) by XTUPLE_0:1;
    thus (Initialize s2).DataLoc(s2.PD,k)
       = s2.DataLoc(s2.PD,k) by SCMPDS_5:15
      .=s2.intpos(m+k) by A13,SCMP_GCD:1
      .=Exec(i1, s1).intpos(m+k) by SCMPDS_5:42
      .=s1.intpos(m+k) by A21,SCMPDS_2:45
      .=s.intpos(m+k) by A22,SCMPDS_2:46
      .=s.DataLoc(s.PD,k) by SCMP_GCD:1
      .=f.(k+1) by A7,A20;
  end;
  |.s0.BP+fr.| <> n+cv by A2,A10;
  then
A23: DataLoc(s0.BP,fr) <> intpos(n+cv) by XTUPLE_0:1;
  n+cv <> pp by A2,A3,XREAL_1:6;
  then
A24: intpos(n+cv) <> PP by XTUPLE_0:1;
A25: Hi is_halting_on s,P by SCMPDS_6:21;
A26: Hi is_closed_on s,P by SCMPDS_6:20;
A27:  s2.PP = (Initialize s2).PP by SCMPDS_5:15;
A28:  s2.BP = (Initialize s2).BP by SCMPDS_5:15;
A29:  s2.PD = (Initialize s2).PD by SCMPDS_5:15;
A30: s2.PP=Exec(i1, s1).PP by SCMPDS_5:42
    .=pD by SCMPDS_2:45;
  then FD is_halting_on Initialize s2, P2
   by A1,A2,A3,A4,A5,A16,A13,Th51,A27,A28,A29;
  then
A31: FD is_halting_on s2,P2 by SCMPDS_6:126;
A32: s2.DataLoc(s2.BP,cv)=s2.intpos(n+cv) by A16,SCMP_GCD:1
    .=Exec(i1, s1).intpos(n+cv) by SCMPDS_5:42
    .=s1.intpos(n+cv) by A24,SCMPDS_2:45
    .=s.intpos(n+cv) by A23,SCMPDS_2:46
    .=len f by A6,SCMP_GCD:1;
A33:  s2.DataLoc(s2.BP,fr) = (Initialize s2).DataLoc(s2.BP,fr) by SCMPDS_5:15;
A34:  s2.DataLoc(s2.BP,cv) = (Initialize s2).DataLoc(s2.BP,cv) by SCMPDS_5:15;
  FD is_closed_on Initialize s2,P2
   by A1,A2,A3,A4,A5,A16,A30,A13,Th51,A27,A28,A29;
  then FD is_closed_on s2,P2 by SCMPDS_6:125;
  hence IExec(sum(sp,cv,fr,pp,pD),P,s).a
      = IExec(FD,P2,Initialize s2).a1 by A16,A26,A25,A31,Th28
    .= Sum f
     by A1,A2,A3,A4,A5,A16,A30,A13,A17,A32,A19,Th52,A27,A28,A29,A33,A34;
end;


Messung
CHZG
8010010093

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.171Angebot  ¤

*Eine klare Vorstellung vom Zielzustand







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

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