SSL scmpds_6.miz
Interaktion und PortierbarkeitMizar
|
|
:: The Construction and Computation of Conditional Statements for SCMPDS
:: by JingChao Chen
::
:: Received June 15, 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, RELAT_1,
XBOOLE_0, GRAPHSP, XXREAL_0, CIRCUIT2, ARYTM_3, CARD_1, FUNCT_1, FUNCT_4,
TARSKI, TURING_1, SCMFSA_7, SCMPDS_4, AMISTD_2, COMPLEX1, VALUED_1,
SCMFSA6B, MSUALG_1, SCMPDS_5, SCMFSA8A, AMI_3, ARYTM_1, UNIALG_2,
SCMFSA7B, SCMFSA8B, NAT_1, STRUCT_0, SCMPDS_6, PARTFUN1, EXTPRO_1,
SCMFSA6C, COMPOS_1;
notations TARSKI, XBOOLE_0, SUBSET_1, XCMPLX_0, RELAT_1, FUNCT_1, CARD_1,
PARTFUN1, VALUED_1, ORDINAL1, NUMBERS, COMPLEX1, FUNCT_4, INT_1, NAT_1,
STRUCT_0, MEMSTR_0, COMPOS_0, COMPOS_1, EXTPRO_1, AMI_2, SCMPDS_2,
SCMPDS_4, SCMPDS_5, XXREAL_0;
constructors REAL_1, INT_2, SCMPDS_4, SCMPDS_5, FUNCT_4, PRE_POLY, RELSET_1,
DOMAIN_1;
registrations XXREAL_0, XREAL_0, NAT_1, INT_1, SCMPDS_2, SCMPDS_4, SCMPDS_5,
ORDINAL1, XBOOLE_0, MEMSTR_0, AFINSQ_1, COMPOS_1, FUNCT_4, RELAT_1,
AMI_3, COMPOS_0;
requirements NUMERALS, REAL, SUBSET, ARITHM;
definitions SCMPDS_4;
equalities FUNCOP_1, COMPOS_1, EXTPRO_1, SCMPDS_4, MEMSTR_0, ORDINAL1;
expansions EXTPRO_1, SCMPDS_4;
theorems NAT_1, TARSKI, FUNCT_4, FUNCT_1, INT_1, SCMPDS_2, ABSVALUE, GRFUNC_1,
SCMPDS_4, SCMPDS_5, XBOOLE_1, XREAL_1, ORDINAL1, FUNCOP_1, XXREAL_0,
VALUED_1, PARTFUN1, MEMSTR_0, AFINSQ_1, COMPOS_1, EXTPRO_1, PBOOLE,
RELAT_1;
schemes NAT_1;
begin :: Preliminaries
reserve m,n for Nat,
a for Int_position,
i,j for Instruction of SCMPDS,
s,s1,s2 for State of SCMPDS,
k1 for Integer,
loc for Nat,
I,J,K for Program of SCMPDS;
set A = NAT;
set D = SCM-Data-Loc;
Lm1: (Stop SCMPDS). 0 = halt SCMPDS;
Lm2: 0 in dom Stop SCMPDS by COMPOS_1: 3;
reserve P,P1,P2 for Instruction-Sequence of SCMPDS;
::$CT 5
theorem Th1:
card (i ';' I)= card I + 1
proof
thus card (i ';' I) = card (Load i ';' I)
.=card (Load i) + card I by AFINSQ_1: 17
.=card I+ 1 by COMPOS_1: 54;
end;
theorem Th2:
(i ';' I). 0=i
proof
i ';' I=Load i ';' I & 0 in dom Load i by COMPOS_1: 50;
hence (i ';' I). 0 =(Load i). 0 by AFINSQ_1:def 3
.=i;
end;
::$CT 3
theorem Th3:
CurInstr(P +* stop(i ';' I),Initialize s) = i
proof
set iI=i ';' I, P3 = P +* stop(i ';' I);
A1: 0 in dom Load i by COMPOS_1: 50;
card iI=card I + 1 by Th1;
then
A2: 0 in dom iI by AFINSQ_1: 66;
iI c= stop iI by AFINSQ_1: 74;
then dom iI c= dom stop iI by RELAT_1: 11;
then
A3: 0 in dom stop iI by A2;
A4: (P +* stop(i ';' I))/.IC (Initialize s)
= (P +* stop(i ';' I)).IC (Initialize s) by PBOOLE: 143;
P3. 0 = (P +* stop(i ';' I)). 0
.= (stop iI). 0 by A3,FUNCT_4: 13
.= iI. 0 by A2,COMPOS_1: 63
.=(Load i ';' I). 0
.=(Load i). 0 by A1,AFINSQ_1:def 3
.=i;
hence thesis by A4,MEMSTR_0: 47;
end;
theorem Th4:
for s being State of SCMPDS,m1,m2 being Nat st IC s=
m1 holds ICplusConst(s,m2)= m1+m2
proof
let s be State of SCMPDS,m1,m2 be Nat;
ex m being Element of NAT st m = IC s & ICplusConst(s,m2) = |.m+m2.|
by SCMPDS_2:def 18;
hence thesis by ABSVALUE:def 1;
end;
theorem Th5:
for I,J being Program of SCMPDS holds Shift(stop J,card I) c=
stop(I ';' J)
proof
let I,J be Program of SCMPDS;
stop(I ';' J) =I ';' J ';' Stop SCMPDS
.=I ';' (J ';' Stop SCMPDS) by AFINSQ_1: 27
.=I ';' (stop J);
then stop(I ';' J) = I +* Shift(stop J, card I);
hence thesis by FUNCT_4: 25;
end;
::$CT
theorem
for s being 0-started State of SCMPDS, i being No-StopCode parahalting
Instruction of SCMPDS,J being parahalting shiftable Program of SCMPDS, a being
Int_position
holds IExec(i ';' J,P,s).a = IExec(J,P,Initialize Exec(i,s)).a
proof
let s be 0-started State of SCMPDS,
i be No-StopCode parahalting Instruction of SCMPDS,
J be parahalting shiftable Program of SCMPDS, a be Int_position;
thus IExec(i ';' J,P,s).a = IExec(Load i ';' J,P,s).a
.= IExec(J,P,Initialize IExec(Load i,P,s)).a by SCMPDS_5: 35
.= IExec(J,P,Initialize Exec(i,s)).a by SCMPDS_5: 40;
end;
theorem
for a being Int_position,k1,k2 being Integer holds (a,k1)
<> 0_goto k2 <> halt SCMPDS
proof
InsCode halt SCMPDS = 0 by COMPOS_1: 70;
hence thesis by SCMPDS_2: 16;
end;
theorem
for a being Int_position,k1,k2 being Integer
holds (a,k1) <= 0_goto k2 <> halt SCMPDS
proof
InsCode halt SCMPDS = 0 by COMPOS_1: 70;
hence thesis by SCMPDS_2: 17;
end;
theorem
for a being Int_position,k1,k2 being Integer
holds (a,k1) >= 0_goto k2 <> halt SCMPDS
proof
InsCode halt SCMPDS = 0 by COMPOS_1: 70;
hence thesis by SCMPDS_2: 18;
end;
definition
let k1 be Integer;
func Goto k1 -> Program of SCMPDS equals
Load goto k1;
coherence;
end;
registration
let n be Nat;
cluster goto (n+ 1) -> No-StopCode;
correctness by SCMPDS_5: 21;
cluster goto -(n+ 1) -> No-StopCode;
correctness by SCMPDS_5: 21;
end;
registration
let n be Nat;
cluster Goto (n+ 1) -> halt-free;
correctness;
cluster Goto -(n+ 1) -> halt-free;
correctness;
end;
theorem Th10:
0 in dom Goto k1 & (Goto k1). 0 = goto k1 by AFINSQ_1: 65;
begin :: The predicates of is_closed_on and is_halting_on
definition
let I be Program of SCMPDS;
let s be State of SCMPDS;
let P;
pred I is_closed_on s,P means
for k being Nat holds
IC Comput(P+*stop I,Initialize s,k) in dom stop I;
pred I is_halting_on s,P means
P+*stop I halts_on Initialize s;
end;
theorem Th11:
for I being Program of SCMPDS holds I is paraclosed iff
for s being State of SCMPDS, P holds I is_closed_on s,P
proof
let I be Program of SCMPDS;
thus I is paraclosed implies for s be State of SCMPDS,P holds
I is_closed_on s,P by FUNCT_4: 25;
assume
A1: for s being State of SCMPDS,P holds I is_closed_on s,P;
let s be 0-started State of SCMPDS;
let k be Nat;
let P;
A2: Initialize s = s by MEMSTR_0: 44;
assume stop I c= P;
then
A3: P = P +* stop I by FUNCT_4: 98;
I is_closed_on s,P by A1;
hence IC Comput(P,s,k) in dom stop I by A2,A3;
end;
theorem Th12:
for I being Program of SCMPDS holds I is parahalting iff
for s being State of SCMPDS,P holds I is_halting_on s,P
proof
let I be Program of SCMPDS;
thus I is parahalting implies for s be State of SCMPDS, P holds
I is_halting_on s,P by FUNCT_4: 25;
assume
A1: for s being State of SCMPDS, P holds I is_halting_on s,P;
let s be 0-started State of SCMPDS, P;
A2: Initialize s = s by MEMSTR_0: 44;
assume stop I c= P;
then
A3: P = P +* stop I by FUNCT_4: 98;
I is_halting_on s,P by A1;
hence P halts_on s by A3,A2;
end;
theorem Th13:
for s1,s2 being State of SCMPDS, I being Program of SCMPDS st
DataPart s1 = DataPart s2 holds I is_closed_on s1,P1
implies I is_closed_on s2,P2
proof
let s1,s2 be State of SCMPDS,I be Program of SCMPDS;
set pI=stop I, S1 = Initialize s1, S2 = Initialize s2,
E1 = P1 +* pI, E2 = P2 +* pI;
assume
A1: DataPart s1 = DataPart s2;
A2: Comput(E2,S2, 0) = Initialize s2 by EXTPRO_1: 2;
A3: Comput(E1,S1, 0) = Initialize s1 by EXTPRO_1: 2;
then
A4: DataPart Comput(E1,S1, 0) = DataPart s1 by MEMSTR_0: 45
.= DataPart Comput(E2,S2, 0) by A1,A2,MEMSTR_0: 45;
defpred P[Nat] means IC Comput(E1,S1,$ 1) = IC Comput(E2,S2,$ 1)
& CurInstr(E1,Comput(E1,S1,$ 1)) = CurInstr(E2,Comput(E2,S2,$ 1))
& DataPart Comput(E1,S1,$ 1) = DataPart Comput(E2,S2,$ 1);
A5: 0 in dom pI by COMPOS_1: 36;
assume
A6: I is_closed_on s1,P1;
A7: now
let k be Nat;
A8: Comput(E2,S2,k+ 1) = Following(E2,Comput(E2,S2,k)) by EXTPRO_1: 3;
assume
A9: P[k];
then
A10: for a holds Comput(E1,S1,k).a = Comput(E2,S2,k).
a by SCMPDS_4: 8;
pI c= P2 +* pI by FUNCT_4: 25;
then
A11: pI c= E2;
A12: IC Comput(E1,S1,k+ 1) in dom pI by A6;
A13: Comput(E1,S1,k+ 1) = Following(E1,Comput(E1,S1,k)) by EXTPRO_1: 3;
Comput(E1,S1,k) = Comput(E2,S2,k) by A9,A10,SCMPDS_4: 2;
then
A14: Comput(E1,S1,k+ 1) = Comput(E2,S2,k+ 1) by A9,A8,A13;
then
A15: Comput(E1,S1,k+ 1)
= Comput(E2,S2,k+ 1);
A16: IC Comput(E1,S1,k+ 1) = IC Comput(E2,S2,k+ 1) by A14;
A17
: E1/.IC Comput(E1,S1,k+ 1)
= E1.IC Comput(E1,S1,k+ 1) by PBOOLE: 143;
A18: E2/.IC Comput(E2,S2,k+ 1)
= E2.IC Comput(E2,S2,k+ 1) by PBOOLE: 143;
pI c= P1 +* pI by FUNCT_4: 25;
then pI c= E1;
then CurInstr(E1,Comput(E1,S1,k+ 1))
= pI.IC Comput(E1,S1,k+ 1) by A12,A17,GRFUNC_1: 2
.= CurInstr(E2,Comput(E2,S2,k+ 1))
by A11,A16,A12,A18,GRFUNC_1: 2;
hence P[k+ 1] by A15;
end;
A19: IC Comput(E2,S2, 0) = IC S2 by A2
.= 0 by MEMSTR_0:def 11;
A20: E1/.IC Comput(E1,S1, 0)
= E1.IC Comput(E1,S1, 0) by PBOOLE: 143;
A21: E2/.IC Comput(E2,S2, 0)
= E2.IC Comput(E2,S2, 0) by PBOOLE: 143;
A22: IC Comput(E1,S1, 0) = IC S1
by A3
.= 0 by MEMSTR_0:def 11;
then CurInstr(E1,Comput(E1,S1, 0))
= pI. 0 by A5,A20,FUNCT_4: 13
.= CurInstr(E2,Comput(E2,S2, 0)) by A19,A5,A21,FUNCT_4: 13;
then
A23: P[ 0] by A22,A19,A4;
now
let k be Nat;
A24: for k being Nat holds P[k] from NAT_1:sch 2(A23,A7);
IC Comput(E1,S1,k) in dom pI by A6;
hence IC Comput(E2,S2,k) in dom pI by A24;
end;
hence thesis;
end;
theorem
for s1,s2 being State of SCMPDS,I being Program
s1 = DataPart s2 holds I is_closed_on s1,P1 & I is_halting_on s1,P1
implies I is_closed_on s2,P2 & I is_halting_on s2,P2
proof
let s1,s2 be State of SCMPDS,I be Program of SCMPDS;
set pI=stop I, S1 = Initialize s1, S2 = CurInstr(E1,Comput(E1,S1,$1)) = CurInstr(E2(, 2, 1)
P1+ pI,E2 =P2 + pI;
defpred P[ 1:Comput( 1,S1,)=Initialize s1 by EXTPRO_1:;
IC Comput( 1, 1,$)=IC Comput( 2,S2, 1)&
assume DataPart s1 = DataPart s2;
then
Comput( 1,S1, 1)=DataPart Comput( 2, 2, 1)
: Comput( 1, 1,)=Initialize s1 by EXTPRO_1:;
A2: Comput assume
assume : I is_closed_onP 1;
then
A3: Comput(E1,S1, 0) = Comput(E2,S2, 0) by A1,A2,MEMSTR_0: 80;
A4: 0 in dom pI by COMPOS_1: 36;
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
: s1;
A6: now
let k be Nat;A6: IC sm = card byA1,2Th20A3;
(E2S2k+) = (,omputE2,,))by EXTPRO_13java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
assume
A8: P[k];
then holds (,S1,)a=ComputE2S,). SCMPDS_48java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
: I; ''J''SS
A9: = ' G1''J); AFINSQ_127
A10: pI.=''J2 by
CComput(E1,S1k1 indompIby A5java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
,,+1 FollowingE1ComputE,,k) by EXTPRO_13java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
then
A12: Comput(E1,S1,
then
A13: IC A14: cardIin pJbyAFINSQ_166
A14: A15: ca =1by AFINSQ_1:4;
= E1.IC A16:card J2 c + SS ,FINSQ_117
A15: E2/.IC Comput(E2,S2,k+;
= E2.IC Comput(E2,S2then
pIA17 cardJ+1 indomJ2 byAFINSQ_166
CurInstrE1,(E1,,+1))
= pI.IC Comput java.lang.StringIndexOutOfBoundsException: Range [16, 11) out of bounds for length 49
then
by A10,A13,A11,A18 card +card +1 AFINSQ_1:66;
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
end
A16: IC Comput(E2=P2IC Comput(2,,ifeSpanP1))by PBOOLE143
.:def11;
assume
I =P2.card Iby A1,,h20,19Ajava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
*halts_on Initializes1java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
then m such
A17: CurInstr(E1 =goto(J + 1) by A11,A8,AFINSQ_1:def 3;
A18: A21:now
A19: E2/.IC java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 10
) = A1
.= 0 by MEMSTR_0:def 11;
CurInstr(E1,Comput(1,10)
= pI. 0 by A4,A18,FUNCT_4:13
.= =sma A20,CMPDS_2:4java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
then
:P[0]by A3;
now=. (,s2L(,1)+1)
by PBOOLE:143;
A21: thus IC( + pJ ,(P1,1)+ 1)
IC Comput(E1,S1,k) in dom pI by A5;
hence Comput(E2,S2,) pI ;
end;
. ICplusConstsmcardJ +) A20,CMPDS_254
for k being Nat holds P[k] from NAT_1 .(ardI+(card J +1)) byA6,Th4
2,omputE2,2,)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
= halt SCMPDS:CurInstrP2
then P2 +* (2 ,ifeSpan(1,1 +1)
hence = P2.card I +card J
end;
theorem
1) by A22
proof
let s State SCMPDS,I, beProgram ofSCMPDS;
DataPart .= (I ';J2.c +card +) by
hence thesis by Th13;
end;
theorem Th16:
for s being 0-started State of SCMPDS
for I,J DataPart (1 ,ifeSpanP1))=DataPart
st I s, is_halting_onsjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
holds (for k being Nat
st k <= LifeSpan(P +* stop I,s) holds
IC( *stop I,s,k)=IC ComputP+ (I ';' J),,) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
DataPartComput( *stop I,sL( *stop I,)) java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
DataPartA24java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
proof
let s be - State of SCMPDS;
let I,J be Program of SCMPDS;
assume
assume
P1(,,)< SCMPDS A1A,Th19A3;
set pI=stop I, pIJ=stop CurInstr +pJ,( *pJs2k)) <>haltSCMPDS
defpredX] means $< (,)implies
Comput(
assume I
then
A3: P1 halts_on s by LifeSpan(P1,1) <= kjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
A4: for m st X[m] holds X[m+1]hence ( *pJ,( + pJ,2,k))<
proof
set JS=J ';' Stop SCMPDS, E2 = P1 +* pIJ;
let m;
assume
IC ComputP*pJ,s2L(,s1))
A6: pIJ c= = card by A1,A2A,Th20,3;
A7: Comput(P1,s,m+1 thus
8 I' '; SCMPDS
.=I now
dom(I let k Nat;
.= dom I \/ dom Shift(JS, card I) by FUNCT_4:def 1;
then
A9: dom I c= dom(I ';' JS assume
java.lang.StringIndexOutOfBoundsException: Range [11, 3) out of bounds for length 67
A11: IC Comput(P1,s,m) in dom pI by =halt SCMPDS;
A12: P1/IC Comput(1,,)
= P1.IC Comput(P1,s LifeSpanP1s)1< k by INT_1:7;
pI c= P1end;
then
(P1C(1s,)
= pI.IC (Comput(P1,s,end;
assume
A14: m+1 <= LifeSpan(P1,s);
then java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
then , of SCMPDSjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
then
A15: IC Comput(P1,s,m) in dom I by A11,COMPOS_1:51;
A16 is_closed_ons, is_halting_on ,P ; (ardJ+1 ; java.lang.StringIndexOutOfBoundsException: Range [76, 77) out of bounds for length 76
= E2.C Comput(E2,,)by PBOOLE:43;
CurInstr(P1,Comput(P1,s,m))
= java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
=.IC (omputP1,s,) by ,FINSQ_1d 3
.=pIJ.IC(Comput(P1,s,m)) by A15,A8,AFINSQ_1:def 3
.=E2.IC(Comput(P1,s,m)) by A6,A15,A8,A9,GRFUNC_1:2
.= CurInstr(E2,Comput(E2,s,m))
by A5,A14,A16,NAT_1:13;
hence thesis by A5,A14,A7,A10,NAT_1:13;
end;
Comput(P1, s,0) = s &
Comput(P1 +* pIJ, s,0) = s by EXTPRO_1:2;
then
A17: X[0];
A18: for m holds X[m] from NAT_1:sch 2(A17,A4);
A19: P +* pI +* pIJ = P +* (pI +* pIJ) by FUNCT_4:14
.= P +* pIJ by SCMPDS_5:14;
thus for k being Nat st k <= LifeSpan(P1,s)
holds IC Comput(P1,s,k) =IC Comput(P +* pIJ, s,k) by A18,A19;
Comput(P +* stop I, s, LifeSpan(P +* stop I,s)) =
Comput(P +* stop(I ';' J),s,(LifeSpan(P +* stop I,s))) by A19,A18;
hence
DataPart Comput(P +* stop I, s, (LifeSpan(P +* stop I,s))) =
DataPart Comput(P +* stop(I ';' J), s,(LifeSpan(P +* stop I,s)));
end;
theorem Th17:
for I being Program of SCMPDS,k be Nat st I
is_closed_on s,P & I is_halting_on s,P &
k < LifeSpan(P +* stop I,Initialize s)
holds IC Comput(P +* stop I,Initialize s,k) in dom I
proof
let /s4
set = P4.IC byPBOOLE143
m=: cardpJ=card +cardJSby ,FINSQ_117java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
assumethat
A1: I is_closed_on s,P and
java.lang.StringIndexOutOfBoundsException: Range [19, 2) out of bounds for length 27
k<m;
set Sk=.=JS.0byA28AFINSQ_1:ef 3
A4: .=.0 A26,24A: 3
reconsider n .goto(ard 1)
A5: card (G''J
A6: PP halts_on.1 + JbyCOMPOS_154;
A7: now
:PP. Sk =PP.CSk PBOOLE143
assume
A9: n = card J + 1)JS.(+ard G''J)
CurInstr = SCMPDSby Lm1,m2,FINSQ_1: ;
.=(stop I)A37 P2/ICComput(P2,,+) P2.C ComputP,,m1)byPBOOLE:143;
.=haltA38:ICComput(2,s +1)=IC (P2,4)by :java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
hence contradiction by A3,A6,EXTPRO_1:def 15;
end;
card stop I=card I + 1 by 1)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
then n < card I +1 by A4,FINSQ_166;
then n <= card ( 1 A37
thenn< I A7,XXREAL_01java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
hence thesis byAFINSQ_166java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
end;
Th18:
for I, IJis_halting_ons, byA2,1;
s java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 7
Nat st I is_closed_on s,P & set C1k=IC Comput(P1, s,k=IC(2,s,k;
k < LifeSpan(P +* stop I
holds CurInstr(P
CurInstr(P +* C1kindom pI by ,1;
proof
m of,
s be 0-started State of hence C2k in dom pJ by A7,A1,h16java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
A42: k >mjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
sets3 Comput(1,s,),s4= Comput(2, s,)
P3 = P1, P4 = P2A43: m2< + byA39,A40,XTPRO_1def15;
SS=Stop k >= m > + A42,NT_17;
assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P & k < LifeSpan(P1,s);
A3: Initialize s = s by MEMSTR_0:44;
then
A4: IC s3 in dom I by A1,A2,Th17;
A5: IC s3= IC s4 by A1,A2,Th16;
A6: IC s3 in dom stop(I) by A1,A3;
A7: dom stop I c= dom stop (I ';' J) & stop (I ';' J) c= P2 by FUNCT_4:25
,SCMPDS_5:13;
A8: stop I c= P1 by FUNCT_4:25;
A9: stop (I ';' J) = I ';' J ';' SS
.=I ';' (J ';' SS) by AFINSQ_1:27;
A10: P3/.IC s3 = P3.IC s3 by PBOOLE:143;
A11: P4/.IC s4 = P4.IC s4 by PBOOLE:143;
thus CurInstr(P1,s3) =P1.IC s3 by A10
.=(stop I).IC s3 by A6,A8,GRFUNC_1:2
.=I.IC s3 by A4,AFINSQ_1:def 3
.=(stop (I ';' J)).IC s3 by A4,A9,AFINSQ_1:def 3
.=P2.IC s4 by A5,A6,A7,GRFUNC_1:2
.=CurInstr(P2,s4) by A11;
end;
theorem Th19: ::SCMPDS_5:32
for I being halt-free Program of SCMPDS,s being State of
SCMPDS, k being Nat st I is_closed_on s,P &
I is_halting_on s,P & k <
LifeSpan(P +* stop I,Initialize s)
holds
CurInstr(P +* stop I,Comput(P +* stop I,Initialize s,k)) <> halt SCMPDS
proof
let I be halt-free Program of SCMPDS,s be State of SCMPDS, k be Nat;
set ss=Initialize s, PP = P +* stop I,
s2= Comput(PP, ss,k), P2 = PP;
assume
I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan(PP,ss);
then
A1: IC s2 in dom I by Th17;
A2: P2/.IC s2 = P2.IC s2 by PBOOLE:143;
A3: stop I c= PP by FUNCT_4:25;
I c= stop I by AFINSQ_1:74;
then I c= PP by A3,XBOOLE_1:1;
then CurInstr(P2,s2)=I.IC s2 by A1,A2,GRFUNC_1:2;
hence thesis by A1,COMPOS_1:def 27;
end;
theorem Th20:
for I being halt-free Program of SCMPDS,s being State of
SCMPDS st I is_closed_on s,P & I is_halting_on s,P
holds IC Comput(P +* stop I, Initialize s,
LifeSpan(P +* stop I,Initialize s)) = card I
proof
let I be halt-free Program of SCMPDS,s be State of SCMPDS;
set s1=Initialize s, P1 = P +* stop I;
assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P;
set Css= Comput(P1, s1,LifeSpan(P1,s1));
reconsider n = IC Css as Nat;
A3: stop I c= P1 by FUNCT_4:25;
I c= stop I by AFINSQ_1:74;
then
A4: I c= P1 by A3,XBOOLE_1:1;
A5: P1 halts_on s1 by A2;
now
A6: P1/.IC Css = P1.IC Css by PBOOLE:143;
assume
A7: IC Css in dom I;
then I.IC Css=P1.IC Css by A4,GRFUNC_1:2
.=CurInstr(P1,Css) by A6
.=halt SCMPDS by A5,EXTPRO_1:def 15;
hence contradiction by A7,COMPOS_1:def 27;
end;
then
A8: n >= card I by AFINSQ_1:66;
A9: card stop I =card I + 1 by COMPOS_1:55;
IC Css in dom stop(I) by A1;
then n < card I + 1 by A9,AFINSQ_1:66;
then n <= card I by NAT_1:13;
then IC Comput(P1, s1,LifeSpan(P1,s1)) = card I by A8,XXREAL_0:1;
hence thesis;
end;
Lm3:
for beinghalt- Program SCMPDS ProgramofSCMPDS,
s being 0-started State of SCMPDS
=P1 byMEMSTR_0:ef 11
holds IC Comput(P +* stop (I ';' Goto (card J + 1) ';' J ),
s, (LifeSpan(P +* stop I,s) + 1)) =
( I card +1 &
DataPart Comput(PA12:fork being Nat []holdsP +1]
(LifeSpanA16 + indomShiftSIn VALUED_124;
= A17: Comput,k1 (2,ComputP2k)by:3;
1)'' J,sjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
(LifeSpan( =SIICComputP1,)byA1,GRFUNC_12java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
(forA21:InsCodei <> 1 InsCode >3by A18,:def;
NAT A22: ivalid_at mby A18A,CMPDS_4def9java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
holds CurInstr(PA23:ICComputP1,1,1 n = ComputP,,k+)
by A13,A1A17,A21,:;
s,k)) <> halt SCMPDS) &
IC Comput(P +* stop (I ';' Goto (cardA24:P1/IC Comput(P1,1k+)
= P1IC (P1,1,+)by PBOOLE143java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
= card I &
P+*stop I'; Goto(ardJ+1)'; J)
halts_on s &
* stop I ''Goto (
card J + 1) ';' J),s) = LifeSpan(P +* stop I,s) + 1
proof
halt Program SCMPDS J Programof SCMPDS,
s be 0-started State of SCMPDS;
assume
A1: I s,P;
set G1=Goto ( by A23,15VALUED_1:def 12
G1 ' . .IC Comput(2,,+) by ,,A16,GRFUNC_12
s2 = =CurInstr(2Comput(2,2k1)
reconsiderP2 = +
as Instruction thus thesis by A13,14,,,A22,:28;
assume
A2: I is_halting_on s,P;
3:Initializes=sby MEMSTR_044java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
set sm= Comput(P2,0:ef 11;
A4: IJ A27:ComputP,,)=s1 by EXTPRO_1:;
then
. =. byPBOOLE;
then
byA2Th20Ajava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
A7: 0 in dom G1 by Th10;
A8: J2. 0 = (G1 ';' (J ';' thesisjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
.
.=goto (theorem :::SCMFSA8A:61
card s 0- StateofSCMPDSIbeing haltfree Programof SCMPDS,
.=1 + card J by COMPOS_1:54;
then
A9: J2. (card J + 1)=J2.(0+card (G1 ';' J holdsIC IExecI''Goto( J 1) ; ,,)
.=halt SCMPDS by Lm1,Lm2,AFINSQ_1:def 3;
A10: card J2 =card card J + 1
.=proof
.= 1 + card lets 0started Stateof ,
then
A11: I halt-ree Programof ,J java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 4
A12: pJ =I ';' G1 ';' J ';' SS
.=I ';' (G1 ';' J) ';' SS by AFINSQ_1:27
.=I ';' J2 by AFINSQ_1:27;
then
A13: card pJ = card I + card J2 by AFINSQ_1:17;
0 < card J2;
then card I + 0 < card pJ by A13,XREAL_1:6;
then
A14: card I in dom pJ by AFINSQ_1:66;
A15: card SS = 1 by AFINSQ_1:34;
A16: card J2 = 1 + (card J + card SS) by A10,AFINSQ_1:17
.= card J + (1 + card SS);
then card J + 1 < card J2 by A15,XREAL_1:6;
then
A17: (card J + 1) in dom J2 by AFINSQ_1:66;
card pJ = card I + card J + 1 + 1 by A13,A16,A15;
then card I + card J + 1 < card pJ by NAT_1:13;
then
A18: (card I + card J + 1) in dom pJ by AFINSQ_1:66;
A19: P2/.IC Comput(P2,s2,LifeSpan(P1,s1))
= P2.IC Comput(P2,s2,LifeSpan(P1,s1)) by PBOOLE:143;
A20: CurInstr(P2,Comput(P2,s2,LifeSpan(P1,s1)))
= P2.card I by A1,A2,A5,Th20,A19,A3
.= P2. card I
.= pJ. card I by A14,FUNCT_4:13
.= (I ';' J2).(0+card I) by A12
.= goto (card J + 1) by A11,A8,AFINSQ_1:def 3;
A21: now
let a;
thus Comput(P2, s2,LifeSpan(P1,s1) + 1).a
= (Following(P2,sm)).a by EXTPRO_1:3
.= sm.a by A20,SCMPDS_2:54;
end;
A22: P2/.IC Comput(P2, s2,LifeSpan(P1,s1) + 1)
= P2.IC Comput(P2, s2,LifeSpan(P1,s1) + 1)
by PBOOLE:143;
thus IC Comput(P +* pJ, s2,LifeSpan(P1,s1) + 1)
= IC Following(P2,sm) by EXTPRO_1:3
.= ICplusConst(sm,card J +1) by A20,SCMPDS_2:54
.= (card I + (card J + 1)) by A6,Th4
.= (card I + card J + 1);
then
A23: CurInstr(P2,
Comput(P2, s2,LifeSpan(P1,s1) + 1))
= P2. (card I + card J
+ 1) by A22
.= pJ. (card I + card J + 1) by A18,FUNCT_4:13
.= (I ';' J2).(card I+(card J+1)) by A12
.= halt SCMPDS by A17,A9,AFINSQ_1:def
DataPart Comput(P1, s1
sm java.lang.StringIndexOutOfBoundsException: Range [31, 15) out of bounds for length 38
hence DataPart s4 = Comput(P3,s,1
DataPart P4=;
by A21,SCMPDS_4A2:Initialize s=s MEMSTR_044java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
thus
A24:
let k be Element =i '' I2 by SCMPDS_414java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
A25: k <= A6: Comput(P3, s,01 (P3,ComputP,,))by EXTPRO_1:3
per cases;
A26: k < LifeSpan(P1,s1);
CurInstr <>haltSCMPDS A1A,,;
hence CurInstr(P +* pJ,Comput(P for aholds sa .byA6,CMPDS_2:5java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
by,A4,26Th18
;
suppose
LifeSpan(P1,s1) <= k;
then k = LifeSpan(P1,s1) by A25,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 38
hence CurInstr( *pJ,ComputP+ ,2,k)) <>
halt SCMPDS by A20;
end;
end;
ComputP+ pJ,s2LifeSpan(1,1)
= card I by A1,A2,A5,Th20,A3;
assu
A27: P +* A10:I is_closed_onsPjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
now
let k be Natjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
k in NATby : 12;
assume
CurInstr(P2,Comput(P2,s2,k))
=halt SCMPDS;
then LifeSpan(P1,s1:I2 is_closed_on s,by A10A11,;
hence LifeSpan(P1,s1)+1 <= k by INT_1:7;
end;
hence by A23,27,XTPRO_1d 15;
end;
theorem Th21:
for I,J being Program of SCMPDS,
s being 0-started State of SCMPDS st I
is_closed_on s,P & I is_halting_on s,P holds I ';' Goto (card J + 1) ';' J
is_halting_on s,P & I ';' Goto (card J + 1) ';' J is_closed_on s,P
proof
let I,J be Program of SCMPDS,s be 0-started State of SCMPDS;
set G = Goto (card J + 1), IJ = I ';' G ';' J, J2 = I ';' (G ';' J), pJ =
stop J2, pI =stop I, P1 = P +* pI, P2 = P +* pJ,
m=LifeSpan(P1,s), SS=Stop SCMPDS,
s3= Comput(P1, s,m), s4= Comput(P2, s,m),
P3= P1, P4 = P2;
A1: Initialize s = s by MEMSTR_0:44;
A2: IJ=I ';' (G ';' J) by AFINSQ_1:27;
A3: I c= stop I by AFINSQ_1:74;
pI c= P3 by FUNCT_4:25;
then
A4: I c= P3 by A3,XBOOLE_1:1;
A5: dom pI c= dom pJ by SCMPDS_5:13;
set JS=G ';' J ';' SS;
reconsider n = IC s3 as Nat;
A6: card pI=card I + 1 by COMPOS_1:55;
assume
A7: I is_closed_on s,P;
then IC s3 in dom pI by A1;
then n < card I + 1 by A6,AFINSQ_1:66;
then
A8: n <= card I by INT_1:7;
A9: pJ c= P2 by FUNCT_4:25;
A10: pJ =I ';' (G ';' J) ';' SS
.=I ';' JS by AFINSQ_1:27;
then I c= pJ by AFINSQ_1:74;
then I c= P2 by A9,XBOOLE_1:1;
then
A11: I c= P4;
assume
A12: I is_halting_on s,P;
then
A13: P1 halts_on s by A1;
A14: P3/.IC s3
= P3.IC s3 by PBOOLE:143;
A15: P4/.IC s4
= P4.IC s4 by PBOOLE:143;
per cases;
suppose
IC s3 <> card I;
then n < card I by A8,XXREAL_0:1;
then
A16: IC s3 in dom I by AFINSQ_1:66;
A17: halt SCMPDS=CurInstr(P1,s3) by A13,EXTPRO_1:def 15
.=I.IC s3 by A4,A16,A14,GRFUNC_1:2
.=P4.IC s3 by A11,A16,GRFUNC_1:2
.=CurInstr(P4,s4) by A7,A12,Th16,A15;
then
A18: P2 halts_on s by EXTPRO_1:29;
hence IJ is_halting_on s,P by A2,A1;
now
let k be Nat;
set C1k=IC Comput(P1, s,k), C2k=IC Comput(P2
, s,k);
per cases;
suppose
A19: k <= m;
C1k in dom pI by A7,A1;
then C1k in dom pJ by A5;
hence C2k in dom pJ by A7,A12,A19,Th16;
end;
suppose
A20: k > m;
set m2=LifeSpan(P2,s);
A21: m2 <= m by A17,A18,EXTPRO_1:def 15;
then C2k=IC Comput(P2, s,m2) by A18,A20,EXTPRO_1:25,XXREAL_0:2
.=IC Comput(P1, s,m2) by A7,A12,A21,Th16;
then C2k in dom pI by A7,A1;
hence C2k in dom pJ by A5;
end;
end;
hence thesis by A2,A1;
end;
suppose
A22: IC s3 = card I;
then
A23: IC s4= card I by A7,A12,Th16;
A24: 0 in dom G by Th10;
A25: card Stop SCMPDS = 1 by AFINSQ_1:34;
A26: JS =G ';' (J ';' SS) by AFINSQ_1:27;
then
A27: card JS =card G + card (J ';' SS) by AFINSQ_1:17
.= 1 + card (J ';' SS) by COMPOS_1:54
.= card J + 1 + 1 by A25,AFINSQ_1:17;
then
A28: 0 in dom JS by AFINSQ_1:66;
card J + 1 < card JS by A27,NAT_1:13;
then
A29: (card J + 1) in dom JS by AFINSQ_1:66;
card pJ = card I + (card J + (1 + 1)) by A10,A27,AFINSQ_1:17
.= card I + card J + 1 + 1;
then
A30: card I + card J + 1 < card pJ by NAT_1:13;
then
A31: (card I + card J + 1) in dom pJ by AFINSQ_1:66;
A32: P4/.IC s4
= P4.IC s4 by PBOOLE:143;
A33: card pJ = card I + card JS by A10,AFINSQ_1:17;
0 < card JS;
then card I + 0 < card pJ by XREAL_1:6,A33;
then
A34: card I in dom pJ by AFINSQ_1:66;
A35: CurInstr(P4,s4)= P4. card I by A7,A12,A22,Th16,A32
.= P2. card I
.= (I ';' JS).(0+card I) by A10,A9,A34,GRFUNC_1:2
.= JS. 0 by A28,AFINSQ_1:def 3
.=G. 0 by A26,A24,AFINSQ_1:def 3
.=goto (card J + 1);
card (G ';' J) = card G + card J by AFINSQ_1:17
.=1 + card J by COMPOS_1:54;
then
A36: JS. (card J + 1)=JS.(0+card (G ';' J))
.=halt SCMPDS by Lm1,Lm2,AFINSQ_1:def 3;
A37: P2/.IC Comput(P2,s,m+1) = P2.IC Comput(P2,s,m+1) by PBOOLE:143;
A38: IC Comput(P2, s,m + 1) = IC Following(P2,s4) by EXTPRO_1:3
.= ICplusConst(s4,card J +1) by A35,SCMPDS_2:54
.= (card I + (card J + 1)) by A23,Th4
.= (card I + card J + 1);
then
A39: CurInstr(P2,Comput(P2,s,m+1))
= P2. (card I + card J + 1) by A37
.= (I ';' JS).(card I+(card J+1)) by A10,A9,A31,GRFUNC_1:2
.= halt SCMPDS by A29,A36,AFINSQ_1:def 3;
then
A40: P2 halts_on s by EXTPRO_1:29;
hence IJ is_halting_on s,P by A2,A1;
now
let k be Nat;
set C1k=IC Comput(P1, s,k), C2k=IC Comput(P2, s,k);
per cases;
suppose
A41: k <= m;
C1k in dom pI by A7,A1;
then C1k in dom pJ by A5;
hence=(IPs)+* by MEMSTR_036
end;
suppose
A42: k > m;
settheorem Th32:
A43: m2 <= m for s beingStateofSCMPDS, Program of , being
k >= m+1 by A42, halt-free shiftable Program of SCMPDS, being Int_position,k1 being Integer
then C2k=IC st s.(.,1)>0 &Jis_closed_on s, ,
.= ( holds IExec(if=0,,IJ,,nitialize s) = IExec(,P,nitialize )+
At( +2,java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
end;
end;
hence thesis by A2,A1;
end;
end;
theorem Th22:
for s1 being 0-started State of SCMPDS
for I being shiftable Program of SCMPDS
stop I= P1 I is_closed_on s1,1
for n being Nat st
Shift(stop I,n) c= P2 & IC
s2= n & DataPart s1 = DataPart s2 for ibeing Nat holds IC
Comput(P1, s1,i) + n = IC Comput(P2, s2,i) &
CurInstr(P1,Comput(P1,s1 IF,s3 = s = + pIF
DataPart Comput(P1, s1,i) = DataPart Comput(P2, s2,i s4 =Comput(P3,s3,1), P4 = P3;
proof
let s1 be 0-started State of SCMPDS;
hiftable Program of SCMPDS;
set SI=stop I;
assume that
A2: I is_closed_on s1,P1;
: Initialize s1 = s1 by MEMSTR_0:4
let n be Nat;
]means IC Comput(P1,,1) + n =IC
Comput(P2,s2,$1) & CurInstr(P1,Comput(P1,s1,$1))
= CurInstr( .= i ';' (I ; G';'J by :14;
DataPart Comput(P1,s1,$1) =A2 Comput(, s3,
assume that:s4ICplusConsts3,ardI+2 A2,,:55
A4: Shift(SI,n) c . 0( 2) byA5T;
A5: IC fora.=abyA2SCMPDS_255
A6: DataPart s1 = DataPart s2;
let i be Nat;
A7 s2 by A6,XTPRO_1:2
.= DataPart Comput(P2,s2,0) by EXTPRO_1:2;
A8: 0 in dom SI by COMPOS_1:36;
then
A9: (0 + n) in dom Shift(SI,n) by VALUED_1:24;
:P1IC s1 P1. Initialize s1 by A3
.= P1. 0 by MEMSTR_0:def 11
.= SI. 0 by A1,A8,GRFUNC_1:2;
A11 .cardI +1+1 by Th1
A12: for k being .card I +1 +1);
proof
let k be Nat;
assume
A13: P[k];
reconsiderm=IC Comput(1,1k as Nat;
set i = CurInstr(P1,Comput(P1,thenShift(pJ,ard I+) =P3 by A8,XBOOLE_1:;
A14: Comput(P1,s1,k+ then
reconsider l IC Comput(,1,k+)as Nat;
A15: IC Comput(P1,s1,k+1) in dom SI by A2,A11thus IExecIF,Initializes. =(esultP3s3)).
then
A16 . IExec(,,Initialize)x
A17: Comput(P2,s2,k+1) = Following(P2,Comput(P2,s2,k)) by EXTPRO_1:3;
A18: IC Comput(P1,s1,k) in dom SI by A2,A11,A3;
A19 : P1/.IC Comput(P1,s1,k) = P1.IC Comput(P1,s1,k) by PBOOLE:143;
A20: i = P1.IC Comput(P1,s1,k) by A19
.= SI.IC Comput(P1,s1,k) by A1,A18,GRFUNC_1:2;
then
A21: InsCode i <> 1 & InsCode i <> 3 by A18,SCMPDS_4:def 9;
A22: i valid_at m by A18,A20,SCMPDS_4:def 9;
hence
A23: IC Comput(P1,s1,k+1) + n = IC Comput(P2,s2,k+1)
by A13,A14,A17,A21,SCMPDS_4:28;
A24: P1/.IC Comput(P1,s1,k+1)
= P1.IC Comput(P1,s1,k+1) by PBOOLE:143;
A25: P2/.IC Comput(P2,s2,k+1)
= P2.IC Comput(P2,s2,k+1) by PBOOLE:143;
CurInstr(P1,Comput(P1,s1,k+1)) = P1.l by A24
.= SI.l by A1,A15,GRFUNC_1:2
.= SI.l;
hence CurInstr(P1,Comput(P1,s1,k+1))
= Shift(SI,n).(IC Comput(P2,s2,k+1))
by A23,A15,VALUED_1:def 12
.= P2.IC Comput(P2,s2,k+1) by A4,A23,A16,GRFUNC_1:2
.= CurInstr(P2,Comput(P2,s2,k+1))
by A25;
thus thesis by A13,A14,A17,A21,A22,SCMPDS_4:28;
end;
A26: IC Comput(P1,s1,0) = IC s1 by EXTPRO_1:2
.= IC Initialize s1 by A3
.= 0 by MEMSTR_0:def 11;
A27: Comput(P1,s1,0) = s1 by EXTPRO_1:2;
A28: Comput(P2,s2,0) = s2 by EXTPRO_1:2;
A29: P2/.IC s2 = P2.IC s2 by PBOOLE:143;
A30: P1/.IC s1 = P1.IC s1 by PBOOLE:143;
CurInstr(P1,Comput(P1,s1,0))
= CurInstr(P1,s1) by A27
.= Shift(SI,n).(0 + n) by A8,A10,A30,VALUED_1:def 12
.= CurInstr(P2,s2) by A4,A5,A9,A29,GRFUNC_1:2
.= CurInstr(P2,Comput(P2,s2,0))
by A28;
then
A31: P[0] by A5,A26,A7,EXTPRO_1:2;
for k being Nat holds P[k] from NAT_1:sch 2(A31,A12);
hence thesis;
end;
theorem Th23: ::SCMFSA8A:61
for s being 0-started State of SCMPDS,I being halt-free Program of SCMPDS,
J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P
holds IC IExec(I ';' Goto (card J + 1) ';' J,P,s)
= card I + card J + 1
proof
let s be 0-started State of SCMPDS,
I be halt-free Program of SCMPDS, J be Program of
SCMPDS;
set
m= LifeSpan(P +* stop I,Initialize s)+1,
G=Goto (card J + 1),
P2 = P +* stop (I ';' G ';' J);
A1: Initialize s = s by MEMSTR_0:44;
assume
A2: I is_closed_on s,P & I is_halting_on s,P;
then P2 halts_on s & LifeSpan(P2,s) = m by Lm3,A1;
then IC Result(P2,s) = IC Comput(P2, s,m) by EXTPRO_1:23
.= card I + card J + 1 by A2,Lm3,A1;
hence thesis;
end;
theorem Th24: ::SCMFSA8A:62
for s being 0-started State of SCMPDS,I being halt-free Program of
SCMPDS, J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P
holds
IExec(I ';' Goto (card J + 1) ';' J,P,s)
= IExec(I,P,s) +* Start-At((card I + card J + 1),SCMPDS)
proof
let s be 0-started State of SCMPDS,
I be halt-free Program of SCMPDS, J be Program of
SCMPDS;
set P1 = P +* stop I,
m= LifeSpan(P1,s)+1, G=Goto (card J + 1),
P2 = P +* stop (I ';' G ';' J),
l= (card I + card J + 1);
assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P;
Initialize
then
A3: P1 halts_on s by A2;
P2 halts_on s & LifeSpan(P2,s) = m
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
then
A4: Result(P2,s) = Comput(P2, s,m) by EXTPRO_1:23;
then DataPart Result(P2,s) = DataPart Comput(P1,s,LifeSpan(P1,s))
by A1,A2,Lm3;
then
A5: DataPart Result(P2,s) = DataPart Result(P1,s) by A3,EXTPRO_1:23
.= DataPart(Result(P1,s) +* Start-At(l,SCMPDS)) by MEMSTR_0:79;
IC Result(P2,s) = l by A1,A2,A4,Lm3
.= IC(Result(P1,s) +* Start-At(l,SCMPDS)) by FUNCT_4:113;
then
A6: Result(P2,s) = (Result(P1,s) +* Start-At(l,SCMPDS)) by A5,MEMSTR_0:78;
thus IExec(I ';' G ';' J,P,s) = Result(P2,s)
.= Result(P1,s) +* (Start-At(l,SCMPDS)) by A6
.= IExec(I,P,s) +* Start-At(l,SCMPDS);
end;
theorem Th25:
for s being State of SCMPDS,I being halt-free Program of
SCMPDS st I is_closed_on s,P & I is_halting_on s,P
holds IC IExec(I,P,Initialize s) = card I
proof
let s be State of SCMPDS,I be halt-free Program of SCMPDS;
set s1=Initialize s, P1 = P +* stop I;
assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P;
A3: P1 halts_on s1 by A2;
thus IC IExec(I,P,Initialize s) = IC Result(P1,s1)
.= IC Comput(P1, s1,LifeSpan(P1,s1)) by A3,EXTPRO_1:23
.= card I by A1,A2,Th20;
end;
begin :: The construction of conditional statements
definition
let a be Int_position,k be Integer;
let I,J be Program of SCMPDS;
func if=0(a,k,I,J) -> Program of SCMPDS equals
(a,k)<>0_goto (card I +2) ';' I ';' Goto (card J+1) ';' J;
coherence;
func if>0(a,k,I,J) -> Program of SCMPDS equals
(a,k)<=0_goto (card I +2) ';'
I ';' Goto (card J+1) ';' J;
coherence;
func if<0(a,k,I,J) -> Program of SCMPDS equals
(a,k)>=0_goto (card I +2) ';'
I ';' Goto (card J+1) ';' J;
coherence;
end;
definition
let a be Int_position,k be Integer;
let I be Program of SCMPDS;
func if=0(a,k,I) -> Program of SCMPDS equals
(a,k)<>0_goto (card I +1) ';' I;
coherence;
func if<>0(a,k,I) -> Program of SCMPDS equals
(a,k)<>0_goto 2 ';' goto (card
I+1) ';' I;
coherence;
func if>0(a,k,I) -> Program of SCMPDS equals
(a,k)<=0_goto (card I +1) ';' I;
coherence;
func if<=0(a,k,I) -> Program of SCMPDS equals
(a,k)<=0_goto 2 ';' goto (card
I+1) ';' I;
coherence;
func if<0(a,k,I) -> Program of SCMPDS equals
(a,k)>=0_goto (card I +1) ';' I;
coherence;
func if>=0(a,k,I) -> Program of SCMPDS equals
(a,k)>=0_goto 2 ';' goto (card
I+1) ';' I;
coherence;
end;
Lm4: card (i ';' I ';' Goto n ';' J) = card I + card J +2
proof
set G=Goto n;
thus card (i ';' I ';' G ';' J) =card (i ';' I ';' G) + card J by AFINSQ_1:17
.=card (i ';' I) + card G + card J by AFINSQ_1:17
.=card (i ';' I) + 1 + card J by COMPOS_1:54
.=card I +1 +1 +card J by Th1
.=card I + card J +2;
end;
begin :: The computation of "if var=0 then block1 else block2"
theorem
card if=0(a,k1,I,J) = card I + card J + 2 by Lm4;
theorem
0 in dom if=0(a,k1,I,J) & 1 in dom if=0(a,k1,I,J)
proof
set ci=card if=0(a,k1,I,J);
ci=card I + card J +2 by Lm4;
then 2 <= ci by NAT_1:12;
then 1 < ci by XXREAL_0:2;
hence thesis by AFINSQ_1:66;
end;
Lm5: (i ';' I ';' J ';' K). 0=i
proof
A1: 0 in dom Load i by COMPOS_1:50;
i ';' I ';' J ';' K =i ';' (I ';' J) ';' K by SCMPDS_4:14
.=i ';' (I ';' J ';' K) by SCMPDS_4:14
.=Load i ';' (I ';' J ';' K);
hence (i ';' I ';' J ';' K). 0 =(Load i). 0 by A1,AFINSQ_1:def 3
.=i;
end;
theorem
if=0(a,k1,I,J). 0 = (a,k1)<>0_goto (card I + 2) by Lm5;
Lm6: Shift(stop I,1) c= P +* stop(i ';' I)
proof
set pI=stop I, iI=i ';' I, piI=stop iI, P3=P+*piI;
card Load i=1 & iI=(Load i) ';' I by COMPOS_1:54;
then
A1: Shift(pI,1) c= piI by Th5;
piI c= P3 by FUNCT_4:25;
then Shift(pI,1) c= P3 by A1,XBOOLE_1:1;
hence thesis;
end;
Lm7: Shift(stop I,2) c= P+* stop(i ';' j ';' I)
proof
set pI=stop I, pjI=stop (i ';' j ';' I), P3=P+*pjI;
card (i ';' j)=card (Load i ';' Load j)
.=card Load i + card Load j by AFINSQ_1:17
.=1+ card Load j by COMPOS_1:54
.=1+1 by COMPOS_1:54;
then
A1: Shift(pI,2) c= pjI by Th5;
pjI c= P3 by FUNCT_4:25;
then Shift(pI,2) c= P3 by A1,XBOOLE_1:1;
hence thesis;
end;
theorem Th29:
for s being 0-started State of SCMPDS, I,J being shiftable Program of
SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)= 0 & I
is_closed_on s,P & I is_halting_on s,P holds if=0(a,k1,I,J) is_closed_on s,P
& if=0(a,k1,I,J) is_halting_on s,P
proof
let s be 0-started State of SCMPDS, I,J be shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
assume
A1: s.b = 0;
set i = (a,k1)<>0_goto (card I + 2);
set G=Goto (card J+1);
set I2 = I ';' G ';' J, IF=if=0(a,k1,I,J), pIF=stop IF,
pI2=stop I2, P2 = P +* pI2, P3 = P +* pIF,
s4 = Comput(P3,s,1),
P4 = P3;
A2: Initialize s = s by MEMSTR_0:44;
then
A3: IC s = 0 by MEMSTR_0:47;
A4: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
.= i ';' I2 by SCMPDS_4:14;
then
A5: Shift(pI2,1) c= P4 by Lm6;
A6: Comput(P3, s,0 + 1) = Following(P3,Comput(P3,s,0)) by EXTPRO_1:3
.= Following(P3,s) by EXTPRO_1:2
.= Exec(i,s) by A4,Th3,A2;
for a holds s.a= s4.a by A6,SCMPDS_2:55;
then
A7: DataPart s = DataPart s4 by SCMPDS_4:8;
s.DataLoc(s.a,k1)=s.b
.=0 by A1;
then
A8: IC s4 = IC s + 1 by A6,SCMPDS_2:55
.= (0+1) by A3;
A9: 0 in dom pIF by COMPOS_1:36;
assume
A10: I is_closed_on s,P;
assume
A11: I is_halting_on s,P;
then I2 is_halting_on s,P by A10,Th21;
then
A12: P2 halts_on s by A2;
A13: I2 is_closed_on s,P by A10,A11,Th21;
then
A14: Start-At(0,SCMPDS) c= s & I2 is_closed_on s,P2 by A2,FUNCT_4:25;
A15: card pIF = card IF +1 by COMPOS_1:55
.= card I2 +1+1 by A4,Th1;
A16: stop I2 c= P2 by FUNCT_4:25;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A17: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m =IC (P2 ,1)as Nat;
A18: card pIF = card pI2+1 by A15,COMPOS_1:55;
m in dom pI2 by A13,A2;
then m < card pI2 by AFINSQ_1:66;
then
A19: m+1 < card pIF by A18,XREAL_1:6;
IC Comput(P3,s,k) = IC Comput(P3, s4,k1) by A17,EXTPRO_1:4
.= m + 1 by A14,A5,A8,A7,Th22,A16;
hence IC Comput(P3,s,k) in dom pIF by A19,AFINSQ_1:66;
end;
suppose
k = 0;
hence IC Comput(P3,s,k) in dom java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 29
end;
end;
hence IF s,P by A2
A20: Comput(P3,s,LifeSpanper cases;
= Comput(P3,Comput(P3,s,1),LifeSpan(P2
,s))
by EXTPRO_1:4;
CurInstr(P3,Comput(P3,s,LifeSpan(P2,s)+1))
=(4Comput(4,4LifeSpan(P2,))by
.=CurInstr(P2,Comput(P2,s,LifeSpan(P2,s))) by A14,A5,A8,A7,Th22,A16
.= halt SCMPDS by A12,EXTPRO_1:def 15;
then P3 halts_on s by EXTPRO_1:29;
hence thesis by A2;
end;
theorem Th30:
for s being State of SCMPDS,I being end;
shiftable Program of SCMPDS,a being Int_positionsuppose
s.a,k1)<> 0 & J is_closed_on s,P & J java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 13
is_closed_on, & if0a,1,,J) is_halting_ons,
proof
let s be State of SCMPDS,I be Program of SCMPDS, J be shiftable Program of
SCMPDS, a be Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
s, P1=P+ ,
IF=if=0(a,k1,I,J), pIF=
stop IF, s3 = Initialize s, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)<>0_goto (card I + 2);
set G =Goto (card J+1), iG=i ';' I ';' G;
= ''(I ; )'; J bySCMPDS_4:14
.= i ';' (I ';' G ';' J) by SCMPDS_4:14;
A2: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
by A1Th3
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
MEMSTR_0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
assume
s.b <> 0;
then
A6: IC s4 = ICplusConst(s3,card I + 2) by A2,A4,SCMPDS_2:55
.= (0+(card I + 2)) A24 DataPart (P2s2 DataPart Comput(P2, s2
assume
A7: J is_closed_on s,P;
then
A8: Start-At(0,SCMPDS) c= s1 & J then
A9: A10:P3halts_on EXTPRO_129java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
A10: card iG = card (i ';' I) + card G by AFINSQ_1:17
.=card (i ';' I) + 1 by COMPOS_1:54
.=card I +1 +1 by Th1
.=card I +(1 +1);
then Shift(pJ,card I+2) c= pIF by Th5;
then
A11: Shift(pJ,card I+2) c= P4 by A9,XBOOLE_1:1;
assume
J is_halting_on s,P;
then
A12: P1 halts_on s1;
for a holds s1.a = s4.a by A2,SCMPDS_2:55;
then
A13: DataPart s1 = DataPart s4 by SCMPDS_4:8;
A14: pJ c= P1 by FUNCT_4:25;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A15: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P1, s1,k1) as Nat;
m in dom pJ by A7;
then m < card pJ by AFINSQ_1:66;
then
A16: m + (card I + 2) < card pJ + (card I + 2) by XREAL_1:6;
A17: card pJ = card J + 1 by COMPOS_1:55;
A18: card pIF = card IF+1 by COMPOS_1:55
.=card I +2 +card J +1 by A10,AFINSQ_1:17
.=card I +2 + card pJ by A17;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A15,EXTPRO_1:4
.= (m + (card I + 2)) by A8,A13,A11,A6,Th22,A14;
hence IC Comput(P3,s3,k) in dom pIF by A18,A16,AFINSQ_1:66;
end;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A5,COMPOS_1:36;
end;
end;
hence IF is_closed_on s,P;
A19: Comput(P3,s3,LifeSpan(P1,s1)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P1,
s1))
by EXTPRO_1:4;
CurInstr(P3,
Comput(P3,s3,LifeSpan(P1,s1)+1))
=CurInstr(P4,
Comput(P4,s4,LifeSpan(P1,s1))) by A19
.=CurInstr(P1,
Comput(P1,s1,LifeSpan(P1,s1))) by A8,A13,A11,A6,Th22,A14
.= halt SCMPDS by A12,EXTPRO_1:def 15;
then P3 halts_on s3 by EXTPRO_1:29;
hence thesis;
end;
theorem Th31:
for s being 0-started State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, J being shiftable Program of SCMPDS,a being Int_position,k1
being Integer st s.DataLoc(s.a,k1)= 0 & I is_closed_on s,P &
I is_halting_on s,P
holds IExec(if=0(a,k1,I,J),P,s)
= IExec(I,P,s) +* Start-At((card I + card J+ 2),SCMPDS)
proof
let s be 0-started State of SCMPDS,
I be halt-free shiftable Program of SCMPDS, J be
shiftable Program of SCMPDS,a be Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
assume
A1: s.b = 0;
set i = (a,k1)<>0_goto (card I + 2);
set G=Goto (card J+1);
set I2 = I ';' G ';' J, IF=if=0(a,k1,I,J), pI2=
stop I2, s2 = s, s3 = s,
P2 = P +* pI2, P3 = P +* stop IF,
s4 = Comput(P3,s3,1), P4 = P3;
A2: Initialize s = s by MEMSTR_0:44;
then
A3: IC s3 = 0 by MEMSTR_0:47;
A4: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
.= i ';' I2 by SCMPDS_4:14;
then
A5: Shift(pI2,1) c= P4 by Lm6;
A6: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A4,Th3,A2;
s3.DataLoc(s3.a,k1)=s3.b
.=0 by A1;
then
A7: IC s4 = IC s3 + 1 by A6,SCMPDS_2:55
.= (0+1) by A3;
for a holds s2.a = s4.a by A6,SCMPDS_2:55;
then
A8: DataPart s2 = DataPart s4 by SCMPDS_4:8;
set SAl= Start-At((card I + card J + 2),SCMPDS);
assume
A9: I is_closed_on s,P;
assume
A10: I is_halting_on s,P;
then I2 is_halting_on s,P by A9,Th21;
then
A11: P2 halts_on s2 by A2;
I2 is_closed_on s,P by A9,A10,Th21;
then
A12: Start-At(0,SCMPDS) c= s2 & I2 is_closed_on s2,P2 by A2,FUNCT_4:25;
A13: stop I2 c= P2 by FUNCT_4:25;
A14: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2,s2))
by EXTPRO_1:4;
A15: CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A14
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A12,A5,A7,A8,Th22,A13
.= halt SCMPDS by A11,EXTPRO_1:def 15;
then
A16: P3 halts_on s3 byEXTPRO_1:29;
A17: CurInstr(P3,s3) = i by A4,Th3,A2;
now
let l be Nat;
assume
A18: l < LifeSpan(P2,s2) + 1;
A19: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
percases
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l)) =
CurInstr assume
by A19;
hence CurInstr(P3,Comput(P3,s3,l)) <>
halt SCMPDS by A17;
end;
suppose
l <> 0;
thenconsider n be Nat such that
A20: l = n + 1 by NAT_1:6;
reconsider n as Nat;
hence CurInstr(P3,(P3,3,l)
assume
A22: CurInstr(P3,Comput(P3,s3,l)) = halt SCMPDS;
A23: Comput(P3,s3,n+1)
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P2,Comput(P2,s2,n))
= CurInstr(P3,Comput(P3,s4,n))
by A12,A5,A7,A8,Th22,A13
.= halt SCMPDS by A20,A22,A23;
hence contradiction by A11,java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 15
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P2,s2) + 1 <= l;
then
A24: LifeSpan(P3,s3) = LifeSpan(P2,s2) + 1 by A15,A16,EXTPRO_1:def 15;
A25: DataPart Result(P2,s2) = DataPart Comput(P2, s2
,LifeSpan(P2,s2)) by A11,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P2,s2)) by A12,A5,A7,A8,Th22,A13
.= DataPart Comput(P3, s3,LifeSpan(P2,s2) + 1)
by EXTPRO_1:4
.= DataPart Result(P3,s3) by A16,A24,EXTPRO_1:23;
A26: now
let x be object;
A27: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
assume
A28: x in dom IExec(IF,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 SAl by A27,TARSKIdef 1;
thus IExec(IF, dom IExec(FP, s =the carrierof SCMPDS by PARTFUN1def 2
.= ( =dom(s + SAl) by PARTFUN1:ef ;
.= IExec(I2,P,s).x
.= (IExec(I2,P,s) +* SAl).x by A30,FUNCT_4:11;
end;
suppose
A31: x = IC SCMPDS;
A32: IC Result(P2,s2) = IC IExec(I2,P,s)
.= (card I + card J + 1) by A9,A10,java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 7
A33: x in dom SAl by A27 thus IFis ;
s be0started State of SCMPDS;
.= Comput(P3, s3,LifeSpan(P2 letP InstructionSequenceofSCMPDS;
.= IC Comput(P3, s4,LifeSpan(P2,s2)A1 Initialize = by :44;
. assume
A12,,7,,Th22,13
.= IC Result(P2,s2) + 1 by A11,EXTPRO_1:23
.= IC Start-At ((card I + card J + 1) + 1,SCMPDS)
by A32,FUNCOP_1:72
.= (IExec(I2,P,s) +* SAl).A2:P = P+ stop IF by FUNCT_4:98;
end;
;
dom IExec(IF,P,s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(I2,P,s) +* SAl suppose
hence IExec(IF,P,s) = IExec(I2,,s *SAl by ,:java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
.= IExec(I,P,s) +* Start-At(( hence halts_on s by A1,A2;
+* Start-At((card I + card J + 2),SCMPDS) by A9,A10,Th24
.= IExec
end;
theorem Th32:
s State of SCMPDS, being Programof SCMPDS,J being
halt hence P halts_on s by A1,A2;
st s.DataLoc(s.a,k1)<> 0 & J is_closed_on s,P & J is_halting_on s, end;
holds IExec(if=0(a,k1,I,J),P,Initialize s) = IExec(J,P,Initialize s) +*
Start-Atjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
proof
let s be State of SCMPDS,I be Program of SCMPDS,J be halt-free shiftable
Program of SCMPDS,a be Int_position,k1 be Integer;
set b=ataLoc(.a,k1)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
set pJ=stop J, s1 = Initialize s, P1 = P +* pJ,
P2 = P +* pJ,
IF=if=0(a,k1,I,J), pIF=
stop IF,s3=Initialize s, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i =(a,k1)>0_goto (card I+ 2);
set G =Goto (card J+1), iG=i ';' I ';' G;
set SAl=Start-At((card I+card J+2),SCMPDS);
A1: IF = i ';' (I ';' G) ';' J by holds IC IExec(if=0(a,k1,I),P,s) = card1
.= i 'proof
A2: Comput(P3, s3,0 + 1) = Following(P3 sbe 0- State ofSCMPDS,
behalt-free shiftable parahalting Program of
.= Exec(i,s3) by A1,Th3;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not indomStart-At(SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.aA1 I s,P&Iis_halting_on s,P by Th11,Th12;
.= s.b by A3,FUNCT_4:11;
A5: IC s3 = 0 by MEMSTR_0:47;
assume
s.b <> 0;
then
s.(s.,k1)= 0java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
. (+cardI+ 2) by A5,Th4;
for a holds by ,Th41,A2java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
then
A7: DataPart s1 = DataPart s4 by SCMPDS_4:8;
end;
.=card (i ';' I) + 1 by COMPOS_1:54
.=card I +1 +1 by Th1
.=card I +(1 +1);
then then IExec(F,s)=s + Start-At((ard I+,SCMPDS)by Th42,A2;
A8: Shift(pJ,card I+2) c= pIF by Th5;
UNCT_4:25java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
then Shift(pJ,card I+2) c= P3 by A8,XBOOLE_1:1;
then
A9: Shift(pJ,card I+2) c= P4;
assume
A10: J is_closed_on s,P;
then
A11: Start-AtProgram ,, being Int_positionk1being s.ataLocs.k1)=
2: stopJ=P1 FUNCT_4:5;
assume
A13: J is_halting_on s,P;
then
A14: P1 halts_on s1;
A15: Comput(P3, SCMPDS,,b be , ;
Comput(P3,Comput(P3,s3
))
A16: CurInstr(P3,
Comput(P3,s3,LifeSpan(1s1+1))
=CurInstr(P3,
Comput(3,s4,(P1,s1)) by A15
.=CurInstr(P1,
Comput(P1,s1,LifeSpan(P1,s1))) by A11,A9,A6,A7,Th22,A12
.= halt SCMPDS by A14,EXTPRO_1:def 15;
then
A17: P3 halts_onbyA1Th41;
A18: CurInstr thesisby A2FUNCT_4:11java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
now
let l be Nat;
assume
A19: l < LifeSpan(P1,s1) + 1;
A20: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = theorem
then CurInstr for s ofSCMPDSI beingProgram of SCMPDS,a,b being
= CurInstr(P3,s3)
by A20;
hence CurInstr(P3,Comput(P3,s3,l)) <>
halt SCMPDS by A18;
end;
suppose
l <> 0;
then consider n be Nat such that
A21: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A22: n < LifeSpan(P1,s1) by A19,A21,XREAL_1:6;
assume
A23: CurInstr(P3,Comput(P3,s3,l)) = halt SCMPDS;
A24: Comput(P3,s3,n+1) =
Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P1,Comput(P1,
s1,n))
= CurInstr(P3,
Comput(P3,s4,n)) by A11,A9,A6,A7,Th22,A12
.= halt SCMPDS by A21,A23,A24;
hence contradiction by A14,A22,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P1,s1) + 1 <= l;
then
A25: LifeSpan(P3,s3) = LifeSpan(P1,s1) + 1 by A16,A17,EXTPRO_1:def 15;
A26: DataPart Result(P1,s1) = DataPart Comput(P1, s1
,LifeSpan(P1,s1)) by A14,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P1,s1))
by A11,A9,A6,A7,Th22,A12
.= DataPart Comput(P3, s3,LifeSpan(P1,s1) + 1)
by EXTPRO_1:4
.= DataPart Result(P3,s3) by A17,A25,EXTPRO_1:23;
A27: now
let x be object;
A28: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
assume
A29: x in dom IExec(IF,P,Initialize s);
per cases by A29,SCMPDS_4:6;
suppose
A30: x is Int_position;
then x <> IC SCMPDS by SCMPDS_2:43;
then
A31: not x in dom SAl by A28,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= (Result(P1,s1)).x by A26,A30,SCMPDS_4:8
.= IExec(J,P,Initialize s).x
.= (IExec(J,P,Initialize s) +* SAl).x by A31,FUNCT_4:11;
end;
suppose
A32: x = IC SCMPDS;
A33: IC Result(P1,s1) = IC IExec(J,P,Initialize s)
.= (card J) by A10,A13,Th25;
A34: x in dom SAl by A28,A32,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= Comput(P3, s3,LifeSpan(P1,s1) + 1).x by A17,A25,EXTPRO_1:23
.= IC Comput(P3, s4,LifeSpan(P1,s1)) by A32,EXTPRO_1:4
.= IC Comput(P1, s1,LifeSpan(P1,s1)) + (card I + 2)
by A11,A9,A6,A7,Th22,A12
.= IC Result(P1,s1) + (card I + 2) by A14,EXTPRO_1:23
.= IC Start-At (card J + (card I + 2),SCMPDS) by A33,FUNCOP_1:72
.= (IExec(J,P,Initialize s) +* SAl).x by A32,A34,FUNCT_4:13;
end;
end;
dom IExec(IF, IExec(if=a,I)PInitialize)b .b
.= dom (IExec(J,P,Initialize s) +* SAl) by PARTFUN1:def 2;
hence thesis by A27,FUNCT_1:2;
end;
registration
let I,J be shiftable parahalting Program of SCMPDS, a be Int_position,k1 be
Integer;
cluster if=0(a,k1,I,J) -> shiftable parahalting;
orrectness
proof
set i = (a,k1)<>0_goto (card I + 2), G =Goto (card J+1);
IF==(a,1,I);
reconsider IJ=I ';' G ';' J as shiftable Program of SCMPDS;
thus IF is shiftable;
ets be 0-started State of SCMPDS;
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s by MEMSTR_0:44;
assume stop IF c= P;
then
A2: P =P+*stop IF by FUNCT_4:98;
A3: J is_closed_on s,P & J is_halting_on s,P by Th11,Th12;
A4: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
suppose
.sa) ;
then IF is_halting_on java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 5
hence P halts_on s by A1,A2;
end;
suppose
s.DataLoc(s.a,k1) <> 0;
then IF is_halting_on s,P by A3,Th30;
hence P halts_on s by A1,A2;
end;
end;
end;
registration
let I,J be halt-free Program of SCMPDS, a be Int_position,k1
cluster if=0(a,k1,I,J) -> halt-free;
end;
theorem
for being0startedState SCMPDS,, being halt-ree
parahalting Program ofjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
IExec(if=0(a,k1,I,J),P,s) = cardI+2byLm8
let s be 0-started State of SCMPDS,
I,J be halt-free shiftable parahalting Program of
SCMPDS,a be Int_position,k1 be Integer;
set IF=if=0(a,k1,I,J);
A1: Jjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A2: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
A3:Initialize s by MEMSTR_0:4;
hereby
per cases;
A4: pIF c= P4 by FUNCT_4:25;
s.DataLoc(s.a,k1) = 0;
then
IExec(IF,P,s) = IExec(I,P,s) +* Start-At((card I+card J+2),SCMPDS)
by A2,Th31;
hence thesis by FUNCT_4:113;
end;
suppose'(j''I) SCMPDS_416;
s.DataLoc(s.a,k1) <> 0;
A6: IC s3 0 by MEMSTR_0:47;
IExec(IF,P,s) = IExec(J,P,s Comput(3 s3,0+ 1 =Following(3Comput(P3,s3,0)) by EXTPRO_1:3
by A1,Th32,A3;
hence thesis by FUNCT_4:113;
end;
end;
end;
theorem
for s being 0-started State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,J being shiftable Program of SCMPDS,a,b being Int_position,
k1 being java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
IExec(if=0(a,k1,I,J),P,s).b = IExec(I,P,s).b
proofA12 P3. s4
let s be 0-started State of SCMPDS,
I be halt-free shiftable parahalting Program of
SCMPDS,J Comput(P3 s3 + 1 =Following(P3,s4) by EXTPRO_1:3
assume
A1: s.DataLoc(s.a,k1)=0;
A2: .= Exec(j,s4)byA7A9,;
I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
then
IExec(if=0(a,k1,I,J),A13:ICs5 =ICplusConst(s4,card I+1) by SCMPDS_2:54
+* Start-At((card I + card J + 2),SCMPDS) by A1,Th31;
:11;
end;
theorem
for s being State of SCMPDS,I being Program of SCMPDS,J being
A14:(P3).IC s5
being Integer st s.DataLoc(s.a,k1)<> 0 holds
(if0(a,IJ)PInitialize s)b=IExec,P,Initialize s)b
proof
let s be pIF = P5 by :25;
then P5 P5(ard +) =pIF(ard I2 A11,GRFUNC_1:2
=java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
DataLock>;
A2: not b in dom Start-At((card I+card J+2),SCMPDS) by SCMPDS_4:18;
J is_closed_on s,P & J is_halting_on s,P by Th11,Th12;
then
IExec(if=0(a,k1,I,J),P,Initialize s)
= IExec(J,P,Initialize s) +* Start-At((card I + card J
+ 2),SCMPDS) by A1,Th32;
hence thesis by A2,FUNCT_4:11;
end;
begin :: The computation of "if var=0 then block"
theorem
card if=0(a,k1,I) = card I + 1 by Th1;
theorem
0 in dom if=0(a,k1,I)
proof
set ci=card if=0(a,k1,I);
ci=card I + 1 by Th1;
hence thesis by AFINSQ_1:66;
end;
theorem
if=0(a,k1,I). 0 = (a,k1)<>0_goto (card I + 1) by Th2;
theorem Th39:
for s being State of SCMPDS, I being shiftable Program of SCMPDS
, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)= 0 & I
is_closed_on s,P & I is_halting_on s,P holds if=0(a,k1,I) is_closed_on s,P
& if=0(a,k1,I) is_halting_on s,P
proof
let s be State of SCMPDS, I be end;
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
assume
A1A31: =ICSCMPDSjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
set i = (a,k1)<>0_goto A33: x in dom SAl by A27,A31,TARSKI:def 1;
set IF=if=0(a,k1,I), pIF=stop IF, pI=stop I,
s2 = Initialize s, s3 = Initialize s,
P2 (,,nitialize s)x = (esultP3,3).
s4 = Comput(P3,s3,1), P4 = P3;
A2 s3=0 byMEMSTR_047;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
,0 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
=IC(P2LifeSpanP2s2)+ 2
for a holds s2.a = s4.a by A4,SCMPDS_2:55 by ,A6,9A8,,A7
then
5:DataPart s2 DataPart s4 by SCMPDS_48java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
not a . IC by A32,UNCOP_172
then s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.0 A1,3,UNCT_4:1
then
A6: IC s4 = IC s3 + 1 by A4,SCMPDS_2:55
.= (0+1) by A2;
assume
A7: I is_closed_on s,P;
then
A8: I is_closed_on s2,P2;
assume
I is_halting_on s,P;
then
:P2 halts_on s2;
A10: 0 in dom pIF by COMPOS_1:36;
A11: Start-At(0,SCMPDS) c= s2 & Shift(pI,1) c= P4 by Lm6,FUNCT_4:25;
A12: stop I c= P2 by FUNCT_4:25;
A13: card pIF = card IF +1 by COMPOS_1:55
.= card I +1+1 by Th1;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A14: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P2, s2,k1) as Nat;
A15: card pIF = card pI+1 by A13,COMPOS_1:55;
m in dom pI by A7;
then m < card pI by AFINSQ_1:66;
then
A16: m+1 < card pIF by A15,XREAL_1:6;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A14,EXTPRO_1:4
.= (m + 1) by A8,A11,A6,A5,Th22,A12;
hence IC Comput(P3,s3,k) in dom pIF by A16,AFINSQ_1:66;
end;
suppose
k = 0;
hence IC Comput(P3,s3,k) in dom pIF by A10,A2,EXTPRO_1:2;
end;
end;
hence IF is_closed_on s,P;
A17: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:4;
CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A17
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A8,A11,A6,A5,Th22,A12
.= halt SCMPDS by A9,EXTPRO_1:def 15;
then P3 halts_on s3 by EXTPRO_1:29;
hence thesis;
end;
theorem Th40:
for s being State of SCMPDS,I being Program of SCMPDS, a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1)<> 0 holds if=0(a,k1,I)
is_closed_on s,P & if=0(a,k1,I) is_halting_on s,P
proof
let s be State of SCMPDS,I be Program of SCMPDS, a be Int_position,k1 be
Integer;
set b=DataLoc(s.a,k1);
assume
A1: s.b <> 0;
set i = (a,k1)<>0_goto (card I + 1);
set IF=if=0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
A2: IC s3 = 0 by MEMSTR_0:47;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
then
A5: IC s4 = ICplusConst(s3,card I + 1) by A1,A4,SCMPDS_2:55
.= (0+(card I + 1)) by A2,Th4;
A6: card IF=card I+1 by Th1;
then
A7: (card I+1) in dom pIF by COMPOS_1:64;
A8: P3/.IC s4
= P3.IC s4 by PBOOLE:143;
pIF c= P3 by FUNCT_4:25;
then pIF c= P4;
then P4.(card I+1) = pIF.(card I+1) by A7,GRFUNC_1:2
.=halt SCMPDS by A6,COMPOS_1:64;
then
A9: CurInstr(P3,s4) = halt SCMPDS by A5,A8;
now
let k be Nat;
per cases;
suppose
0 < k;
then 1+0 <= k by INT_1:7;
hence IC Comput(P3,s3,k) in dom pIF by A7,A5,A9,EXTPRO_1:5;
end;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A2,COMPOS_1:36;
end;
end;
hence IF is_closed_on s,P;
P3 halts_on s3 by A9,EXTPRO_1:29;
hence thesis;
end;
theorem Th41:
for s being State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)=
0 & I is_closed_on s,P & I is_halting_on s,P holds
IExec(if=0(a,k1,I),P,Initialize s) = IExec(I,P,Initialize s)
+* Start-At((card I+1),SCMPDS)
proof
let s be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
assume
A1: s.b = 0;
set i = (a,k1)<>0_goto (card I + 1);
set IF=if=0(a,k1,I), pI=stop I, pIF = stop IF,
s2 = Initialize s, P2 = P +* pI,
s3 = Initialize s, P3 = P +* pIF,
s4 = Comput(P3, s3,1), P4 = P3;
A2: IC s3 = 0 by MEMSTR_0:47;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
A4: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.=0 by A1,A3,FUNCT_4:11;
then
A5: IC s4 = IC s3 + 1 by A4,SCMPDS_2:55
.= (0+1) by A2;
for a holds s2.a = s4.a by A4,SCMPDS_2:55;
then
A6: DataPart s2 = DataPart s4 by SCMPDS_4:8;
assume
A7: I is_closed_on s,P;
then
A8: I is_closed_on s2,P2;
set SAl=Start-At((card I+1),SCMPDS);
A9: Start-At(0,SCMPDS) c= s2 & Shift(pI,1) c= P4 by Lm6,FUNCT_4:25;
A10: stop I c= P2 by FUNCT_4:25;
assume
A11: I is_halting_on s,P;
then
A12: P2 halts_on s2;
A13: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:4;
A14: CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A13
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A8,A9,A5,A6,Th22,A10
.= halt SCMPDS by A12,EXTPRO_1:def 15;
then
A15: P3 halts_on s3 by EXTPRO_1:29;
A16: CurInstr(P3,s3) = i by Th3;
now
let l be Nat;
assume
A17: l < LifeSpan(P2,s2) + 1;
A18: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A18;
hence CurInstr(P3,Comput(P3,s3,l)) <>
halt SCMPDS by A16;
end;
suppose
l <> 0;
then consider n be Nat such that
A19: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A20: n < LifeSpan(P2,s2) by A17,A19,XREAL_1:6;
assume
A21: CurInstr(P3,Comput(P3,s3,l)) = halt SCMPDS;
A22: Comput(P3,s3,n+1)
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P2,Comput(P2,s2,n)) =
CurInstr(P3,Comput(P3,s4,n)) by A8,A9,A5,A6,Th22,A10
.= halt SCMPDS by A19,A21,A22;
hence contradiction by A12,A20,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P2,s2) + 1 <= l;
then
A23: LifeSpan(P3,s3) = LifeSpan(P2,s2) + 1 by A14,A15,EXTPRO_1:def 15;
A24: DataPart Result(P2,s2) = DataPart Comput(P2, s2
,LifeSpan(P2,s2)) by A12,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P2,s2)) by A8,A9,A5,A6,Th22,A10
.= DataPart Comput(P3, s3,LifeSpan(P2,s2) + 1)
by EXTPRO_1:4
.= DataPart Result(P3,s3) by A15,A23,EXTPRO_1:23;
A25 now
let x be object;
A26: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
assume
A27: x in dom IExec(IF,P,Initialize s);
per cases by A27,SCMPDS_4:6;
suppose
A28: x is Int_position;
then x < IC by SCMPDS_2:3;
then
A29: not x in dom SAl by A26,TARSKI:def 1
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
=(esultP2,s2). byA24,A28,SCMPDS_4:8
s).x
.= (IExec(I,P,Initialize s) +* SAl).x by A29, .= (IExec(I,P,Initialize s) +* SAl).x by A29,FUNCT_4
end;
suppose
A30: x = IC SCMPDS .=s4x by ,27,CMPDS_254
A31: IC Result(P2,s2) = IC IExec(I,P,Initialize s)
.= card I by A7,A11,Th25;
A32: x in dom SAl by A26,A30,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= Comput(P3, s3,LifeSpan(P2,s2) + 1).x by A15, . s + SAl)x A28,UNCT_411
.= IC Comput(P3, s4,LifeSpan(P2,s2)) by A30,EXTPRO_1:4
.= IC Comput(P2, s2,LifeSpan(P2,s2)) + 1
by A8,A9,A5,A6,Th22,A10
.= IC Result(P2,s2) + 1 by A12,EXTPRO_1:23
.= IC Start-At((card I+1),SCMPDS) by A31,FUNCOP_1:72
=(Exec(IPInitializes) + SAl). byA30,32FUNCT_4:3;
end;
end;
dom IExec(IF,P,Initialize assume c P;
.= dom (IExec(I,P,Initialize s) +* SAl) by PARTFUN1:def 2;
hence thesis by A25,FUNCT_1:2;
end;
theoremTh42:
for s being State of SCMPDS,I being Program of SCMPDS,a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1)<> 0
holds IExec(if=0(a,k1,I),P,Initialize s) = s +* Start-At((card I+1),SCMPDS)
proof
let s be State of SCMPDS,I be Program of SCMPDS,a be Int_position, k1 be
Integer;
set b=DataLoc(s.a,k1);
set IF=if=0(a,k1,I), pIF=stop IF,
s3 = Initialize s,P3=P+*pIF,
s4 = Comput(P3, s3,1), P4 = P3;
set i = (a,k1)<>0_goto (card I + 1);
set SAl=Start-At(( suppose
A1: IC s3 = 0 by MEMSTR_0:47;
A2: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A3: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A2,FUNCT_4:11;
A4: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
assume
s.b <> 0;
then
A5: IC s4 = ICplusConst(s3,card I + 1) by A4,A3,SCMPDS_2:55
.= (0+(card I + 1)) by A1,Th4;
A6: pIF c= P4 by FUNCT_4:25;
A7: P3/.IC s4
= P3.IC s4 by PBOOLE:143;
A8: card IF=card I+1 by Th1;
then (card I+1) in dom pIF by COMPOS_1:64;
then P4.(card I+1) = pIF.(card I+1) by A6,GRFUNC_1:2
.=halt SCMPDS by A8,COMPOS_1:64;
then
A9: CurInstr(P3,s4) = halt SCMPDS by A5,A7;
then
A10: P3 halts_on s3 by EXTPRO_1:29;
A11: CurInstr(P3,s3) = i by Th3;
now
let l be Nat;
A12: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
assume
l < 1;
then l <1+0;
then l=0 by NAT_1:13;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3) by A12;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A11;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds 1 <= l;
then LifeSpan(P3,s3) = 1 by A9,A10,EXTPRO_1:def 15;
then
A13: s4 = Result(P3,s3) by A10,EXTPRO_1:23;
A14: now
A15: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
let x be object;
assume
A16: x in dom IExec(IF,P,Initialize s);
per cases by A16,SCMPDS_4:6;
suppose
A17: x is Int_position;
then x <> IC SCMPDS by SCMPDS_2:43;
then
A18: not x in dom SAl by A15,TARSKI:def 1;
A19: not x in dom Start-At(0,SCMPDS) by A17,SCMPDS_4:18;
thus IExec(IF,P,Initialize s).x = s4.x by A13
.= s3.x by A4,A17,SCMPDS_2:55
.= s.x by A19,FUNCT_4:11
*) F11
end *Start(card I+))
suppose
A20: x = IC SCMPDS;
hence IExec(IF,P,Initialize s).x = (card I + 1) by A5,A13
.= (s +* SAl).x by A20 hence thesis by A2,UNCT_4:11;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (s +* SAl) by PARTFUN1:def 2;
hence thesis by A14,FUNCT_1:2;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
registration
let I be shiftable be Stateof , beProgram SCMPDSab be ,k1 be
Integer
cluster if=0(a,k1,java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 8
correctness
proof
set i = (a,k1)<>0_A1: IExec(if<>0(a,k1,I),P, s)
set IF=if=0(a,k1,I);
thus IF is shiftable;
letnot indom -At(card I2,)by SCMPDS_418;
let P hence thesisby ,:11;
A1end;
assume
stop IF c= P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
suppose
s.DataLoc(s.a,k1)= 0;
then IF is_halting_on s,P by A3,Th39;
hence P halts_on s by A1,A2;
end;
suppose
s.DataLoc(s.a,k1) <> 0;
then IF is_halting_on s,P by Th40;
hence P halts_on s by A1,A2;
end;
end;
end;
registration
let I be halt-free Program of SCMPDS, a be Int_position,k1 be Integer;
cluster if=0(a,k1,I) -> halt-free;
coherence;
end;
theorem
for s being 0-started State of SCMPDS,
I being halt-free shiftable parahalting Program of SCMPDS,
a being Int_position,k1 being Integer
holds IC IExec(if=0(a,k1,I),P,s) = card I + 1
proof
let s be 0-started State of SCMPDS,
I be halt-free shiftable parahalting Program of
SCMPDS,a be Int_position,k1 be Integer;
set IF=if=0(a,k1,I);
A1: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
A2: Initialize s = s by MEMSTR_0:44;
per cases;
suppose
s.DataLoc(s.a,k1) = 0;
then IExec(IF,P,s) =IExec(I,P,s) +* Start-At((card I+1),SCMPDS)
by A1,Th41,A2;
hence thesis by FUNCT_4:113;
end;
suppose
s.DataLoc(s.a,k1) <> 0;
then IExec(IF,P,s) =s +* Start-At((card I+1),SCMPDS) by Th42,A2;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being State of SCMPDS,
I being halt-free shiftable parahalting
Program of SCMPDS,a,b being Int_position,k1 being Integer st s.DataLoc(s.a,k1)=
0 holds IExec(if=0(a,k1,I),P,Initialize s).b = IExec(I,P,Initialize s).b
proof
let s be State of SCMPDS,I be halt-free shiftable parahalting Program of
SCMPDS,a,b be Int_position,k1 be Integer;
assume
A1: s.DataLoc(s.a,k1)=0;
A2: not b in dom Start-At((card I+1),SCMPDS) by SCMPDS_4:18;
I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
(=0ak1)P,nitialize s (,P, s)
+* Start-At((card I+1),SCMPDS)
by A1,Th41;
henceby A2,UNCT_4:1java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
end;
theorem
for s being State of SCMPDS,I being Program of SCMPDS,a,b being
Int_position, k1 being Integer st s.DataLoc(s.a,k1)<> 0
holds IExec(if=0(a,k1,I),P,Initialize s).b = s.b
proof
let s be State of SCMPDS,I be Program of SCMPDS,a,b be Int_position, k1 be
Integer;
assume
s.DataLoc(s.a,k1)<>0;
then
A1: IExec(if=0(a,k1,I),P, s =s+ -t( I1,CMPDSjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
by Th42;
not b in dom Start-At((card I+1),SCMPDS) by SCMPDS_4:18;
thesis A1F:11;
end;
Lm8: card (i ';' j ';' I)=card I+2
proof
thus card (i ';' j ';' I) =card (i ';' (j ';' I)) by SCMPDS_4:16
.=card (j ';' I)+1 by Th1
.=card I+1+1 by Th1
.=card I+2;
end;
begin :: The computation of "if var<>0 then block"
theorem
card if<>0(a,k1,I) s 0-tartedState SCMPDS I, being Program of
Lm9: 0 in dom (i ';' j ';' I) & 1 in dom (i ';' j ';' I)
proof
set ci=card (i ';' j ';' I);
ci=card I + 2 by Lm8;
then 2 <= ci by NAT_1:11;
then 1 < ci by XXREAL_0:2;
hence thesis by AFINSQ_1:66;
end;
theorem
0 in dom if<>0(a,k1,I) & 1 in dom if<>0(a,k1,I) byInt_position, beInteger
Lm10: (i ';' j ';' I). 0=i & (i ';' j ';' I). 1=j
set= ' java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
A1: i ';' j ';' I =i ';' jI by SCMPDS_4:16
.=Load i ';' jI;
dom ibyCOMPOS_150
hence (i ';' j ';' I).A1: 0in :;
.=i;
A2: 0 in dom Load j by COMPOS_1:50;
card jI=card I+1 by Th1;
then
A3: card Load i=1 & A4:IF=i''(I ; ) ' SCMPDS_414
thus (i ';' j ';' I). 1 =(Load i ';' jI). (0+1) by A1
.=jI. 0 by .= i ';' I2 by:14;
.=(Load j ';' I). 0
.=(Load A5:Shift(I21 c=P4 byLm6;
.=j;
end;
theorem
if< =Exec(,)by,h3,A2java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
goto (card I + 1) by Lm10;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
for s being State of
is_closed_on s,P & I is_halting_on s,P holdsA8:IC s +1by A6,:56
<0a
,k1,I) is_halting_on s,P
proof
let s be State of SCMPDS, I be shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set =f<0(,1I,pIFstop IF,pI=stop I,
s2 = Initialize s, P2 = P +* pI,
s3 = Initialize s, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)<>0_goto 2, j = goto (card I + 1);
A1: IF = i ';' (j ';' I) by SCMPDS_4:16;
A2: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
for a holds s2.a = s4.a by A2,SCMPDS_2:55;
then
A3: DataPart s2 = DataPart s4 by SCMPDS_4:8;
A4: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A5: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A4,FUNCT_4:11;
A6: IC s3 = 0 by MEMSTR_0:47;
assume
s.b <> 0;
then
A7: IC s4 = ICplusConst(s3,2) by A2,A5,SCMPDS_2:55
.= (0+2) by A6,Th4;
assume
A8: I is_closed_on s,P;
then
A9: I is_closed_on s2,P2;
assume
I is_halting_on s,P;
then
A10: P2 halts_on s2;
A11: Start-At(0,SCMPDS) c= s2 & Shift(pI,2) c= P4 by Lm7,FUNCT_4:25;
A12: stop I c= P2 by FUNCT_4:25;
A13: 0 in dom pIF by COMPOS_1:36;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A14: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P2, s2,k1) as Nat;
A15: card pIF = 1+ card IF by COMPOS_1:55
.= 1+(card I +2) by Lm8
.= 1+card I +2
.=card pI+2 by COMPOS_1:55;
m in dom pI by A8;
then m < card pI by AFINSQ_1:66;
then
A16: m+2 < card pIF by A15,XREAL_1:6;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A14,EXTPRO_1:4
.= (m + 2) by A9,A11,A7,A3,A11 java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 36
hence IC Comput(P3,s3,k) in dom pIF by A16,AFINSQ_1:66;
end;
suppose
k = 0;
ComputP3s3k indompIF by A,EXTPRO_12java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
end;
end;
hence IF is_closed_on s,P;
A17::P2halts_on ;
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 40
s2))
:4
CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A17
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A16: k1 +1=k by NAT_1:6java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
.= halt SCMPDS by A10,EXTPRO_1:def 15;
then P3 halts_on s3 by EXTPRO_1:29;
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 15
end;
theorem Th50:
for s being State of SCMPDS, then m <cardpI2 by AFINSQ_166;
Int_position, k1 being Integer st s.DataLoc(s.a,k1)= 0 holds if<>0(a,k1,I)
is_closed_on s, &if<0a,I is_halting_on s,P
proof
let s be State of SCMPDS,I be Program of SCMPDS, a be Int_position,k1 be
Integer;
set b=DataLoc(s.a,k1);
assume
A1: s.b = 0;
set IF=if<>0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3,s3,1), s5 = Comput( suppose
A2: not b in dom Start-At(0,SCMPDS) by
not a in dom hence IC ComputP3,s,)in dom pIF by A3,:2;
then
A3: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.=0 java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 6
A4: pIF c= P4 by FUNCT_4:25;
set i = (a,k1)<>0_goto 2, j = goto (card I + 1);
A5: IF =iA19 (,s,LifeSpanP2,s2)+1)
A6: IC s3 = 0 by MEMSTR_0:47;
Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A5,Th3;
A7: IC s4 = IC s3 + 1 by A3,SCMPDS_2:55
.= (0+1)(2s2,(,2) ,5A,,Th22
A8: 1 in dom IF by Lm9;
1 pIF:;
then
java.lang.StringIndexOutOfBoundsException: Range [15, 2) out of bounds for length 35
.=IF. 1 by A8 hence by A2;
.=j by Lm10;
A10: card IF=card I+2 by Lm8;
then
A11: (card I+2) in dom pIF by COMPOS_1:64;
A12: P3/.IC s4
= P3.IC s4 by PBOOLE:143;
Comput(P3, s3,1 + 1) = Following(P3,s4) by EXTPRO_1:3
.= Exec(j,s4) by A7,A9,A12;
then
A13: IC s5 = ICplusConst(s4,card I+1) by SCMPDS_2:54
.= (card I+1+1) by A7,Th4
.= (card I+(1+1));
A14: (P3)/.IC s5
= P3.IC s5 by PBOOLE:143;
pIF c= P5 by FUNCT_4:25;
then P5.(card I+2) = pIF.(card I+2) by A11,GRFUNC_1:2
.=halt SCMPDS by A10,COMPOS_1:64;
then
A15: CurInstr(P3,s5) = halt SCMPDS by A13,A14;
now
let k be Nat;
A16: k = 0 or 0 + 1 <= k by INT_1:7;
per cases by A16,XXREAL_0:1;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A6,COMPOS_1:36;
end;
suppose
k = 1;
hence IC Comput(P3,s3,k) in dom pIF by A8,A7,COMPOS_1:62;
end;
suppose
1 < k;
then 1+1 <= k by INT_1:7;
hence IC Comput(P3,s3,k) in dom pIF
by A11,A13,A15,EXTPRO_1:5;
end;
end;
hence IF is_closed_on s,P;
P3 halts_on s3 by A15,EXTPRO_1:29;
hence thesis;
end;
theorem Th51:
for s being State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)
<> 0 & I is_closed_on s,P & I is_halting_on s,P
holds IExec(if<>0(a,k1,I),P,Initialize s) =
IExec(I,P,Initialize s) +* Start-At((card I+2),SCMPDS)
proof
let s be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if<>0(a,k1,I), pI=stop I, pIF = stop IF,
s2 = Initialize s, P2 = P +* pI,
s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3, s3,1), P4 = P3;
set i = (a,k1)<>0_goto 2, j = goto (card I + 1);
set SAl=Start-At((card I+2),SCMPDS);
A1: IF=i ';' (j ';' I) by SCMPDS_4:16;
A2: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
A5: IC s3 = 0 by MEMSTR_0:47;
A6: Start-At(0,SCMPDS) c= s2 & Shift(pI,2) c= P4 by Lm7,FUNCT_4:25;
A7: stop I c= P2 by FUNCT_4:25;
for a holds s2.a = s4.a by A2,SCMPDS_2:55;
then
A8: DataPart s2 = DataPart s4 by SCMPDS_4:8;
assume
s.b <> 0;
then
A9: IC s4 = ICplusConst(s3,2) by A2,A4,SCMPDS_2:55
.= (0+2) by A5,Th4;
assume
A10: I is_closed_on s,P;
then
A11: I is_closed_on s2,P2;
assume
A12: I is_halting_on s,P;
then
A13: P2 halts_on s2;
A14: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:4;
A15: CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A14
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A11,A6,A9,A8,Th22,A7
.= halt SCMPDS by A13,EXTPRO_1:def 15;
then
A16: P3 halts_on s3 by EXTPRO_1:29;
A17: CurInstr(P3,s3) = i by A1,Th3;
now
let l be Nat;
assume
A18: l < LifeSpan(P2,s2) + 1;
A19: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A19;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A17;
end;
suppose
l <> 0;
then consider n be Nat such that
A20: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A21: n < LifeSpan(P2,s2) by A18,A20,XREAL_1:6;
assume
A22: CurInstr(P3,Comput(P3,s3,l)) = halt SCMPDS;
A23: Comput(P3,s3,n+1)
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P2,Comput(P2,s2,n)) =
CurInstr(P3,Comput(P3,s4,n)) by A11,A6,A9,A8,Th22,A7
.= halt SCMPDS by A20,A22,A23;
hence contradiction by A13,A21,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P2,s2) + 1 <= l;
then
A24: LifeSpan(P3,s3) = LifeSpan(P2,s2) + 1 by A15,A16,EXTPRO_1:def 15;
A25: DataPart Result(P2,s2) = DataPart Comput(P2, s2
,LifeSpan(P2,s2)) by A13,EXTPRO_1 a,k1 beingIntegersts.(
.= DataPart Comput(P3, s4,LifeSpan(P2,s2)) by A11,A6,A9,A8,Th22,A7
. P,s3L,)+1
by EXTPRO_1:4
. java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 53
A26: now
let x be object Int_position java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
A27: dom Start-At((card I+2),SCMPDS) = { set pJ=stop J, s1 = Initialize s, P1 = P
assume
: inIExecIF,, )
per cases by A28,SCMPDS_4:6;
suppose
A29: x is set i = (a,k1) (k1<_ (cardI +2;
then x <> IC SCMPDS set G Goto (card J+) iG= ;'I';'G;
then
A30: not x in dom SAl by A27,TARSKI:def 1;
thus IExec(IF,P,Initialize s = i '; ( '; G '' J)by :14
.= (Result(P2,s2)).A2 P,s3 )= P3,(,,) :
.= IExec(I,P,Initialize s).x
.= (IExec(I,P,Initialize s) +* SAl).x by A30,FUNCT_4:11;
end;
suppose
A31: x = IC SCMPDS;
A32: IC Result(P2,s2) = IC IExec(I,P,Initialize s)
.= card I by A10,A12,Th25;
A33: x in dom SAl by A27,A31,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= Comput(P3, s3,LifeSpan(P2,s2) + 1).x by A16,A24,EXTPRO_1:23
.= IC Comput(P3, s4,LifeSpan(P2,s2)) by A31,EXTPRO_1:4
.= IC Comput(P2, s2,LifeSpan(P2,s2)) + 2
by A11,A6,A9,A8,Th22,A7
.= IC Result(P2,s2) + 2 by A13,EXTPRO_1:23
.= IC SAl by A32,FUNCOP_1:72
.= (IExec(I,P,Initialize s) +* SAl).x by A31,A33,FUNCT_4:13;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(I,P,Initialize s) +* Start-At((card I+2),SCMPDS))
by PARTFUN1:def 2;
hence thesis by A26,FUNCT_1:2;
end;
theorem Th52:
for s being State of SCMPDS,I being Program of SCMPDS,a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1)= 0
holds IExec(if<>0(a,k1,I),P,Initialize s) = s +* Start-At((card I+2),SCMPDS)
proof
let s be State of SCMPDS,I be Program of SCMPDS,a be Int_position, k1 be
Integer;
set b=DataLoc(s.a,k1);
assume
A1: s.b = 0;
set SAl=Start-At((card I+2),SCMPDS);
set i = (a,k1)<>0_goto 2, j = goto (card I + 1);
set IF=if<>0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3,s3,1), s5 = Comput(P3,s3,2), P4 = P3, P5 = P3;
A2: IF =i ';' (j ';' I) by SCMPDS_4:16;
A3: pIF c= P3 by FUNCT_4:25;
then
A4: pIF c= P4;
A5: pIF c= P5 by A3;
A6: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
A7: IC s3 = 0 by MEMSTR_0:47;
A8: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
. ,s3A2;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.=0 by A1,A6,FUNCT_4:11;
then
A9: IC s4 = IC s3 + 1 by A8,SCMPDS_2:55
.= (0+1) by A7;
A10: 1 in dom IF by Lm9;
then 1A4:s3DataLoc(3.,k1)s3.by :11
then
.=sb by A3,UNCT_4:11;
.=IF. 1 by A10,COMPOS_1:63
.=j by Lm10;
A12: P3/.IC s4
= P3.IC s4 by PBOOLE:143;
A13: Comput(P3, s3,1 + 1) = Following(P3,s4) by EXTPRO_1:3
.= Exec(j,s4) by A9,java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 6
then
A14: IC s5 = ICplusConst. 0cI+) ;
.= (card I+1+1) by A9,Th4
.= (card I+(1+1));
A15: (P3)/.IC s5
= P3.IC s5 by PBOOLE:143;
A16: card IF=card I+2 by Lm8;
then (card I+2) in dom pIF by COMPOS_1:64;
then P5.(card I+2) = pIF.(card I+2) by A5,GRFUNC_1:2
.=halt SCMPDS by A16,COMPOS_1:64;
then
A17: CurInstr(P3,s5) = halt SCMPDS by A14,A15;
then
A18: P3 halts_on s3 by EXTPRO_1:29;
A19: CurInstr(P3,0, =s1&J ,1by :;
now
etl Natjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
assume
l < 1+1;
then
: < 1:13;
A21: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
A22: P3/.IC Comput(P3,s3,l)
= P3.IC Comput(P3,s3,l) by PBOOLE:143;
per cases by A20,NAT_1:25;
suppose
l=0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A21;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A19;
end;
suppose
l=1;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A9,A11,A22;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds 2 <= l;
then LifeSpan(P3,s3) = 2 by A17,A18,EXTPRO_1:def 15;
then
A23: s5 = Result(P3,s3) by A18,EXTPRO_1:23;
A24: now
A25: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
let x be object;
assume
A26: x in dom IExec(IF,P,Initialize s);
per cases by A26,SCMPDS_4:6;
suppose
A27: hift(pJ,ardI) c=P4 A10,XBOOLE_1:1;
then x <> IC SCMPDS by SCMPDS_2:43;
then
A28: not x in dom SAl by A25,TARSKI:def 1;
A29: not x in dom Start-At(0,SCMPDS) by A27,SCMPDS_4:18;
thus IExec(IF,P,Initialize s).x = s5.x by A23
.= s4.x by A13,A27,java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 22
.= s3.x by A8,A27,SCMPDS_2:55
= s by ,UNCT_4:11
.= (s +* SAl).x by A28,FUNCT_4:11;
end;
suppose
A30: x = IC SCMPDS;
hence IExec(IF,P,Initialize s).x = (card I + 2) by A14,A23
.= (s +* Start-At((card I+2),SCMPDS)).x by A30,FUNCT_4:113;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (s +* SAl) by PARTFUN1:def 2;
hence thesis by A24,FUNCT_1:2;
end;
registration
let I be shiftable parahalting Program of SCMPDS, a be Int_position,k1 be
Integer;
cluster if<>0(a,k1,I) -> shiftable parahalting;
correctness
proof
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
set IF=if<>0(a,k1,I), pIF = stop IF;
thus IF is shiftable;
s 0- Stateofjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s by MEMSTR_0henceIC (,,) dom pIFbyA18,16AFINSQ_166;
assume pIF c=P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3 is_closed_on,&Iis_halting_on ,Pby ,Th12java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
cases;
suppose
s.DataLoc(s.a,k1)<>0;
IF is_halting_ons, A3,Th49;
hence P java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 6
end;
suppose
s.DataLoc=ComputP,(3,
thens1)
hence P halts_on s by A1,A2;
end;
end;
end;
registration
let I be halt-free Program of SCMPDS, a be Int_position,k1 be Integer;
cluster if<>0(a,k1,I) -> halt-free;
coherence;
end;
theorem
for s being State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,a being Int_position,k1 being Integer
holds IC IExec(if<>0(a,k1,I),P,Initialize s) = card I + 2
proof
let s be State of SCMPDS,I be halt-free shiftable parahalting Program of
SCMPDS,a be Int_position,k1 be Integer;
set IF=if<>0(a,k1,I);
A1: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
suppose
s.DataLoc(s.a,k1) <> 0;
then IExec(IF,P,Initialize s) =IExec(I,P,Initialize s)
+* Start-At((card I+2),SCMPDS)
by A1,Th51;
hence thesis by FUNCT_4:113;
end;
suppose
s.DataLoc(s.a,k1) = 0;
then IExec(IF,P,Initialize s) =s +* Start-At((card I+2),SCMPDS) by Th52;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,a,b being Int_position,k1 being Integer st s.DataLoc(s.a,k1)
<> 0 holds IExec(if<>0(a,k1,I),P,Initialize s).b
= IExec(I,P,Initialize s).b
proof
let s be State of SCMPDS,I be halt-free shiftable parahalting Program of
SCMPDS,a,b be Int_position,k1 be Integer;
assume
A1: s.DataLoc(s.a,k1)<>0;
A2: not b in dom Start-At((card I+2),SCMPDS) by SCMPDS_4:18;
I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
then IExec(if<>0(a,k1,I),P,Initialize s) = IExec(I,P,Initialize s)
+* Start-At((card I+2),SCMPDS)
by A1,Th51;
hence thesis by A2,FUNCT_4:11;
end;
theorem
for s being State of SCMPDS,I being Program of SCMPDS,a,b being
Int_position, k1 being Integer st s.DataLoc(s.a,k1)= 0
holds IExec(if<>0(a,k1,I),P,Initialize s).b = s.b
proof
let s be State of SCMPDS,I be Program of SCMPDS,a,b be Int_position, k1 be
Integer;
assume
s.DataLoc(s.a,k1)=0;
then
A1: IExec(if<>0(a,k1,I),P,Initialize s)
= s +* Start-At((card I+2),SCMPDS) by Th52;
not b in dom Start-At((card I+2),SCMPDS) by SCMPDS_4:18;
hence thesis by A1,FUNCT_4:11;
end;
begin :: The computation of "if var>0 then block1 else block2"
theorem
card if>0(a,k1,I,J) = card I + card J + 2 by Lm4
theorem
0 in dom if>0(a,k1,I,J) & 1 in dom if>0(a,k1,I,J)
proof
set ci then P3halts_on s3 by EXTPRO_1:29;
ci=card I + card J +2 by Lm4;
then 2 <= ci by java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 4
then 1 < ci by XXREAL_0:2;
hence thesis by AFINSQ_1:66;
end;
theorem
(card I+ 2 by Lm5;
theorem Th59:
for s being 0-started State of SCMPDS, I,J being shiftable Program of
SCMPDS , Integer .DataLocs.ak1)0 &I
is_closed_on s,P & I is_halting_on s,P holds if>0(a,k1,I,J) is_closed_on s,P
& if>0(a,k1,I,J) is_halting_on s,P
proof
let s be 0-started State of SCMPDS, I,J be shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
= cardJ1)
set I2 = I ';' G ';' set =oto(ardJ1;
pI2=stop I2, s2 = Initialize s, P2 = P + = ; ; ,IF0,,,) java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 59
P3 = P +* pIF,
s4 = Comput(P3,s,1), P4 = P3;
set i =(,1<0_oto (card I +2)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
A1: 0 in dom pIF by COMPOS_1:36;
2 Initializes =sbyMEMSTR_0:44;
then
A3: IC s = 0 by MEMSTR_0:47;
A4: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
. i '; I2 by SCMPDS_4:4
then
A5: Shift(pI2,1) c= P4 by Lm6;
A6: Comput(P3, s,0 + 1) = Following(P3,Comput(P3,s,0)) by EXTPRO_1:3
.= Following(P3,s) by EXTPRO_1:2
.= Exec(i,s) by A4,Th3,A2;
for a holds s2.a = s4.a by A6,A2,SCMPDS_2:56;
then
A7: DataPart s2 = DataPart s4 by SCMPDS_4:8;
assume
s.b > 0;
then
A8: IC s4 = IC s + 1 by A6,SCMPDS_2:56
. s.b >0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
assume
A9: I is_closed_on s,P;
assume
A10: I is_halting_on s,P;
then
A11: I2 is_closed_on s,P by A9,Th21;
then
A12: Start-At(0,SCMPDS) c= s2 & I2 is_closed_on s2,P2 by FUNCT_4:25;
A13: stop I2 c= P2 by FUNCT_4:25;
I2 is_halting_on s,P by A9,A10,Th21;
then
A14: P2 halts_on s2;
A15: card pIF = card IF +1 by COMPOS_1:55
.= card I2 +1+1 by A4,Th1;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A16: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P2, s2,k1) as Nat;
A17: card pIF = card pI2+1 by A15,COMPOS_1:55;
m in dom pI2 by A11;
then m < card pI2 by AFINSQ_1:66;
then
A18: m+1 < card pIF by A17,XREAL_1:6;
IC Comput(P3,s,k) = IC Comput(P3, s4,k1) by A16,EXTPRO_1:4
.= (m + 1) by A12,A5,A8,A7,Th22,A13;
hence IC Comput(P3,s,k) in dom pIF by A18,AFINSQ_1:66;
end;
suppose
k = 0;
hence IC Comput(P3,s,k) in dom pIF by A1,A3,EXTPRO_1:2;
end;
end;
hence IF is_closed_on s,P by A2;
A19: Comput(P3,s,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s,1),LifeSpan(P2,s2)) by EXTPRO_1:4;
CurInstr(P3,Comput(P3,s,LifeSpan(P2,s2)+1))
=CurInstr(P3,Comput(P3,s4,LifeSpan(P2,s2))) by A19
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A12,A5,A8,A7,Th22,A13
.= halt SCMPDS by A14,EXTPRO_1:def 15;
then P3 halts_on s by EXTPRO_1:29;
hence thesis by A2;
end;
theorem Th60:
for s being State of SCMPDS,I being Program of SCMPDS,J being
shiftable Program of SCMPDS,a being Int_position,k1 being Integer st s.DataLoc(
s.a,k1) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds if>0(a,k1,I,J)
is_closed_on s,P & if>0(a,k1,I,J) is_halting_on s,P
proof
let s be State of SCMPDS,I be Program of SCMPDS, J be shiftable Program of
SCMPDS, a be Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set pJ=stop J, s1 = Initialize s, P1 = P +* pJ,
IF=if>0(a,k1,I,J), pIF=
stop IF, s3 = Initialize s, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)<=0_goto (card I + 2);
set G =Goto (card J+1), iG=i ';' I ';' G;
A1: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
.= i ';' (I ';' G ';' J) by SCMPDS_4:14;
A2: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
A5: IC s3 = 0 by MEMSTR_0:47;
assume
s.b <= 0;
then
A6: IC s4 = ICplusConst(s3,card I + 2) by A2,A4,SCMPDS_2:56
.= (0+(card I + 2)) by A5,Th4;
assume
A7: J is_closed_on s,P;
then
A8: Start-At(0,SCMPDS) c= s1 & J is_closed_on s1,P1 by FUNCT_4:25;
A9: stop J c= P1 by FUNCT_4:25;
A10: pIF c= P3 by FUNCT_4:25;
A11: card iG = card (i ';' I) + card G by AFINSQ_1:17
.=card (i ';' I) + 1 by COMPOS_1:54
.=card I +1 +1 by Th1
.=card I +(1 +1);
then Shift(pJ,card I+2) c= pIF by Th5;
then
A12: Shift(pJ,card I+2) c= P4 by A10,XBOOLE_1:1;
assume
J is_halting_on s,P;
then
A13: P1 halts_on s1;
for a holds s1.a = s4.a by A2,SCMPDS_2:56;
then
A14: DataPart s1 = DataPart s4 by SCMPDS_4:8;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A15: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P1, s1,k1) as Nat;
m in dom pJ by A7;
then m < card pJ by AFINSQ_1:66;
then
A16: m + (card I + 2) < card pJ + (card I + 2) by XREAL_1:6;
A17: card pJ = card J + 1 by COMPOS_1:55;
A18: card pIF = card IF+1 by COMPOS_1:55
.=card I +2 +card J +1 by A11,AFINSQ_1:17
.=card I +2 + card pJ by A17;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A15,EXTPRO_1:4
.= (m + (card I + 2)) by A8,A14,A12,A6,Th22,A9;
hence IC Comput(P3,s3,k) in dom pIF by A18,A16,AFINSQ_1:66;
end;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A5,COMPOS_1:36;
end;
end;
hence IF is_closed_on s,P;
A19: Comput(P3,s3,LifeSpan(P1,s1)+1)
ComputP3,Comput(P3,s3,1),LifeSpan(P1
,s1))
by EXTPRO_1:4;
CurInstr(P3,
Comput(P3,s3,LifeSpan(P1,s1)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P1,s1))) by A19
.=CurInstr(P1,
Comput(P1,s1,LifeSpan(P1,s1))) by A8,A14,A12,A6,Th22,A9
I2is_halting_on, by A8,;
then P3 halts_on s3 then
hence thesis;
end;
theorem Th61:
for s being 0-started State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, J being shiftable Program of SCMPDS,a being Int_position,k1
being Integer st s.DataLoc(s.a,k1) > 0 & I is_closed_on s,P &
I is_halting_on s,P
holds IExec(if>0(a,k1,I,J),P,s) = IExec(I,P,s)
+* Start-At((card I + card J + 2),SCMPDS)
proof
let s be 0-started State of SCMPDS,
I be halt-free shiftable Program of SCMPDS, J be
shiftable Program of SCMPDS,a be Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set G=Goto (card J+1);
set I2 = I ';' G ';' J, IF=if>0(a,k1,I,J), pIF = stop IF,
pI2= stop I2, P2 = P +* pI2,
P3 = P +* pIF, s4 = Comput(P3,s,1), P4 = P3;
set i = (a,k1)<=0_goto (card I + 2);
set SAl= Start-At((card I+card J+2
:s byMEMSTR_044;
then
A2: IC s = 0 by MEMSTR_0:47;
A3:IF=i''(I ;'G '; J bySCMPDS_414
.= i (ard + card J+ 2),SCMPDS)byA8,A9,Th24
then
A4: Shift(pI2,1) c= end;
A5: Comput(P3, s,0 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.= Following(P3,s) by EXTPRO_1 for s being 0-tarted State of SCMPDS,I being Program SCMPDS,
.Execis A3T,A1;
assume
s.b > 0;
then
A6: IC s4 = IC s + 1 holds IExec(if>0(a,k1,I,J),P,s)
.= (0+1) by A2;
for a holds s.a = s4.a by A5,SCMPDS_2:56;
then
A7: DataPart s = DataPart s4 by SCMPDS_4:8;
assume
A8: I is_closed_on s,P;
assume
A9: I is_halting_on s,P;
then I2 is_halting_on s,P by A8,Th21;
then
A10: P2 halts_on s by A1;
I2 is_closed_on s,P by A8,A9,Th21;
then
A11: Start-At(0,SCMPDS) c= s & I2 is_closed_on s,P2 by A1,FUNCT_4:25;
A12: stop I2 c= P2 by FUNCT_4:25;
A13: Comput(P3,s,LifeSpan(P2,s)+1)
= Comput(P3,Comput(P3,s,1),LifeSpan(P2,
s))
by EXTPRO_1:4;
A14: CurInstr(P3,
Comput(P3,s,LifeSpan(P2,s)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s))) by A13
.=CurInstr(P2,
Comput(P2,s,LifeSpan(P2,s))) by A11,A4,A6,A7,Th22,A12
.= halt SCMPDS by A10,EXTPRO_1:def 15;
then
A15: P3 halts_on s by EXTPRO_1:29;
A16: CurInstr(P3,s) = i by A3,Th3,A1;
now
let l be Nat;
assume
A17: l < LifeSpan(P2,s) + 1;
A18: Comput(P3,s,0) = s by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s,l))
= CurInstr(P3,sjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
by A18;
hence CurInstr(P3,Comput(P3,s,l))
<> halt SCMPDS by A16;
end;
suppose
l <> 0;
then consider n be Nat such that
A19: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A20: n < LifeSpan(P2,s) by A17,A19,XREAL_1:6;
assume
A21: CurInstr(P3,Comput(P3,s,l)) = halt SCMPDS;
A22: Comput(P3,s,n+1)
= Comput(P3,Comput(P3,s,1),n) by EXTPRO_1:4;
CurInstr(P2,Comput(P2,s,n)) =
CurInstr(P3,Comput(P3,s4,n)) by A11,A4,A6,A7,Th22,A12
.= halt SCMPDS by A19,A21,A22;
hence contradiction by A10,A20,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s,l)) = halt SCMPDS
holds LifeSpan(P2,s) + 1 <= l;
then
A23: LifeSpan(P3,s) = LifeSpan(P2,s) + 1 by A14,A15,EXTPRO_1:def 15;
A24: DataPart Result(P2,s) = DataPart Comput(P2, s
,LifeSpan(P2,s)) by A10,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P2,s))
by A11,A4,A6,A7,Th22,A12
.= DataPart Comput(P3, s,LifeSpan(P2,s) + 1)
by EXTPRO_1:4
.= DataPart Result(P3,s) by A15,A23,EXTPRO_1:23;
A25: now
let x be object;
A26: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
assume
A27: x in dom IExec(IF,P,s);
per cases by A27,SCMPDS_4:6;
suppose
A28: x is Int_position;
then x <> IC SCMPDS by SCMPDS_2:43;
then
A29: not x in dom SAl by A26,TARSKI:def 1;
thus IExec(IF,P,s).x = (Result(P3,s)).x
.= (Result(P2,s)).x by A24,A28,SCMPDS_4:8
.= IExec(I2,P,s).x
.= (IExec(I2,P,s) +* SAl).x by A29,FUNCT_4:11;
end;
suppose
A30: x = IC SCMPDS;
A31: IC Result(P2,s) = IC IExec(I2,P,s)
.= (card I + card J + 1) by A8,A9,Th23;
A32: x in dom SAl by A26,A30,TARSKI:def 1;
thus IExec(IF,P,s).x = (Result(P3,s)).x
.= Comput(P3, s,LifeSpan(P2,s) + 1).x by A15,A23,EXTPRO_1:23
.= IC Comput(P3, s4,LifeSpan(P2,s)) by A30,EXTPRO_1:4
.= IC Comput(P2, s,LifeSpan(P2,s)) + 1 by A11,A4,A6,A7,Th22,A12
.= IC Result(P2,s) + 1 by A10,EXTPRO_1:23
.= IC Start-At(((card I + card J + 1) + 1),SCMPDS) by A31,FUNCOP_1:72
.= (IExec(I2,P,s) +* SAl).x by A30,A32,FUNCT_4:13;
end;
end;
dom IExec(IF,P,s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(I2,P,s) +* SAl) by PARTFUN1:def 2;
hence IExec(IF,P,s) = IExec(I2,P,s) +* SAl
by A25,FUNCT_1:2
.= IExec(I,P,s) +* Start-At((card I + card J + 1),SCMPDS) +*
Start-At(
(card I + card J + 2),SCMPDS) by A8,A9,Th24
.= IExec(I,P,s) +* SAl by MEMSTR_0:36;
end;
theorem Th62:
for s being 0-started State of SCMPDS,I being Program of SCMPDS,J being
halt-free shiftable Program of SCMPDS,a being Int_position,k1 being Integer
st s.DataLoc(s.a,k1) <= 0 & J is_closed_on s,P & J is_halting_on s,P
holds IExec(if>0(a,k1,I,J),P,s)
= IExec(J,P,s) +* Start-At((card I+card J+2),SCMPDS)
proof
let s be 0-started State of SCMPDS,I be Program of SCMPDS,
J be halt-free shiftable
Program of SCMPDS,a be Int_position,k1 be Integer;
A1: Initialize s = s by MEMSTR_0:44;
set b=DataLoc(s.a,k1);
set pJ=stop J, s1 = s, P1 = P +* pJ,
IF=if>0(a,k1,I,J), pIF=
stop IF, s3 = s, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)<=0_goto (card I + 2);
set G =Goto (card J+1), iG=i ';' I ';' G;
set SAl=Start-At((card I+card J+2),SCMPDS);
A2: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
.= i ';' (I ';' G ';' J) by SCMPDS_4:14;
A3: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A2,Th3,A1;
A4: IC s3 = 0 by A1,MEMSTR_0:47;
assume
s.b <= 0;
then
A5: IC s4 = ICplusConst(s3,card I + 2) by A3,SCMPDS_2:56
.= (0+(card I + 2)) by A4,Th4;
for a holds s1.a= s4.a by A3,SCMPDS_2:56;
then
A6: DataPart s1 = DataPart s4 by SCMPDS_4:8;
card iG = card (i ';' I) + card G by AFINSQ_1:17
.=card (i ';' I) + 1 by COMPOS_1:54
.=card I +1 +1 by Th1
.=card I +(1 +1);
then
A7: Shift(pJ,card I+2) c= pIF by Th5;
pIF c= P3 by FUNCT_4:25;
then
A8: Shift(pJ,card I+2) c= P4 by A7,XBOOLE_1:1;
assume
A9: J is_closed_on s,P;
then
A10: Start-At(0,SCMPDS) c= s1 & J is_closed_on s1,P1 by A1,FUNCT_4:25;
A11: stop J c= P1 by FUNCT_4:25;
assume
A12: J is_halting_on s,P;
then
A13: P1 halts_on s1 by A1;
A14: Comput(P3,s3,LifeSpan(P1,s1)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P1
,s1))
by EXTPRO_1:4;
A15: CurInstr(P3,
Comput(P3,s3,LifeSpan(P1,s1)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P1,s1))) by A14
.=CurInstr(P1,
Comput(P1,s1,LifeSpan(P1,s1))) by A10,A8,A5,A6,Th22,A11
.= halt SCMPDS by A13,EXTPRO_1:def 15;
then
A16: P3 halts_on s3 by EXTPRO_1:29;
A17: CurInstr(P3,s3) = i by A2,Th3,A1;
now
let l be Nat;
assume
A18: l < LifeSpan(P1,s1) + 1;
A19: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A19;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A17;
end;
suppose
l <> 0;
then consider n be Nat such that
A20: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A21: n < LifeSpan(P1,s1) by A18,A20,XREAL_1:6;
assume
A22: CurInstr(P3,Comput(P3,s3,l)) = halt SCMPDS;
A23: Comput(P3,s3,n+1)
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P1,Comput(P1,s1,n))
= CurInstr(P3,
Comput(P3,s4,n)) by A10,A8,A5,A6,Th22,A11
.= halt SCMPDS by A20,A22,A23;
hence contradiction by A13,A21,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P1,s1) + 1 <= l;
then
A24: LifeSpan(P3,s3) = LifeSpan(P1,s1) + 1 by A15,A16,EXTPRO_1:def 15;
A25: DataPart Result(P1,s1) = DataPart Comput(P1, s1
,LifeSpan(P1,s1)) by A13,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P1,s1))
by A10,A8,A5,A6,Th22,A11
.= DataPart Comput(P3, s3,LifeSpan(P1,s1) + 1)
by EXTPRO_1:4
.= DataPart Result(P3,s3) by A16,A24,EXTPRO_1:23;
A26: now
let x be object;
A27: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
assume
A28: x in dom IExec(IF,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 SAl by A27,TARSKI:def 1;
thus IExec(IF,P,s).x = (Result(P3,s3)).x
.= (Result(P1,s1)).x by A25,A29,SCMPDS_4:8
.= IExec(J,P,s).x
.= (IExec(J,P,s) +* SAl).x by A30,FUNCT_4:11;
end;
suppose
A31: x = IC SCMPDS;
A32: IC Result(P1,s1) = IC IExec(J,P,s)
.= (card J) by A9,A12,Th25,A1;
A33: x in dom SAl by A27,A31,TARSKI:def 1;
thus IExec(IF,P,s).x = (Result(P3,s3)).x
.= Comput(P3, s3,LifeSpan(P1,s1) + 1).x by A16,A24,EXTPRO_1:23
.= IC Comput(P3, s4,LifeSpan(P1,s1)) by A31,EXTPRO_1:4
.= IC Comput(P1, s1,LifeSpan(P1,s1)) + (card
I + 2) by A10,A8,A5,A6,Th22,A11
.= IC Result(P1,s1) + (card I + 2) by A13,EXTPRO_1:23
.= IC Start-At (card J + (card I + 2),SCMPDS) by A32,FUNCOP_1:72
.= (IExec(J,P,s) +* SAl).x by A31,A33,FUNCT_4:13;
end;
end;
dom IExec(IF,P,s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(J,P,s) +* SAl) by PARTFUN1:def 2;
hence thesis by A26,FUNCT_1:2;
end;
registration
let I,J be shiftable parahalting Program of SCMPDS, a be Int_position,k1 be
Integer;
cluster if>0(a,k1,I,J) -> shiftable parahalting;
correctness
proof
set i = (a,k1)<=0_goto (card I + 2), G =Goto (card J+1);
set IF=if>0(a,k1,I,J), pIF = stop IF;
reconsider IJ=I ';' G ';' J as shiftable Program of SCMPDS;
thus IF is shiftable;
let s be 0-started State of SCMPDS;
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s by MEMSTR_0:44;
assume pIF c= P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3: J is_closed_on s,P & J is_halting_on s,P by Th11,Th12;
A4: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
suppose
s.DataLoc(s.a,k1) > 0;
then IF is_halting_on s,P by A4,Th59;
hence P halts_on s by A1,A2;
end;
suppose
s.DataLoc(s.a,k1) <= 0;
then IF is_halting_on s,P by A3,Th60;
hence P halts_on s by A1,A2;
end;
end;
end;
registration
let I,J be halt-free Program of SCMPDS, a be Int_position,k1 be Integer;
cluster if>0(a,k1,I,J) -> halt-free;
coherence;
end;
theorem
for s being 0-started State of SCMPDS,I,J being halt-free shiftable
parahalting Program of SCMPDS,a being Int_position,k1 being Integer holds IC
IExec(if>0(a,k1,I,J),P,s) = card I + card J + 2
proof
let s be 0-started State of SCMPDS,
I,J be halt-free shiftable parahalting Program of SCMPDS,
a be Int_position,k1 be Integer;
set IF=if>0(a,k1,I,J);
A1: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
A2: J is_closed_on s,P & J is_halting_on s,P by Th11,Th12;
per cases;
suppose
s.DataLoc(s.a,k1) > 0;
then IExec(IF,P,s) = IExec(I,P,s) +* Start-At((card I+card J+2),SCMPDS)
by A1,Th61;
hence thesis by FUNCT_4:113;
end;
suppose
s.DataLoc(s.a,k1) <= 0;
then IExec(IF,P,s) = IExec(J,P,s) +* Start-At((card I+card J+2),SCMPDS)
by A2,Th62;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being 0-started State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,J being shiftable Program of SCMPDS,a,b being Int_position,
k1 being Integer st s.DataLoc(s.a,k1)>0 holds
IExec(if>0(a,k1,I,J),P,s).b = IExec(I,P,s).b
proof
let s be 0-started State of SCMPDS,
I be halt-free shiftable parahalting Program of
SCMPDS,J be shiftable Program of SCMPDS,a,b be Int_position, k1 be Integer;
assume
A1: s.DataLoc(s.a,k1)>0;
A2: not b in dom Start-At((card I+card J+2),SCMPDS) by SCMPDS_4:18;
I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
then
IExec(if>0(a,k1,I,J),P,s) = IExec(I,P,s)
+* Start-At((card I + card J + 2),SCMPDS) by A1,Th61;
hence thesis by A2,FUNCT_4:11;
end;
theorem
for s being 0-started State of SCMPDS,I being Program of SCMPDS,J being
halt-free parahalting shiftable Program of SCMPDS,a,b being Int_position,k1
being Integer st s.DataLoc(s.a,k1) <= 0 holds
IExec(if>0(a,k1,I,J),P,s).b = IExec(J,P,s).b
proof
let s be 0-started State of SCMPDS,I be Program of SCMPDS,
J be halt-free parahalting
shiftable Program of SCMPDS,a,b be Int_position, k1 be Integer;
set IF=if>0(a,k1,I,J);
assume
A1: s.DataLoc(s.a,k1) <= 0;
A2: not b in dom Start-At((card I+card J+2),SCMPDS) by SCMPDS_4:18;
J is_closed_on s,P & J is_halting_on s,P by Th11,Th12;
then IExec(IF,P,s) =IExec(J,P,s) +* Start-At((card I+card J+2),SCMPDS)
by A1,Th62;
hence thesis by A2,FUNCT_4:11;
end;
begin :: The computation of "if var>0 then block"
theorem
card if>0(a,k1,I) = card I + 1 by Th1;
theorem
0 in dom if>0(a,k1,I)
proof
set ci=card if>0(a,k1,I);
cardI+1 by Th1;
hence thesis by AFINSQ_1:66;
end;
theorem
if>0(a,k1,I). 0 = (a,k1)<=0_goto (card I + 1) by Th2;
theorem Th69:
for s being State of SCMPDS, I being shiftable Program of SCMPDS
, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)> 0 & I
is_closed_on s,P & I is_halting_on s,P holds if>0(a,k1,I) is_closed_on s,P
& if>0(a,
k1,) is_halting_on s,P
proof
let s be State of SCMPDS, I be shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if>0(a,k1,I), pIF=stop IF, pI=stop I,
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)<=0_goto (card I + 1);
A1: let x be object;
A2: IC s3 = 0 by MEMSTR_0:47;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
A5: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
for a holds s2.a = s4.a by A5,SCMPDS_2:56;
then
A6: DataPart s2 = DataPart s4 by SCMPDS_4:8;
assume
s.b > 0;
then
A7: IC s4 = IC s3 + 1 by A5,A4,SCMPDS_2:56
.= (0+1) by A2;
assume
A8: I is_closed_on s,P;
then
A9: I is_closed_on s2,P2;
assume
I is_halting_on s,P;
then
A10: P2 halts_on s2;
A11: Start-At(0,SCMPDS) c= s2 & Shift(pI,1) c= P4 by Lm6,FUNCT_4:25;
A12: stop I c= P2 by FUNCT_4:25;
A13: card pIF = card IF +1 by COMPOS_1:55
.= card I +1+1 by Th1;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A14: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P2, s2,k1) as Nat;
A15: card pIF = card pI+1 by A13,COMPOS_1:55;
m in dom pI by A8;
then m < card pI by AFINSQ_1:66;
then
A16: m+1 < card pIF by A15,XREAL_1:6;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A14,EXTPRO_1:4
.= (m + 1) by A9,A11,A7,A6,Th22,A12;
hence IC Comput(P3,s3,k) in dom pIF by A16,AFINSQ_1:66;
end;
suppose
k = 0;
hence IC Comput(P3,s3,k) in dom pIF by A1,A2,EXTPRO_1:2;
end;
end;
hence IF is_closed_on s,P;
A17: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:4;
CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,Comput(P3,s4,LifeSpan(P2,s2))) by A17
.=CurInstr(P2,Comput(P2,s2,LifeSpan(P2,s2))) by A9,A11,A7,A6,Th22,A12
.= halt SCMPDS by A10,EXTPRO_1:def 15;
then P3 halts_on s3 by EXTPRO_1:29;
hence thesis;
end;
theorem Th70:
for s being State of SCMPDS,I being Program of SCMPDS, a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) <= 0 holds if>0(a,k1,I)
is_closed_on s,P & if>0(a,k1,I) is_halting_on s,P
proof
let s be State of SCMPDS,I be Program of SCMPDS, a be Int_position,k1 be
Integer;
set b=DataLoc(s.a,k1);
assume
A1: s.b <= 0;
set i = (a,k1)<=0_goto (card I + 1);
set IF=if>0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
A2: IC s3 = 0 by MEMSTR_0:47;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
then
A5: IC s4 = ICplusConst(s3,card I + 1) by A1,A4,SCMPDS_2:56
.= (0+(card I + 1)) by A2,Th4;
A6: card IF=card I+1 by Th1;
then
A7: (card I+1) in dom pIF by COMPOS_1:64;
A8: P3/.IC s4
= P3.IC s4 by PBOOLE:143;
pIF c= P3 by FUNCT_4:25;
then pIF c= P4;
then P4.(card I+1) = pIF.(card I+1) by A7,GRFUNC_1:2
.=halt SCMPDS by A6,COMPOS_1:64;
then
A9: CurInstr(P3,s4) = halt SCMPDS by A5,A8;
now
let k be Nat;
per cases;
suppose
0 < k;
then 1+0 <= k by INT_1:7;
hence IC Comput(P3,s3,k) in dom pIF by A7,A5,A9,EXTPRO_1:5;
end;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A2,COMPOS_1:36;
end;
end;
hence IF is_closed_on s,P;
P3 halts_on s3 by A9,EXTPRO_1:29;
hence thesis;
end;
theorem Th71:
for s being State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)>
0 & I is_closed_on s,P & I is_halting_on s,P
holds IExec(if>0(a,k1,I),P,Initialize s) = IExec(I,P,Initialize s)
+* Start-At((card I+1),SCMPDS)
proof
let s be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if>0(a,k1,I), pI=stop I, pIF = stop IF,
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 = Comput(P3, s3,1), P4 = P3;
set i = (a,k1)<=0_goto (card I + 1);
set SAl=Start-At((card I+1),SCMPDS);
A1: IC s3 = 0 by MEMSTR_0:47;
A2: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A3: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A2,FUNCT_4:11;
A4: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
assume
s.b > 0;
then
A5: IC ume
.= (0+1) by A28: x in dom IExec,P,)
for a holds s2.a = s4.a by A4,SCMPDS_2:56;
then
A6: DataPart s2 = DataPart s4 by SCMPDS_4:8;
assume
A7: I is_closed_on s,P;
then
A8: I is_closed_onA30: in by A27TARSKIdef1;
Start-t,CMPDS)c=s2&Shiftp,)c P4 by Lm6,FUNCT_4:25;
A10: stop I c= P2 by FUNCT_4 . (esult(1s1).xby A25,29SCMPDS_48
A11: I .= (IExec(,P,s)+*SAl)xby A30,UNCT_4:11;
then
A12: P2 halts_on s2;
A13: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2,s2) suppose
by EXTPRO_1:4;
A14: CurInstr(P3,Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,Comput(P3,s4,LifeSpan(P2,s2))) by A13
.=CurInstr(P2,Comput(P2,s2,LifeSpan(P2,s2))) by A8,A9,A5,A6,Th22,A10
.= halt SCMPDS by A12,EXTPRO_1:def 15;
then
A15: P3 halts_on s3 by EXTPRO_1:29;
A16: CurInstr(P3,s3) = i by Th3;
now
let l be Nat;
assume
A17: l < LifeSpan(P2,s2) + 1;
A18: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A18;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A16;
end;
suppose
l <> 0;
then consider n be Nat such that
A19: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A20: n < LifeSpan(P2,s2) by A17,A19,XREAL_1:6;
assume
A21: CurInstr(P3,Comput(P3,
s3,l)) = halt SCMPDS;
A22: Comput(P3,s3,n+1)
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P2,Comput(P2,s2,n)) =
CurInstr(P3,Comput(P3,s4,n)) by A8,A9,A5,A6,Th22,A10
.= halt SCMPDS by A19,A21,A22;
hence contradiction by A12,A20,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P2,s2) + 1 <= l;
then
A23: LifeSpan(P3,s3) = LifeSpan(P2,s2) + 1 by java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 36
A24: DataPart Result(P2s =;
LifeSpan(P2,s2)) by A12,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P2,s2)) by A8,A9 hence P sby A1,2;
.= DataPart Comput(P3, s3,LifeSpan(P2,s2) + 1)
by java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 4
.= DataPart Result(P3,s3) by A15,A23,EXTPRO_1:23;
A25
coherencejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
A26: dom
assume
:x indom IExec,, s);
per cases by A27, parahalting Program of,abeingInt_positionk1 being holds IC
A28: xproof
x < IC bySCMPDS_243java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
then
A29: not x in dom SAl by A26,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= (Result(P2,s2)).x by A24,A28,SCMPDS_4:8
.= IExec(I,P,Initialize s).x
. suppose
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
suppose
A30: x = IC SCMPDS;
A31: IC hence by FUNCT_4113;
.= card I by A7,A11,Th25;
A32: x in dom SAl by A26,A30 s.(.,1 < 0;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= Comput(P3, s3,LifeSpan(P2 then (,,) =IExecJPs *Start-(cardI+ J+)SCMPDSjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
.= IC Comput(P3, s4, thesisby FUNCT_4113
.= IC Comput(P2, s2,LifeSpan(P2,s2)) + 1
by A8,A9,A5,A6,Th22,A10
.= IC Result(P2,s2) + 1 by A12,EXTPRO_1:23
.= IC SAl by A31,FUNCOP_1:72
.= (IExec(I,P,Initialize s) +* SAl).x by A30,A32,FUNCT_4:13;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(I,P,Initialize s) +* SAl) by PARTFUN1:def 2;
hence thesis by A25,FUNCT_1:2;
end;
theorem Th72:
for s being State of SCMPDS,I being Program of SCMPDS,a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) <= 0
holds IExec(if>0(a,k1,I),P,Initialize s) = s +* Start-At((card I+1),SCMPDS)
proof
let s be State of SCMPDS,I be Program of SCMPDS,a be Int_position, k1 be
Integer;
set b=DataLoc(s.a,k1);
set IF=if>0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3, s3,1), P4 = P3;
set i = (a,k1)<=0_goto (card I + 1);
set SAl=Start-At((card I+1),SCMPDS);
A1: IC s3 = 0 by MEMSTR_0:47;
A2: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A3: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A2,FUNCT_4:11;
A4: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
assume
s.b <= 0;
then
A5: IC s4 = ICplusConst(s3,card I + 1) by A4,A3,SCMPDS_2:56
.= (0+(card I + 1)) by A1,Th4;
pIF c= P3 by FUNCT_4:25;
then
A6: pIF c= P4;
A7: P3/.IC s4
= P3.IC s4 by PBOOLE:143;
A8: card IF=card I+1 by Th1;
then (card I+1) in dom pIF by COMPOS_1:64;
then P4.(card I+1) = pIF.(card I+1) by A6,GRFUNC_1:2
.=halt SCMPDS by A8,COMPOS_1:64;
then
A9: CurInstr(P3,s4) = halt SCMPDS by A5,A7;
then
A10: P3 halts_on s3 by EXTPRO_1:29;
A11: CurInstr(P3,s3) = i by Th3;
now
let l be Nat;
A12: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
assume
l < 1;
then l <1+0;
then l=0 by NAT_1:13;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3) by A12;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A11;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds 1 <= l;
then LifeSpan(P3,s3) = 1 by A9,A10,EXTPRO_1:def 15;
then
A13: s4 = Result(P3,s3) by A10,EXTPRO_1:23;
A14: now
A15: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
let x be object;
assume
A16: x in dom IExec(IF,P,Initialize s);
per cases by A16,SCMPDS_4:6;
suppose
A17: x is Int_position;
then x <> IC SCMPDS by SCMPDS_2:43;
then
A18: not x in dom SAl by A15,TARSKI:def 1;
A19: not x in dom Start-At(0,SCMPDS) by A17,SCMPDS_4:18;
thus IExec(IF,P,Initialize s).x = s4.x by A13
.= s3.x by A4,A17,SCMPDS_2:56
.= s.x by A19,FUNCT_4:11
.= (s +* SAl).x by A18,FUNCT_4:11;
end;
suppose
A20: x = IC SCMPDS;
hence IExec(IF,P,Initialize s).x = (card I + 1) by A5,A13
.= (s +* SAl).x by A20,FUNCT_4:113;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (s +* SAl) by PARTFUN1:def 2;
hence thesis by A14,FUNCT_1:2;
end;
registration
let I be shiftable parahalting Program of SCMPDS, a be Int_position,k1 be
Integer;
cluster if>0(a,k1,I) -> shiftable parahalting;
correctness
proof
set i = (a,k1)<=0_goto (card I +1);
set IF=if>0(a,k1,I), pIF = stop IF;
thus IF is shiftable;
let s be 0-started State of SCMPDS;
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s by MEMSTR_0:44;
assume pIF c= P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
suppose
DataLocsk) >0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
then IF is_halting_on s,P by A3,Th69;
hence P halts_on s by A2,A1;
end;
suppose
s.DataLoc(s.a,k1) <= 0;
then IF is_halting_on s,P by Th70;
hence P halts_on s by A2,A1;
end;
end;
end;
registration
let I be halt-free Program of SCMPDS, a be Int_position,k1 be Integer;
end;
coherence;
end;
theorem
for s being 0-started State of SCMPDS,
I being halt-free shiftable parahalting Program of (>ak1IJ,s. (Ps.
a being Int_position,k1 being Integer
holds IC IExec(if>0(a,k1,I),P,s) = card I + 1
theor
letcard>0a,1I)=card I+1by ;
I be halt-free shiftable parahalting Program of
SCMPDS,a be Int_position,k1 be Integer;
=>0,1I;
A1: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
A2: Initialize s = s by MEMSTR_0:44;
per cases;
suppose
s.DataLoc(s.a,k1) > 0;
then IExec(IF,P,s) =IExec(I,P,s) +* Start-At((card I+1),SCMPDS)
by A1,Th71,A2;
hence thesis by FUNCT_4:113;
end;
suppose
s.DataLoc(s.a,k1) <= 0;
then IExec(IF,P,s) =s +* Start-At((card I+1),SCMPDS) by Th72,A2;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,a,b being Int_position,k1 being Integer st s.DataLoc(s.a,k1)>
0 holds IExec(if>0(a,k1,I),P,Initialize s).b = IExec(I,P,Initialize s).b
proof
let s be State of SCMPDS,I be halt-free for s being State of SCMPDS, I being shiftable Program of SCMPDS
SCMPDSab be Int_position,1be Integer;
assume
A1: s.DataLoc(s.a,k1) > 0;
A2: not b in dom Start-At((card I+1),SCMPDS) by SCMPDS_4:18;
I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
then IExec(if>0(a,k1,I),P,Initialize s) = IExec(I,P,Initialize s)
+* Start-At((card I+1),SCMPDS)
by A1,Th71;
hence thesis by A2,FUNCT_4:11;
end;
theorem
for s being State of SCMPDS,I being Program of SCMPDS,a,b being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) <= 0
holds IExec(if>0(a,k1,I),P,Initialize s).b = s.b
proof
let s be State of SCMPDS,I be Program of SCMPDS,a,b be Int_position, k1 be
Integer;
assume
s.DataLoc(s.a,k1) <= 0;
then
A1: IExec(if>0(a,k1,I),P,Initialize s) = s +* Start-At((card I+1),SCMPDS)
by Th72;
not b in dom Start-At((card I+1),SCMPDS) by SCMPDS_4:18;
hence thesis by A1,FUNCT_4:11;
end;
begin :: The computation of "if var<=0 then block"
theorem
card if<=0(a,k1,I) = card I + 2 by Lm8;
theorem
0 in dom if<=0(a,k1,I) & 1 in dom if<=0(a,k1,I) by Lm9;
theorem
if<=0(a,k1,I). 0 = (a,k1)<=0_goto 2 & if<=0(a,k1,I). 1 =
goto (card I + 1) by Lm10;
theorem Th79:
for s being State of SCMPDS, I being shiftable Program of
SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1) <= 0 & I
is_closed_on s,P & I is_halting_on s,P holds if<=0(a,k1,I) is_closed_on s,P
& if<=0(a
,k1,I) is_halting_on s,P
proof
let s be State of SCMPDS, I be shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if<=0(a,k1,I), pIF=stop IF, pI=stop I,
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)<=0_goto 2, j = goto (card I + 1);
A1: stop I c= P2 by FUNCT_4:25;
A2: IF = i ';' (j ';' I) by SCMPDS_4:16;
A3: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A2,Th3;
for a holds s2.a = s4.a by A3,SCMPDS_2:56;
then
A4: DataPart s2 = DataPart s4 by SCMPDS_4:8;
A5: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A6: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A5,FUNCT_4:11;
A7: IC s3 = 0 by MEMSTR_0:47;
assume
s.b <= 0;
then
A8: IC s4 = ICplusConst(s3,2) by A3,A6,SCMPDS_2:56
.= (0+2) by A7,Th4;
assume
A9: I is_closed_on s,P;
then
A10: I is_closed_on s2,P2;
assume
I is_halting_on s,P;
then
A11: P2 halts_on s2;
A12: Start-At(0,SCMPDS) c= s2 & Shift(pI,2) c= P4 by Lm7,FUNCT_4:25;
A13: 0 in dom pIF by COMPOS_1:36;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A14: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P2, s2,k1) as Nat;
A15: card pIF = 1+ card IF by COMPOS_1:55
.= 1+(card I +2) by Lm8
.= 1+card I +2
.=card pI+2 by COMPOS_1:55;
m in dom pI by A9;
then m < card pI by AFINSQ_1:66;
then
A16: m+2 < card pIF by A15,XREAL_1:6;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A14,EXTPRO_1:4
.= (m + 2) by A10,A12,A8,A4,Th22,A1;
hence IC Comput(P3,s3,k) in dom pIF by A16,AFINSQ_1:66;
end;
suppose
k = 0;
hence IC Comput(P3,s3,k) in dom pIF by A13,A7,EXTPRO_1:2;
end;
end;
A2: ICs3 = 0 by MEMSTR_0:47;
:(3,,(2s2+)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:4;
CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
CP3,
P,,ifeSpan(s2)
2,
.= halt SCMPDS by A11,EXTPRO_1:def 15;
then P3 halts_on s3 by EXTPRO_1:29;
hence thesis;
end;
theorem Th80:
for s being State of SCMPDS,I being Program of SCMPDS, a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) > 0 holds if<=0(a,k1,I)
o , &if=(k1,) s,P
let s be State of SCMPDS,I be Program of SCMPDS, a be Int_position,k1 be
Integer;
set b=DataLoc(s.a,k1);
assume
A1 s.b >0;
set i = (a,k1)<=0_goto 2, j = goto (card I + 1);
set if=(,k1java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
P3 = henceIC(3,,)indomby ,:66java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
A2: IF =i ';' (j ';' I) by SCMPDS_4:16;
A3: not b in dom Start-At(0,SCMPDS end;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
A5: IC s3 = 0 by MEMSTR_0:47;
Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by :: by Yuzhong Ding and Xiquan Liang
.= Exec(:: detailed in file:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
then
6 IC s4 =IC s3 +1by ,A4,:56
.= (0+1) by A5;
A7: pIF c= VALUED_1,NEWTONjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
then
pIF c=P4;
A9: 1 in dom IF by XCMPLX_191
then 1 in domhence thesis;
then
:P4 =pIF 1byA8,GRFUNC_1:2
.=IFA1 x)> and
.j by Lm10java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
A11.*(x2*x3sinx1)x)*in(3)+(1)*in()cos
then
c I+)dom :64java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
:/.
.ICPBOOLE
(P3 1+)=Following,s4 EXTPRO_13
.= Exec=*()*os(x)cos(x)cos()by:java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
A14: IC s5 = ICplusConst(s4,card I x)=-*sin(x))^
+1+) by A6,h4
=( +(+1);
:(). s5
= P3.IC s5 by PBOOLE:143;
pIF c= P5 by A7;
then P5.(card I+2) = pIF.(card I+2) by A12,GRFUNC_1:2
.=halt SCMPDS by A11,COMPOS_1:64;
then
A16: CurInstr(P3,s5) = halt SCMPDS by A14,A15;
now
let k be Nat;
A17: k = 0 or 0 + 1 <= k by INT_1:7;
per cases by A17,XXREAL_0:1;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A5,COMPOS_1:36;
end;
suppose
k = 1;
hence IC Comput(P3,s3,k) in dom pIF by A9,A6,COMPOS_1:62;
end;
suppose
1 < k;
then 1+1 <= k by INT_1:7;
hence IC Comput(P3,s3,k) in dom pIF
by A12,A14,A16,EXTPRO_1:5;
end;
end;
hence IF is_closed_on s,P;
P3 halts_on s3 by A17:Comput(P3,3LifeSpan(2,s2+1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
hence thesis;
end;
theorem Th81:
for s =CurInstrP3ComputP,4,(,)
Program of SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)
<= 0 & I is_closed_on s,P & I is_halting_on s,P
holds IExec(if<=0(a,k1,I),P,Initialize s) =
IExec(I,P,Initialize s) +* Start-At((card I+2),SCMPDS)
proof
let s be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
b=DataLocsak1);
set IF=if<=0(a,k1,I), pIF = stop , beingInteger st s.ataLocs.,1)< >ak,)
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 Comput(3,s3),P4 P3;
oof
setSAl=tart-At(card I),SCMPDS)
A1: stop I c= P2 by FUNCT_4:25;
A2: java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
A3: Comput(P3, s3,0_oto(card I +1;
=(3,s3) byEXTPRO_1:
.= Exec(i,s3) by A2,Th3;
A4: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a inA2 A2: IC version30 or later, subject.
then
s3.DataLoc(.,k1)=3b by FUNCT_411
. SQUARE_1,
byMEMSTR_0:;
A7:Start-At0,CMPDS) c=s2&Shift(pI2)c P4 by Lm7,FUNCT_4:25;
holdss2. =aby A3SCMPDS_2:56;
then
SCMPDS_48java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
assume
<0
= = P3.IC. by143java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
.= (0+2) by A6,Th4;
assume
A10: I .=halt SCMPDS bA6C:64java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
then
A11: I )cos(x3)cos(x1)*os(2*x))byA1T
)x)sin A1
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
A13
A14:Comput(P3,3,LifeSpan(P2,2)1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
.=os(1 0 <k;
,2)
EXTPRO_14;
15:CurInstr(P3,
Comput(P3,s3,(P2,s2)+))
=CurInstr x2*inx3)sinx1*(2)*inx3)*cotx3)cot(2) ,h2
Comput(P3,s4,LifeSpan(P2,s2))) by A14
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A11,A7,A9,A8,Th22,A1
.= halt SCMPDS by A13,EXTPRO_1:def 15;
then
A16: P3 halts_on s3 by EXTPRO_1:29;
A17: CurInstr(P3,s3) = i by A2,Th3;
now
let l be Nat;
assume
A18: l < LifeSpan(P2,s2) + 1;
A19: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A19;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A17;
end;
suppose
l <> 0;
then consider n be Nat such that
A20: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A21: n LifeSpan(,s2 by,A20,REAL_16;
assume
A22: CurInstr cos(2x)= ((os))2-sinx))^)1by Th7
A23: Comput(P3,s3,n+1)
=Comput(,Computs3)n)byEXTPRO_1:4;
(x> impliestan(*)(2*an(x)/1-tan())^)
java.lang.StringIndexOutOfBoundsException: Range [45, 19) out of bounds for length 45
by A11,A7,A9,A8,Th22,A1
.= halt SCMPDS by A20,A22,A23;
hence contradiction by A13,A21,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
,,l
P,2)+1 < l;
then
A24:A2: sin(x)>0;
(P2,s2java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
P2s2))by A13,EXTPRO_1:3
.= DataPart =cotx+tanx)2tan()(1-x))^2)/tan(x)by XCMPLX_1:57
=)x)cotx-x)x/x)byA25089java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
EXTPRO_14
= ,)byA16A24,XTPRO_123;
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
assume
:domStart-t(card I+),CMPDS) ={IC SCMPDS}by :13;
assume
A28: =1(x/os())+x)2tanx)2byXCMPLX_162
cases A28SCMPDS_4:6;
A29: x =x*sec()/s()/osx)/ XCMPLX_174
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 4
then
A30: not x in dom SAl by A27,TARSKI:def 1;
thus IExec(IF,,nitializes)x =((3,s3).
2sinx)-*(x)|(+))sin() +(1*in(x)2*sin(x)2sin(x)
.*(x12(x)^21 +*(x-*sin(x)2sin()) NEWTON6
. (,,nitializes + SAl). by A30,UNCT_4:;
end;
suppose
DS
A32: IC Result2()1*x)1x)2x*x
.= card I by A10,A12,.2()3(-*(x*(x*()Th5
: x in dom SAl by A27A31TARSKI:def 1;
thus IExec(F,Initializes.x = (Result(P3s3)).
. (3 ,ifeSpanP2,s2)+1)x by A16,24,XTPRO_1:3
(< java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 68
. ComputP2 ,ifeSpan(2,) +2
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 31
.= (x)<>0 implies*)(java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 68
=by,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
.= (IExec(I .(cotx)^(1 P3,omputP3,4,) ,A9,A6Th22A10
;
end;
dom IExec(IF,,Initialize s)=thecarrier of SCMPDS PARTFUN1:def 2
assume cos(x)<>0;
+* Start-At((card I+2),SCMPDS)) by PARTFUN1:def 2;
hence thesis by A26,FUNCT_1:2;
end;
theorem Th82:
for s being State of SCMPDS,I being Program of SCMPDS,a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) > 0
holds IExec(if<=0(a,k1,I),P,Initialize s)
= s +* Start-At((card I+2),SCMPDS)
proof
let s be State of SCMPDS,I be Program of SCMPDS,a be Int_position, k1 be
Integer;
set b=DataLoc(s.a,k1);
set IF=if<=0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3,s3,1), s5 = Comput(P3,s3,2), P4 = P3, P5 = P3;
set i=(,k1<0goto 2, j goto cI+1)
t(cardI+2,SCMPDS);
A1: .=.(-tan(x)^)*cosx)2/ by:java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
: domStart-t(,SCMPDS)bySCMPDS_418;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A3: s3.DataLocproof
java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
A4: IC s3 = 0 by MEMSTR_0:47;
A5: pIF c= P3 by FUNCT_4:25;
then
A6: pIF c= P4;
A7: pIF c= P5 by A5;
A8: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
assume
s.b > 0;
then
A9: IC s4 = IC s3 + 1 by A8,A3,SCMPDS_2:56
=(+1) by A4
: domIFbyLm9
then 1 in domend;
A11 .1=pIF A6,GRFUNC_1:
.=IF. 1 by A10,COMPOS_1:63
.p
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
A13 .(4*java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
.= Exec(j,s4) by A9,A11,A12;
then
A14: IC s5 = ICplusConst(s4,card I+1) by SCMPDS_2:54
.= (card I+1+1) by A9,Th4
.= (card I+(1+1));
A15: (P3)/.IC s5
= P3.IC s5 by PBOOLE:143;
A16: card IF=card I+2 by Lm8;
then (card I+2) in dom pIF by COMPOS_1:64;
then P5.(card I+2) = pIF.(card I+2) by A7,GRFUNC_1:2
.=halt SCMPDS by A16,COMPOS_1:64;
then
A17: CurInstr(P3,s5) = halt SCMPDS by A14,A15;
then
A18: P3 halts_on s3 by EXTPRO_1:29;
A19: CurInstr(P3,s3) = i by A1,Th3;
now
let l be Nat;
assume
l < 1+1;
then
A20: l <= 1 by NAT_1:13;
A21: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
A22: P3/.IC Comput(P3,s3,l)
= P3.IC Comput(P3,s3,l) by PBOOLE:143;
per cases by A20,NAT_1:25;
suppose
l=0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A21;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A19;
end;
suppose
l=1;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A9,A11,A22;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds 2 <= l;
then LifeSpan(P3,s3) = 2 by A17,A18,EXTPRO_1:def 15;
then
A23: s5 = Result(P3,s3) by A18,EXTPRO_1:23;
A24: now
A25: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
let x be object;
assume
A26: x in dom IExec(IF,P,Initialize s);
per cases by A26,SCMPDS_4:6;
suppose
A27: x is Int_position;
then x <> IC SCMPDS by SCMPDS_2:43;
then
t x in dom SAl by A25,ARSKI:def 1;
A29: not x in dom Start-At(0,SCMPDS) by2*ec(x)(ecx+)) secx/=sqrt((2*x))(secx+))
thus IExec(IF,Pjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
. x byA13,27SCMPDS_2:54
=s3x byA8,A27,SCMPDS_2:56
.= s.x by A29
.= (s +* SAl).x by A28,FUNCT_4:11;
end;
suppose
A30: x = IC SCMPDS;
hence IExec( assume that
( +* Start-t((card +)SCMPDS)).x A30FUNCT_4113
end
end;
dom IExecIF,,Initialize)=thecarrier ofSCMPDS by PARTFUN1:ef 2
.=(s + SAl)by PARTFUN1:def2
hence thesis by A24,FUNCT_1:2;
end;
registration
let I
Integer;
cluster if<=0(a,k1,I) func coth(x) ->Real equals
correctness
proof
set i java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
set .=1*2/exp_Rx-xp_R(x))/2 XCMPLX_1:91
thus IF .x)+java.lang.StringIndexOutOfBoundsException: Range [57, 23) out of bounds for length 57
.=(x)21/2*coshx/sinh(x) bySIN_COS2:ef 2;
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s by MEMSTR_0:44;
assume pIF c= P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3: I is_closed_on
per cases/=(cosh.2/sinh.x2) +cosh.1/sinh()bySIN_COS2:ef 2
suppose
s.DataLoc(s.a,k1) <= 0;
then IF is_halting_on s,P java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 34
hence P halts_on java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 22
end;((oshx/x)^+)/2coshx*sinhx/inhxsinh.x)byXCMPLX_178
suppose
s(.a,1)> 0;
then IF is_halting_on s,P by Th80;
hence P .=((coth(x))^2+1/2*cosh(x/sinh(x))) by SIN_COS2:def 2;
end;
endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
registration
let I be halt-free Program of SCMPDS, a be java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 5
cluster if<=0(a,k1,I) -> halt-ree;
coherence;
end;
heorem
0- SCMPDS
I being halt-free shiftable parahalting
Program of SCMPDS,a being Int_position,k1 being Integer
holds IC IExec(if<=0(a,k1,I),P,s) = card I + 2
proof
let s be 0-started State of SCMPDS,
I be halt-free shiftable parahalting Program of
SCMPDS,a be Int_position,k1 be Integer;
set IF=if<=0(a,k1,I);
A1: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
A2: Initialize s = s by MEMSTR_0:44;
per cases;
suppose
s.DataLoc(s.a,k1) <= 0;
then IExec(IF,P,s) =IExec(I,P,s) +* Start-At((card I+2),SCMPDS)
by A1,Th81,2;
hence thesis by FUNCT_4:113;
end;
suppose
s.DataLoc(s.a,.=(2*sinh.(x/2)*cosh(x/)/cosh.2*(x/))-)by SIN_COS2:3
then IExec(IF,P,s) =s +* Start-At((card I+2),SCMPDS) by Th82,A2;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,a,b being Int_position,k1 being Integer st s.DataLoc(s.a,k1)
<= 0 holds IExec(if<=0(a,k1,I),P,Initialize s).b = IExec(I,P,Initialize s).b
proof
let s be State of SCMPDS,I be halt-free shiftable parahalting Program of
SCMPDS,a,b be .=(2*sinh.(x/2)*cosh(x/2)/2(cosh.(x/2))^2-1))
assume
A1: s.DataLoc(s.a,k1) <= 0;
A2notb in dom Start-t((ard +2,SCMPDS)by SCMPDS_4:8;
I s,P&I is_halting_on ,P byTh11,h12;
IExecif<(,I),Initializes (IInitializes)
+* Start-At((card I+2)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
by A1,Th81;
hence thesis by A2,UNCT_4:11;
for s being goto (card I +1)by Lm10;
..x2/inh(/ A1XCMPLX_1:91
holds IExec(if<=0(a,k1,I),P,Initialize s).b = s.b
proof
let s be State of SCMPDS,I be Program of SCMPDS,a,b be Int_position, k1 be
Integer;
assume
s.DataLoc(s.a,k1) > 0;
then
A1: IExecif<0ak1,)P,Initializes)=s +Start-t(cardI+),
by Th82java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
not b in dom Start-At((card I+2),SCMPDS) by SCMPDS_4:18;
hence thesis by A1,FUNCT_4:11 P2 = P +* pI, P3 = P +* pIF,
end;
begin :: The computation of "if var<0 then block1 else block2"
theorem
card if<0(a,k1,I,J) = card I + card J + 2 by Lm4;
theorem
<0(,k1,,J)&1in dom if<0(a,k1,I,java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
proof
set ci=card if<0(a,k1,I,J);
ci=card I + card J +2 by Lm4;
then 2 <= ci by NAT_1:12;
then 1 < ci by XXREAL_0:2;
hence thesis by AFINSQ_1:66;
end;
theorem
if<0(a,k1,I,J). 0 = (a,k1)>=0_goto (card I + 2) by Lm5;
theorem Th89:
for s being 0-started State of SCMPDS, I,J being shiftable Program of
SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)<0 & I
is_closed_on s,P & I is_halting_on . Exec(i,s3) by A2,Th3;
&if<0(a
,k1,I,J) is_halting_on s,P
proof
let s be 0-started State of SCMPDS, I,J be shiftable domStart-t(,SCMPDS SCMPDS_4:;
,1be Integer;
set b=DataLoc(s.a,k1);
set G=Goto (card J+1);
set I2 = I ';' G ';' J, IF=if<0(a,k1,I,J), pIF=stop IF,
pI2=stop I2, P2 = P +* pI2, P3 = P +* pIF,
s4 Comput(P3,s1,P4=P3java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
set i = (a,k1)>=0_goto (card I + 2);
COMPOS_136;
A2: Initialize s = s by MEMSTR_0:44;
then
A3: IC s = 0 by MEMSTR_0:47;
A4: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
.= i ';' I2 by SCMPDS_4:14;
then
A5: Shift(pI2,1) c= P4 by Lm6;
A6: Comput(P3, s,0 + 1) = FollowingA10 I s2,P2
.= Following(P3,s assume
.= Exec(i,s) by A4,Th3,A2;
for a holds s.a = s4.a by A6,SCMPDS_2:57 then
then
A7: DataPart s = DataPart s4 by SCMPDS_4:8;
assume
s.b < 0;
then
A8: IC s4 = IC s + 1 by A6,SCMPDS_2:57
.= (0+1) by A3;
assume
A9: I is_closed_on s,P;
assume
A10:Iis_halting_on ,P;
then
A11: I2 is_closed_on s,P by A9,Th21;
then
A12: Start-At(0,SCMPDS) c= s & I2 is_closed_on s,P2 by A2,FUNCT_4:25;
A13: stop I2 c= P2 by FUNCT_4:25;
I2 is_halting_on s,P by A9,A10,Th21;
then
A14: P2 halts_on s by A2;
A15exp_Rx<1 by A2,SIN_COS:53;
. I2 1+ byA4,Th1;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A16: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P2, s,k1) as Nat;
A17: card pIF = card pI2+1 by A15,COMPOS_1:55;
m in dom pI2 by A11,A2;
then m < card pI2 by AFINSQ_1:66;
then
A18: m+1 < card pIF by A17,XREAL_1:6;
IC Comput(P3,s,k) = IC Comput(P3, s4,k1) by A16,EXTPRO_1:4
.= (m + 1) by A12,A5,A8,A7,Th22,A13;
hence IC Comput(P3,s,k) in dom pIF by A18,AFINSQ_1:66;
end;
suppose
k = 0;
hence IC Comput(P3,s,k) in dom pIF by A1,A3,EXTPRO_1:2;
end;
end;
hence IF is_closed_on end;
A19
=P,(P3,s,),ifeSpanP2,
by EXTPRO_1:4;
CurInstr(P3,
Comput(P3,s,ifeSpan(P2,s)+1)
CurInstrComput,s4LifeSpanP,s) byA19
.(P2,omputsLifeSpanP2s) A12A5,8
. halt SCMPDS by A14,EXTPRO_1:def 15;
,2)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
hence thesis by A2;
end;
theorem Th90:
for s being State of SCMPDS,I being Program of SCMPDS,J being
shiftable Program of SCMPDS,a being Int_position,k1 being java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 59
s.a,k1tthesis;
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
proof
let s be State of SCMPDS,I be Program of
SCMPDS .sinh.2(/)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
setb=s,k1;
Initializes,P1=P+*pJ,
I,) pIF
stop IF, s3 = Initialize sjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s4 = Comput(P3,s3,1), P4 = P3;
)=_(cardI +2;
set G =Goto (card J+1), iG=i ';' I ';' G;
A1: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
.= i ';' (I ';' G ';' J) by SCMPDS_4:14;
A2: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
A5: IC s3 = 0 by MEMSTR_0:47;
assume
s.b >= 0;
then
A6: IC s4 = ICplusConst(s3,card I + 2) by A2,A4,SCMPDS_2:57
.= (0+(card I + 2)) by A5,Th4;
assume
A7: J is_closed_on s,P;
then
A8: Start-At(0,SCMPDS) c= s1 & J is_closed_on s1,P1 by FUNCT_4:25;
A9: stop J c= P1 by FUNCT_4:25;
A10: pIF c= P3 by FUNCT_4:25;
A11: card iG = card (i ';' I) + card G by AFINSQ_1:17
.=card (i ';' I) + 1 by COMPOS_1:54
.=card I +1 +1 by Th1
.=card I +(1 +1);
then Shift(pJ,card I+2) c= pIF by Th5;
then Shift(pJ,card I+2) c= P3 byA4:s3.DataLoc(s3.,k1=3. byFUNCT_4:11
then
A12: Shift(pJ,card I+2) c= P4;
assume
J is_halting_on s,P;
then
A13: P1 halts_on =Following(P3,3 2
for a holds s1.a = s4.a by A2,SCMPDS_2:57;
then
A14: DataPart s1 = DataPart s4 by SCMPDS_4:8;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat such that
A15: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P1, s1,k1) as Nat;
m in dom pJ by A7;
then m < card pJ by AFINSQ_1:66;
then
A16: m + (card I + 2) < card pJ + (card I + 2) by XREAL_1:6;
A17: card pJ = card J + 1 by COMPOS_1:55;
A18: card pIF = card IF+1 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 26
.=card I +2 +card J +1 by A11,AFINSQ_1:17
.=card I +2 + card pJ by A17;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A15,EXTPRO_1:4
.= (m + (card I + 2)) by A8,A14,A12,A6,Th22,A9;
hence IC Comput(P3,s3,k) in dom pIF by A18,A16,AFINSQ_1:66;
end;= P3IC PBOOLE143
suppose
0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A5,COMPOS_1:36;
end;
end;
hence IF is_closed_on s,P;
A19: Comput(P3,s3,LifeSpan(P1,s1)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P1,s1)) by EXTPRO_1:4;
CurInstr(P3,
Comput
=CurInstr let be ;
.CurInstr(P1,Comput(P1,,LifeSpan(P1,s1))by A8,14A12,6Th22,9
.= halt SCMPDS by A13,EXTPRO_1:def 15;
then P3 halts_on s3 by EXTPRO_1:29;
hence thesis;
end;
theorem Th91:
for s being 0-started State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, J being shiftable Program of SCMPDS,a being Int_position,k1
being Integer st s.DataLoc(s.a,k1) < 0 & I is_closed_on s,P
& I is_halting_on s,P
holds IExec(if<0(a,k1,I,J),P,s) = IExec(I,P,s)
+* Start-At((card I + card J+ 2),SCMPDS)
proof
let s be 0-started State
I be halt-free shiftable Program of SCMPDS, J be
shiftable Program of SCMPDS,a be Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set G=Goto (card J+1);
set I2 = I ';' G ';' J, IF=if<0(a,k1,I,J), pIF = stop IF,
pI2stop +,=P+ pIF
s4 = Comput(P3,s,1), P4 = P3;
set i = (a,k1)>=0_goto (card I + 2);
set SAl= Start-At((card I+card J+2),SCMPDS);
A1: Initialize s = s hence IF is_closed_on,P
then
A2: IC s = 0 by MEMSTR_0:47;
A3: IF = i ';' (I ';' G) ';' J by SCMPDS_4:14
.= i ';' I2 by SCMPDS_4:14;
then
A4: Shift(pI2,1) c= P4 by Lm6;
A5: Comput(P3, s,0 + 1) = Followingfor beingState SCMPDS,I halt- shiftable
.= Following(P3,s) by EXTPRO_1:2
.= Exec(i,s) by A3,Th3,A1;
s.b < 0;
then
A6: IC s4 = IC s + 1 by A5,SCMPDS_2:57
.= (0+1) by A2;
for a holds =2sinh.(x/)cosh.(/2)/(*cosh.(x/2)2-)
.(2*inh.x/*(/2)/2*inh.x/)sinh.x/)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
A7: DataPart s = DataPart s4 bySCMPDS_4:;
assumecosh(/)<>;
:I is_closed_on s,;
assume
A9: I is_halting_on s,P;
then I2 is_halting_on s, =(2*cosh(/)cosh(/2)(2*.2*java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 74
A10: P2 halts_on s by A1;
I2 is_closed_on s,P by A8,A9,Th21;
then
A11: Start-At(0,SCMPDS) c= s & I2 is_closed_on s,P2 by A1,FUNCT_4:25;
A12: stop I2 c= P2 by FUNCT_4:25;
A13: Comput(P3,s,LifeSpan(P2,s)+1)
= Comput(P3,Comput(P3,s,1),LifeSpan(P2
,s))
by EXTPRO_1:4;
A14: CurInstr(P3,Comput(P3,s,LifeSpan(P2,s)+1))
=CurInstr(P3,Comput(P3,s4,LifeSpan(P2,s))) by A13
.=CurInstr(P2,Comput(P2,s,LifeSpan(P2,s))) by A11,A4,A6,A7,Th22,A12
.= halt SCMPDS by A10,EXTPRO_1:def 15;
then
A15: P3 halts_on s by EXTPRO_1:29;
A16: CurInstr(P3,s) = i by A3,Th3,A1;
now
let l be Nat;
assume
A17: l < LifeSpan(P2,s) + 1;
A18: Comput(P3,s,0) = s by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s,l))
= CurInstr(P3,s)
by A18;
hence CurInstr(P3,Comput(P3,s,l))
<> halt SCMPDS by A16;
end;
suppose
lq { TARSKI:ef 1;
then
=n+1 byNAT_1:;
A20: n < java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 6
s,)=haltSCMPDS;
n)
XTPRO_1:4;
AA = LSeg(e,f) /\ Upper_Arc C, BB = LSeg(e,f) /\ Lower_Arc C;
CurInstr(P3,Comput(P3s4,)byA4,A6,A7,h22,A12
.= halt SCMPDS A10:for i being of NAT holds .i Fi FUNCT_2:sch 4;
hence reconsider A = proj2.:AAA=proj2: java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 42
end;
for NatstP,
P3sl) java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 31
LifeSpanP2,s)+1<=l
;
A24: DataPart hencecontradiction SPRECT_131;
P2s)by A10,XTPRO_123
.= A32: for i being for beingElementofNAT holds Fi =i FUNCT_2sch4
by A4,,A7Th22A12
.= DataPart Comput(P3, s,LifeSpan(P2,s) + 1)
byEXTPRO_14
. P,)byA15A23EXTPRO_123;
A25: now
let x be object;
A26: dom SAl then proj2 DDby A36;
assume
indomIExec(FPs;
per cases by A27,java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 8
suppose
A28: x is Int_position;
x >ICSCMPDS bySCMPDS_243
then
A29: not A51 Ei = |s,.|byA11A49;
thus IExec(IF,P,s).x = (Result(P3,s)).x
.= (Result(P2,s)).x by A24,A28,SCMPDS_4:8
.= IExec(I2,P,s).x
.= (IExec(I2,P,s) +* SAl).x by A29,FUNCT_4:11;
end;
suppose
A30: x = IC SCMPDS;
A31: IC Result(P2,s) = IC IExec(I2,P,s)
.= (card I + aholds s2.a s4.a by A3S:56;
A32: x in dom SAl by A26,A30,TARSKI:def 1;
thus IExec(IF,P,s).x = (Result(P3,s)).x
.= Comput(P3, s,LifeSpan(P2,s) + 1).x by A15,A23,EXTPRO_1:23
.= IC Comput(P3,s4,ifeSpan(2s) by A30,EXTPRO_1:4
.= IC Comput(P2, s,LifeSpan(P2,s)) + 1 by A11,A4,A6,A7,Th22,A12
.= IC Result(P2,s) + 1 by A10,EXTPRO_1:23
.= IC Start-At ((card I + card J + 1) + 1,SCMPDS)
by A31,then
.= (IExec(I2,P,s) +* SAl).x by A30,A32,java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 8
end;
end;
dom IExec(IF,P,s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom by EXTPRO_1:;
hence IExec(IF,P,s) = IExec(I2,P,s) +* SAl
by A25,FUNCT_1:2
.= IExec(I,P,s) +* Start-At((card I + card J + 1),SCMPDS) +*
Start-At(
(card I + card J + 2),SCMPDS Comput(P2,s2,LifeSpan(P2,s2))) by A11,A7,A9,A8,Th22,1
.= IExec(I,P,s) +* SAl by MEMSTR_0:36;
end;
I SCMPDSJbeing
halt-free shiftable now
st s.DataLoc(s.a,k1) >= 0 & J is_closed_on s,P & J is_halting_on s,P
holds IExec(if<0(a,k1,I,J),P,Initialize s)
JP s *Start-t((I+J+,SCMPDS
proof
let s be State of SCMPDS,I be Program of SCMPDS,J be halt-free shiftable
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
set b=DataLoc(s.a,k1);
set pJ=stop J, s1 = Initialize s, P1 = P +* pJ,
IF=if<0(a,k1,I,J), pIF=
stop IF, s3 = Initialize s, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a end
set G =Goto (card J+1), iG=i ';' I ';' G;
set SAl=Start-At((card I+card J+2),java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 38
1 i ;' ( ; ) ; JbySCMPDS_414
.= i ';' (I ';' G ';' J) by SCMPDS_4:14;
A2: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
;
A5: IC s3 = 0 by MEMSTR_0:47;
assume
s.b >= 0;
then
A6: IC s4 = ICplusConst(s3,card I + 2) by A2,A4,SCMPDS_2:57
.= (0+(card I + 2)) by A5,Th4;
for a holds s1.a = s4.a by A2,SCMPDS_2:57;
then
A7: DataPart s1 = DataPart s4 by .= DataPart Comput(P3, s3,LifeSpan(P2) +)
card iG = card (i ';' I) + card G by AFINSQ_1:17
.=card (i ';' I) + 1 by COMPOS_1:54
.=card I +1 + let x be object
.I+1 +)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
then
A8: Shift(pJ,card I+2) c= pIF by Th5 x <>ICby SCMPDS_243;
cP3 by :25java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
then Shift(pJ,card I+2) c .(esult(,s2).xbyA25,,:
then
A9: Shift(pJ,card I+2) c= P4;
assume
A10: uppose
then
A11: Start-At(0,SCMPDS) c= s1 & J is_closed_on s1,P1 by FUNCT_4:25;
A12: stop J c= P1 by FUNCT_4:25;
assume
A13: J is_halting_on s,P;
then
A14: P1 halts_on s1;
A15: Comput(P3,s3,LifeSpan(P1,s1)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P1
,s1))
by EXTPRO_1:4;
A16: CurInstr(P3,Comput(P3 byA11,7A9,A8Th22,A1
=CurInstr(P3,Comput(P3,s4,LifeSpan(P1,s1))) by A15
.=CurInstr(P1,Comput(P1,s1,LifeSpan(P1,s1))) by A11,A9,A6,A7,Th22,java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 68
.= halt SCMPDS by A14,EXTPRO_1:def 15;
then
A17: P3 halts_on s3 by EXTPRO_1:29;
A18: CurInstr(P3,s3) = i byend;
now
let ltheorem Th82
assume
A19: l < LifeSpan(P1,s1) + 1;
A20: holds IExec(f=0(,k1,I),P,Initialize s)
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A20;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A18;
end;
suppose
l <> 0;
then consider n be Nat such that
A21: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A22: n < LifeSpan(P1,s1) by A19,A21,XREAL_1:6;
assume
A23: CurInstr(P3,Comput(P3,s3,l)) = halt SCMPDS;
:,,+java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P1,Comput(P1,s1,n))
= CurInstr(P3,
P3s,n) A11A9,6A,,
CMPDSbyA21,23,A24;
dictionby A14,,:def 15;
end;
=sbby A2,FUNCT_411
Comput(P3A59IC =0 by:;
:P,)=LifeSpan(P1s1 A16,
A26: DataPart -6 pIFc=P4
A7:pIF c=P5by11;
.= DataPart Comput(P3, s4,LifeSpan(P1,s1))
by domproj2meetsDD A64
.= DataPart Comput ddinDD
by4
.= DataPart Result(P3, = Execcarrier ofREAL 2java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
Fi)1= by52
letxbeobject
:domSAl ICSCMPDS java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 42
x indomIExecIF,Initializes;
suppose
A30: x is Int_position;
> SCMPDSby43
xLSegf,Ei)byA88A13: Comput(P3, s3,1 + 1) = Following(,s31 +) (3s)by EXTPRO_1:java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
A31: not x in dom SAl by A28,TARSKI:def 1;
thus IExec( Fs. (card I11)by A9,h4
.= ( .(ard I+1+)
.= IExec(J,P,Initialize s).x
.= (IExec(J,P,Initialize s) +* thendd` (.i` by
end;
suppose
A32 x IC SCMPDS
ICResult(s1)=IC IExecJ,Initialize s)
=(J ,java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 37
A34: .=|s,Es.]|A11A102;
husIExecIF,,s).=(ResultP,)x
.= Comput(P3, s3,LifeSpan(P1,s1) + 1).x by A17,A25,EXTPRO_1:23
.= IC Comput(P3, s4,LifeSpan(P1,s1)) by A32,EXTPRO_1:4
.= IC Comput(P1, s1,LifeSpan(P1,s1)) + (card
I + 2) by A11,A9,A6,A7,Th22,A12
.= IC Result(P1,s1) + (card I + 2) by A14,EXTPRO_1:23
.= IC Start-At (card J + (card I + 2),SCMPDS) by A33,FUNCOP_1:72
.= (IExec(J,P,Initialize s) +* SAl).x by A32,A34,FUNCT_4:13;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(J,P,Initialize s) +* SAl) by PARTFUN1:def 2;
hence thesis by A27,FUNCT_1:2;
end;
registration
let I,J be shiftable parahalting Program of SCMPDS, a be Int_position,k1 be
Integer;
cluster if<0(a,k1,I,J) -> shiftable parahalting;
correctness
proof
set i = (a,k1)>=0_goto (card I + 2), G =Goto (card J+1);
set IF=if<0(a,k1,I,J), pIF = stop IF;
reconsider IJ=I ';' G ';' J as shiftable Program of SCMPDS;
thus IF is shiftable;
let sbe0-tarted State ofSCMPDS;
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s then
assume pIF c= P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3: J is_closed_on s,P & J is_halting_on s,P by assume
A4: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
P3s3,0)=s3 byEXTPRO_12;
s.DataLoc(s.a,k1A22:P3/IC P,,l)
then IF is_halting_on s,P by A4,Th89;
hence P halts_on s by A2,A1;
end;
suppose
s.DataLocthen CurInstr(P3,omput(s3,))
then IF is_halting_on s by A21;
hence P halts_on s by A2,A1;
end;
end;
end;
registration
let I,J be halt-free Program of SCMPDS, a be Int_position,k1 be Integer;
cluster if<0(a,k1,I,J) -> halt-free;
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
endhthen
theorem
for s being 0-started State of SCMPDS,I,J being halt-free shiftable
parahalting Program of SCMPDS,a being Int_position,k1 being Integer holds IC
IExec(if<0(a,k1,I,J),P,s) = card I + card J + 2
proof
let s be 0-started State of SCMPDS,
I,J be halt-free shiftable parahalting Program of
SCMPDS,a be Int_position,k1 be Integer;
set IF=if<0(a,k1,I,J);
A1: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
A2: J is_closed_on s,P & J is_halting_on s,P by Th11,Th12;
A3: Initialize s = s by MEMSTR_0:44;
per cases;
DataLoc(.,k1 0
then IExec(IF,P,s) = =(+*).xby FUNCT_411
by A1,Th91;
IExec(IF,P,Initializes).=(ardI +2)by A14,A23
end;
end
s.DataLoc(s.a,k1) >= 0;
then IExec(IF,P,s) = IExec(J,P,sjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 32
by A2,Th92,A3;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being 0-started State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,J being shiftable Program of IF=f=(k1,I,pIF java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
k1 being Integer st s.DataLoc(s.a,k1)<0
holds IExec(if<0(a,k1,I,J),P,s).b
= IExec(I,P,s).b
proof
let s be 0-started State of SCMPDS,
I be halt-free shiftable parahalting Program of
ofa bejava.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 77
assume
:.s,1)<0;
A2:i NAT by :def12;
I is_closed_onthenproj2p java.lang.StringIndexOutOfBoundsException: Range [21, 1) out of bounds for length 36
then
IExec(if is -by:0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
hence thesis by A2:i= LSegE.,)byA33A85
end;
sbeingofIend;
halt-heoremassume inLSeg(,1Center Ci+)) (,+1
Integersts.s,k1 > java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
holds if0a,I,),, )bProgramof a
let s be State of java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 8
thenLSeg(.i,F.i)meetsAA java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
;
assume
A1: s.DataLoc(s.a,k1) >= 0;
A2: not b in dom Start-At((card I+card J+2),SCMPDS) by SCMPDS_4:18;
J is_closed_on s,P & J is_halting_on s,P by Th11,Th12;
then IExec(IF,P,Initialize s) =IExec(J,P,Initialize s)
+* Start-At((card I+card J+2),SCMPDS)
by A1,Th92A1 I is_closed_ons, , by ,Th12;
hence thesis by A2,FUNCT_4:11;
end;
begin :: The computation of "if var<0 then block"
theorem
card if<0(a,k1,I) = card I + 1 by Th1;
theorem
0 in dom if<0(a,k1,I)
proof
set ci=card s.(.,)> 0;
card + ;
yAFINSQ_166
end;
theorem
if<0(a,k1,I). 0 = (a,k1)>=0_goto (card I + 1) by Th2;
theorem Th99:
for s being State of SCMPDS, I being shiftable Program of
SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1) < 0 & I
is_closed_on s,P & I is_halting_on s,P holds if<0(a,k1,I) is_closed_on s,P
& if<0(a,
k1,I) is_halting_on s,P
proof
let s be State of SCMPDS, I be shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if<0(a,k1,I), pIF=stop IF, pI=stop I,
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)>=0_goto (card I + 1);
A1: stop I c= P2 by FUNCT_4:25;
A2: 0 in dom pIF by COMPOS_1:36;
A3: IC s3 = 0 by MEMSTR_0:47;
A4: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
for being State of ,I being halt-shiftable
5 s3DataLoc(3.a,)s3. byFUNCT_411
=s ,11;
A6: java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
.= Following(P3,s3) by EXTPRO_1:2
.Exec(,s3) byTh3;
s2. a by A6,SCMPDS_2:57;
: s2= DataParts4 bySCMPDS_4:8;
assume
s.b < 0;
A8: IC s4 = IC s3 + 1 by A6,A5,SCMPDS_2:57
.= (0+1) by A3;
assume
A9: I is_closed_on s,P;theorem
A10: I is_closed_on s2,P2;
assume
I is_halting_on s,P;
then
P2halts_on s2;
A12: Start-At(0,SCMPDS) c= s2 & Shift(pI,1) c= P4 letsbe of ,I Program ofSCMPDS,a,bbe Int_position, k1be
A13: card pIF = card IF +1 by COMPOS_1:55
.= card I +1+1 by Th1;
now
let k be Nat;
per cases;
suppose
0 < k;
then consider k1 being Nat java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 4
A14: k1 + 1 = k by NAT_1:6;
reconsiderk1 as Nat;
reconsider m = IC Comput(P2, s2,k1) as Nat;
pIF pI+ by A13,COMPOS_1:55
then m <card pI by AFINSQ_1:;
then
A16: m+1 < card pIF by A15,XREAL_1:6;
=IC Comput(,,4k1)by ,4
.( )byA10,A12,A7,Th22A1;
hence IC Comput(P3,s3,k) in dom pIF by A16,AFINSQ_1:66;
end;
suppose
k = 0;
hence IC Comput(P3,s3,k) in dom pIF by A2,A3,EXTPRO_1:2;
end;
end;
IF is_closed_onsPjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
A17: Comput(P3,s3,LifeSpan(P2,s2)+1MPDS,I, being
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:;
CurInstr(P3,
,k1,,J)is_halting_ons,P
=CurInstr(P3,
ComputP3,P2,) A17
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A10,A12,A8,A7,Th22,A1
.= halt SCMPDS by A11,EXTPRO_1: set I2 = I ';' G ';' J, IF=if<0(a,k1)=IF
then P3 halts_on s3 by EXTPRO_1:29;
hence thesis;
end;
theorem Th100:
for A1 0 in dom pIFby COMPOS_1:36java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
Int_position, k1 being Integer st s.DataLoc(s.a,k1) >= 0 holds if<0(a,k1,I)
A141 E. inUpper_ArcL~C1)A34
proof
sbeStateofSCMPDS,I be Programof SCMPDS,a be ,k1
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 10
set b=DataLoc(.a,k1)
assume
:s.>0;
set i = (a,then dom proj2byA146;
setIF=0(,k1I, pIFstopIF s,
=P+* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
A2: IC s3 = 0 by MEMSTR_0:47;
A3:LSeg(feL~Ck0+1) byA2A140,44
A155 .k0=[,.]|A32A144
then
4 DataLocs3.,k1=bby11
FUNCT_4;
(,s30+1) FollowingP3,(,0)) by:java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
.= r in proj2LSegEk0F.byA33A133,java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
.= Exec(i,s3) by A166: F.k0 in Lower_Arc L~Cage(C,k0+1) by A46;
then
A5: IC s4 = ICplusConst(s3,card I + 1) by A1,A4,SCMPDS_2)iff x=F.0
.= (0+(card I + proof
A6: card IF=card I+1 by . H(0 byA31,A144;
then
c + domby 64;
A8: P3/.IC s4
= P3.IC s4 A174:p` E0 byPSCOMP_1def 6;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 17
then P4(I+)=pIF.c I+ A7,2
.halt SCMPDS A6,:4;
then x in dom proj2and
reconsider x as Point of TOP-REAL 2 by A179;
now
let k be Nat;
per cases;
suppose
0 < k;
then 1+0 <= k by INT_1:7;
hence IC Comput(P3,s3,k) in dom pIF by A7,A5,A9,EXTPRO_1:5;
end;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A2,COMPOS_1:36;
end;
end;
hence IF is_closed_on s,P;
P3 halts_on s3 by A9,EXTPRO_1:29;
hence thesis;
end;
theorem Th101:
for s being State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, a being Int_position:stop c= FUNCT_425;
0 & I is_closed_on s,P & I is_halting_on s,P
holds IExec(if<0(a,k1,I),P,Initialize s) = IExec(IA15 pIF= card+ :java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
+* Start-At((card I+1),SCMPDS)
proof
let s be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if<0(a,k1,I), pIF = stop IF, pI=stop I,
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 = Comput(P3, s3,1), P4 = P3;
set i = (a,k1)>=0_goto (card I + 1);
set SAl=Start-At((card I+1),SCMPDS);
A1: stop I c= P2 by FUNCT_4:25;
A2: IC s3 = 0 by MEMSTR_0:47;
A3: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
A5: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
java.lang.StringIndexOutOfBoundsException: Range [42, 4) out of bounds for length 42
s.b < 0;
then
A6: IC s4 = IC s3 + 1 by A5,A4,SCMPDS_2:57
.= (0+1) by A2;
for a holds s2.a = s4.a by A5,SCMPDS_2:57;
then
A7: DataPart s2 = DataPart s4 by SCMPDS_4:8;
assume
A8: I is_closed_on s,P;
then
A9: I is_closed_on s2,P2;
A10: Start-At(0,SCMPDS) c= s2 & Shift(pI,1) c= P4 by Lm6,FUNCT_4:25;
assume
A11: I is_halting_on s,P;
then
A12: P2 halts_on s2;
A13: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2,
s2))
by EXTPRO_1:4;
A14: CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A13
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A9,A10,A6,A7,Th22,A1
.= halt SCMPDS by A12,EXTPRO_1:def 15;
then
A15: P3 halts_on s3 by EXTPRO_1:29;
A16: CurInstr(P3,s3) = i by Th3;
now
let l be Nat;
assume
A17: l < LifeSpan(P2,s2) + 1;
A18: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A18;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A16;
end;
suppose
l <> 0;
then consider n be Nat such that
A19: l = n + 1 by NAT_1:6;
reconsider n as Nat;
A20dom A136
assume
A21: LSegfE.)c LSegef A1676;
A22: Comput(P3,s3,n+1)
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P2,Comput(P2,s2,n)) =
CurInstr(P3,Comput(P3,s4,n)) by A9,A10,A6,A7,Th22,A1
.= halt SCMPDS by A19,A21,A22;
hence contradiction by A12,A20,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P2,s2) + 1 <= l;
then
A23: LifeSpan(P3,s3) = LifeSpan(P2,s2) + 1 by A14,A15,EXTPRO_1:def 15;
A24: DataPart Result(P2,s2) = DataPart Comput(P2,s2,
LifeSpan(P2,s2)) by A12,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P2,s2)) by A9,A10,A6,A7,Th22,A1
.= DataPart Comput(P3, s3,LifeSpan(P2,s2) + 1)
byEXTPRO_1:4
.= DataPart Result(P3,s3) by A15,A23,EXTPRO_1:23;
A25: now
let x be object;
A26: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
assume
A27: x in dom IExec(IF,P,Initialize s);
per cases by A27,SCMPDS_4:6;
java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
A28:pRightCompCageC,k1 java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
then x <> IC SCMPDS A199: p in LSeg(e,f) by A5,AJ:11java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
then
A29: not x in dom SAl by A26,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= (Result(P2,s2)).x by A24,A28,SCMPDS_4:8
.= IExec(I,P,Initialize s).x
.= (IExec(I,P,Initialize s) +* SAl).x by A29,FUNCT_4:11;
end;
suppose
A30: x = IC SCMPDS;
A31: IC Result(P2,s2) = IC IExec(I,P,Initialize s)
.= card I by A8,A11,Th25;
A32: x in dom SAl by A26,A30,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= Comput(P3, s3,LifeSpan(P2,s2) + 1).x by A15,A23,EXTPRO_1:23
.= IC Comput(P3, s4,LifeSpan(P2,s2)) by A30,EXTPRO_1:4
.=ICComput(P2, s2,LifeSpan(2s2) + 1
by A9,A10,A6,A7,Th22,A1
.= IC Result(P2,s2) + 1 by A12,EXTPRO_1:23
.= IC SAl by A31,FUNCOP_1:72
.= (IExec(I,P,Initialize s) +* SAl).=Comput(3,omputP3,s,1,(2s)
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(I,P,Initialize s) +* SAl) by PARTFUN1:def 2;
hence thesis by A25,FUNCT_1:2;
end;
theorem Th102:
for s being State of SCMPDS,I being Program of SCMPDS,a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) >= 0
holds IExec(if<0(a,k1,I),P,Initialize s) = s +* java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 47
proof
m SCMPDSabe k1 be
set b=DataLocA211:1 =XCn JORDAN1H492java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
set IF=if<0(a,k1;
P3 = P +* ApproxIndex - ofNATmeans
s4 = Comput
set i = (a,k1)>=0_goto (card I + 1);
setSAlStart-t(ardI+),SCMPDS;
A1: IC s3 = 0 by java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 20
tart(,SCMPDS) by SCMPDS_418;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A3: s3.DataLoc(s3.a,k1)=s3end;
.= s.b by A2,FUNCT_4:11;
A4: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by Th3;
assume
s.b >= 0;
then
A5: IC s4 = let s be State of s be State ofSCMPDS, beProgramof SCMPDS,J shiftable Program of
.= (0+(card I + 1)) by A1,Th4;
pIF c= P3 by FUNCT_4:25;
then
A6: pIF c= P4;
A7 P3/IC s4
=P3.IC s4 PBOOLE:143;
A8: card IFc + by ;
setG Goto cJ),iG= ; I''G;
P4.I+) =pIF.card I+)byA6,RFUNC_1:
.=halt SCMPDS by A8 . i ; I';' G ; SCMPDS_4:14;
then
A9: CurInstr(P3,s4) = halt SCMPDS by A5,A7;
then
A10: P3 halts_on s3 by EXTPRO_1:29;
A11: CurInstr(P3,s3) = i by Th3;
now
let l be Nat;
A12: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
assume
l < 1;
then l <1+0;
then l=0 by NAT_1:13;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3) by A12;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A11;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds 1 <= l;
then LifeSpan(P3,s3) = 1 by A9,A10,EXTPRO_1:def 15;
then
A13: s4 = Result(P3,s3) by A10,EXTPRO_1:23;
A14: now
A15: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
let x be object;
assume
A16: x in dom IExec(IF,P,Initialize s);
per cases by A16,SCMPDS_4:6;
suppose
A17: x is Int_position;
then x <> IC SCMPDS by SCMPDS_2:43;
then
A18: not x in dom SAl by A15,TARSKI:def 1;
A19: not x in dom Start-At(0,SCMPDS) by A17,SCMPDS_4:18;
thus IExec(IF,P,Initialize s).x = s4.x by A13
.= s3.x by A4,A17,SCMPDS_2:57
.= s.x by A4: s3.DataLoc(s3.a,k1s3.bby FUNCT_4:11
.( +SAl). by A18,FUNCT_4:11;
end;
suppose
A20: x = IC SCMPDS;
henceIExec(F,P, s)x card I+1) A5A13
. . (0( ) by A5,Th4
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (s +* SAl) by PARTFUN1:def 2;
hence thesis by A14,FUNCT_1:2;
end;
registration
let I be shiftable parahalting Program of SCMPDS, a be Int_position,k1 be
Integer;
cluster if<0(a,k1,I) -> shiftable parahalting;
correctness
proof
set i = (a,k1)>=0_goto (card I +1);
set IF=if<0(a,k1,I), pIF = stop IF;
IF shiftable;
let s be 0-started State of SCMPDS;
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s by MEMSTR_0:44;
assume pIF c= P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
suppose
s.DataLoc(s.a,k1) < 0;
then IF is_halting_on s,P by A3,Th99;
hence P halts_on s
end;
suppose
DataLocs, = 0;
then IF is_halting_on s,P by Th100;
hence P halts_on s by A2,A1;
end
end;
end;
registration
let I be halt-free Program of SCMPDS, a be Int_position,k1 be Integer;
clusterIbe free ,
coherence;
end;
theorem
s ,halt-free shiftable parahalting
Program of SCMPDS,a being Int_positionP pI2=stop , P+ pI2 P+ ,
holds IC IExec(if<0(a,k1,I),P,Initialize s) = card I + 1
proof
let s be State of =At(IcardJ2,;
SCMPDS,a be Int_position,k1 be Integer;
set IF=if<0(A2 IC s=0by:47;
,;
per cases;
suppose
s.DataLoc(s.a,k1) < 0;
then IExec(IF,P,Initialize s) =IExec(I,P,Initialize s)
+* Start-At((card I+1),SCMPDS)
by A1,Th101;
hence thesis by FUNCT_4:113;
end;
suppose
s.DataLoc(s.a,k1) >= 0;
then IExec(IF,P,Initialize s) =s +* Start-At((card I+1),SCMPDS) by Th102;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,a,b being Int_position,k1 being Integer st s.DataLoc(s.a,k1)
< 0 holds IExec(if<0(a,k1,I),P,Initialize s).b = IExec(I,P,Initialize s).b
proof
let s be State of SCMPDS,I be halt-free shiftable parahalting Program of
SCMPDS,a,b be Int_position,k1 be Integer;
assume
A1: s.DataLoc(s.a,k1) < 0;
A2: not b in dom Start-At((card I+1),SCMPDS) by SCMPDS_4:18;
I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
then IExec(if<0(a,k1,I),P,Initialize s) = IExec(I,P,Initialize s)
+* Start-At((card I+1),SCMPDS)
by A1,Th101;
hence thesis by A2,FUNCT_4:11;
end;
theorem
for s being State of SCMPDS,I being Program of SCMPDS,a,b being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) >= 0
holds IExec(if<0(a,k1,I),P,Initialize s).b = s.b
proof
let s be State of SCMPDS,I be Program of SCMPDS,a,b be Int_position, k1 be
Integer;
assume
s.DataLoc(s.a,k1) >= 0;
then
A1: IExec(if<0(a,k1,I),P,Initialize s) = s +* Start-At((card I+1),SCMPDS)
by Th102;
notA8 I is_closed_on s,P;
hence thesis by A1,FUNCT_4:11;
end;
begin :: The computation of "if var>=0 then block"
theorem
card if>=0(a,k1,I) = card I + 2 by Lm8;
theorem
0 in dom if>=0(a,k1,I) & 1 in dom if>=0(a,k1,I) by Lm9;
theorem
if>=0(a,k1,I). 0 = (a,k1)>=0_goto 2 & if>=0(a,k1,I). 1 =
goto (card I + 1) by Lm10;
theorem
for s being State of SCMPDS, I being shiftable Program of
SCMPDS, a being java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 21
is_closed_on s,P & I is_halting_on s,P holds if>=0(a,k1,I) is_closed_on s,P
& if>=0(a
,k1,I) is_halting_on s,P
proof
let s be State of SCMPDS, I be shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if>=0(a,k1,I), pIF=stop IF, pI=stop I,
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 = Comput(P3,s3,1), P4 = P3;
set i = (a,k1)>=0_goto 2, j = goto (card I + 1);
A1: stop I c= P2 by FUNCT_4:25;
A2: IF = i ';' (j ';' I) by SCMPDS_4:16;
A3: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A2,Th3;
for a holds s2.a = s4.a by A3,SCMPDS_2:57;
then
A4: DataPart s2 = DataPart s4 by SCMPDS_4:8;
A5: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A6=( LifeSpans ) A15A23E:3
.= s.b by A5,FUNCT_4:11;
A7: IC s3 = 0 by MEMSTR_0:47;
assume
s.b >= 0;
then
A8: IC s4 = ICplusConst(s3,2) by A3,A6,SCMPDS_2:57
.= (0+2) by A7,Th4;
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
A9: I is_closed_on s,P;
then
A10: I is_closed_on s2,P2;
assume
I is_halting_on s,P;
then
A11: P2 halts_on s2;
A12: Start-At(0,SCMPDS) c= s2 & Shift(pI,2) c= P4 by Lm7,FUNCT_4:25;
A13: 0 in dom pIF by COMPOS_1:36;
now
let k be Nat;
per cases;
suppose
0 <
then consider k1 being Nat such
A14: k1 + 1 = k by NAT_1:6;
reconsider k1 as Nat;
reconsider m = IC Comput(P2, s2,k1) as Nat;
A15: card pIF = 1+ card IF by COMPOS_1:55
.= SAl=-((
.= 1+card I +2
.=card pI+2 by COMPOS_1:55;
m in dom pI by A9;
then m < card pI by AFINSQ_1 . Exec(,3)A1,
then
A16: m+2 < card pIF by A15,XREAL_1:6;
IC Comput(P3,s3,k) = IC Comput(P3, s4,k1) by A14,EXTPRO_1:4
.= (m + 2Consts3,ard + 2 A2,4SCMPDS_2:57
hence IC Comput(P3,s3,k) in dom pIF by A16,AFINSQ_1:66;
end;
java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
k = 0;
hence
end
;
hence IF is_closed_onset=|(-')(java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 44
A17: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:4;
CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A17
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2))) by A10,A12,A8,A4,Th22,A1
.= halt SCMPDS by A11,EXTPRO_1:def 15;
then P3 halts_on s3 by EXTPRO_1:29;
hence thesis;
end;
theorem java.lang.StringIndexOutOfBoundsException: Range [25, 10) out of bounds for length 25
for s being State of SCMPDS,I being Program of SCMPDS, a being
A16:CurInstr(3Comput(P3,s3,LifeSpan(P1java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
is_closed_on s,P & if>=0(a,k1,I) is_halting_on s,P
proof
let s be State of SCMPDS,I be Program of SCMPDS, a be Int_position,k1 be
Integer
set b=DataLoc(s.a,k1);
assume
A1: sbyA20java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
set i = (a,k1)>=0_goto 2, j = goto (card I + 1);
set IF=if>=0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3,s3,1), s5 = Comput(P3,s3,2), P4 = P3, P5 = P3;
A2: IF =i ';' (j ';' I) by SCMPDS_4:16;
A3:java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A4: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A3,FUNCT_4:11;
A5: IC s3 = 0 by MEMSTR_0:47;
Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A2,Th3;
then
A6: IC s4 = IC s3 + 1 by A1,A4,SCMPDS_2:57
.= (0+1) by A5;
A7: pIF c= P3 by FUNCT_4:25;
then
A8: pIF c= P4;
A9: 1 in dom IF by Lm9;
then 1 in dom pIF by COMPOS_1:62;
then
A10: P4.1 = pIF. 1 by A8,GRFUNC_1:2
.=IF. 1 by A9,COMPOS_1:63
.=j by Lm10;
A11: card IF=card I+2 by Lm8;
then
A12: (card I+2) in dom pIF by COMPOS_1:64;
A13: P3/.IC s4 = P3.IC s4 by PBOOLE:143;
Comput(P3, s3,1 + 1) = Following(P3,s4) by EXTPRO_1:3
.= Exec(j,s4) by A6,A10,A13;
then
A14: IC s5 = ICplusConst(s4,card I+1) by SCMPDS_2:54
.= (card I+1+1) by A6,Th4
.= (card I+(1+1));
A15: (P3)/.IC s5
= P3.IC s5 by PBOOLE:143;
pIF c= P5 by A7;
then P5.(card I+2) = pIF.(card I+2) by A12,GRFUNC_1:2
.=halt SCMPDS by A11,COMPOS_1:64;
then
A16: CurInstr(P3,s5) = halt SCMPDS by A14,A15;
now
let k be Nat;
A17: k = 0 or 0 + 1 <= k by INT_1:7;
per cases by A17,XXREAL_0:1;
suppose
k = 0;
then Comput(P3,s3,k) = s3 by EXTPRO_1:2;
hence IC Comput(P3,s3,k) in dom pIF by A5,COMPOS_1:36;
end;
suppose
k = 1;
hence IC Comput(P3,s3,k) in dom pIF by A9,A6,COMPOS_1:62;
end;
suppose
1 < k;
then 1+1 <= k by INT_1:7;
hence IC Comput(P3,s3,k) in dom pIF
by A12,A14,A16,EXTPRO_1:5;
end;
end;
hence IF is_closed_on s,P;
P3 halts_on s3 by A16,EXTPRO_1:29;
hence thesis;
end;
theorem Th111:
for s being State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, a being Int_position,k1 being Integer st s.DataLoc(s.a,k1)
>= 0 & I is_closed_on s,P & I is_halting_on s,P
holds IExec(if>=0(a,k1,I),P,Initialize s) =
IExec(I,P,Initialize s) +* Start-At((card I+2),SCMPDS)
proof
let s be State of SCMPDS,I be halt-free shiftable Program of SCMPDS, a be
Int_position,k1 be Integer;
set b=DataLoc(s.a,k1);
set IF=if>=0(a,k1,I), pIF = stop IF, pI=stop I,
s2 = Initialize s, s3 = Initialize s,
P2 = P +* pI, P3 = P +* pIF,
s4 = Comput(P3, s3,1), P4 = P3;
set i = (a,k1)>=0_goto 2, j = goto (card I + 1);
setSAl=(card I)SCMPDS);
=i'; (''I)bySCMPDS_416;;
A2: stop I c= P2 by java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
(,0+1 =Following(,ComputP3,,0) EXTPRO_1:java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
. Following(3,3 by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
A4: java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A5: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A4,FUNCT_4:11;
A6: IChalt- parahalting shiftable Program of SCMPDS,a,b being Int_position,k1
A7: Start-At(0,SCMPDS) c= s2 & Shift(pI,2) c= P4 by Lm7,FUNCT_4:25;
for a holds s2.a = s4.a by A3,SCMPDS_2:57;
then
A8: DataPart s2 = DataPart s4 by SCMPDS_4:8;
assume
s.b >= 0;
then
: s4 =ICplusConst(32 byA3,57
.= (0+2) by A6,Th4;
assume
A10: I is_closed_on s,P;
then
A11: I is_closed_on s2,P2;
assume
A12: by A1,;
then
A13: P2 halts_on s2;
A14: Comput(P3,s3,LifeSpan(P2,s2)+1)
= Comput(P3,Comput(P3,s3,1),LifeSpan(P2
,s2))
by EXTPRO_1:4;
A15: CurInstr(P3,
Comput(P3,s3,LifeSpan(P2,s2)+1))
=CurInstr(P3,
Comput(P3,s4,LifeSpan(P2,s2))) by A14
.=CurInstr(P2,
Comput(P2,s2,LifeSpan(P2,s2)))
by A11,A7,A9,A8,Th22,A2
.= halt SCMPDS by A13,EXTPRO_1:def 15;
then
A16: P3 halts_on s3 by EXTPRO_1:29;
A17: CurInstr(P3,s3) = i by A1,Th3;
now
let l be Nat;
assume
&<,
A19: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
per cases;
suppose
l = 0;
then CurInstr(P3,Comput(P3, P2 = P +pI,
= CurInstr(P3,s3)
by A19;
hence CurInstr(P3,Comput(
P3,s3,l))3 = 47
end;
suppose
l <> 0;
then consider n be Nat such that
A20: l = n + 1 by NAT_1:6;
reconsider A5: s3.DataLoc(s3.=. :1
A21: n < LifeSpan(P2,s2) by A18,A20,XREAL_1:6;
assume
A22: CurInstr(P3,Comput(P3,
s3,l)) = halt SCMPDS;
A23: Comput(P3,s3,n+1)
= Comput(P3,Comput(P3,s3,1),n) by EXTPRO_1:4;
CurInstr(P2,Comput(P2,s2,n))
= CurInstr(P3,Comput(P3,s4,n))
by A11,A7,A9,A8,Th22,A2
.= halt SCMPDS by A20,A22,A23;
hence contradiction by A13,A21,EXTPRO_1:def 15;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds LifeSpan(P2,s2) + 1 <= l;
then
A24: LifeSpan(P3,s3) = LifeSpan(P2,s2) + 1 by A15,A16,EXTPRO_1:def 15;
A25: DataPart Result(P2,s2) = DataPart Comput(P2,s2,
LifeSpan(P2,s2)) by A13,EXTPRO_1:23
.= DataPart Comput(P3, s4,LifeSpan(P2,s2)) by A11,A7,A9,A8,Th22,A2
.= DataPart Comput(P3, s3,LifeSpan(P2,s2) + 1)
by EXTPRO_1:4
.= DataPart Result(P3,s3) by A16,A24,EXTPRO_1:23;
A26: now
let x be object;
A27: dom Start-At((card I+2),SCMPDS) = {IC SCMPDS} by FUNCOP_1:13;
assume
A28: x in dom IExec(IF,P,Initialize 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 SAl by A27,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= (Result(P2,s2)).x by A25,A29,SCMPDS_4:8
.= IExec(I,P,Initialize s).x
.= (IExec(I,P,Initialize s) +* SAl).x by A30,FUNCT_4:11;
end;
suppose
A31: x = IC SCMPDS;
A32: IC Result(P2,s2) = IC IExec(I,P,Initialize s)
.= card I by A10,A12,Th25;
A33: x in dom SAl by A27,A31,TARSKI:def 1;
thus IExec(IF,P,Initialize s).x = (Result(P3,s3)).x
.= Comput(P3, s3,LifeSpan(P2,s2) + 1).x by A16,A24,EXTPRO_1:23
.= IC Comput(P3, s4,LifeSpan(P2,s2)) by A31,EXTPRO_1:4
.= IC Comput(P2, s2,LifeSpan(P2,s2)) + 2
by A11,A7,A9,A8,Th22,A2
.= IC Result(P2,s2) + 2 by A13,EXTPRO_1:23
.= IC SAl by A32,FUNCOP_1:72
.= (IExec(I,P,Initialize s) +* SAl).x by A31,A33,FUNCT_4:13;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (IExec(I,P,Initialize s)
+* Start-At((card I+2),SCMPDS)) by PARTFUN1:def 2;
hence thesis by A26,FUNCT_1:2;
end;
theorem Th112:
for s being State of SCMPDS,I being Program of SCMPDS,a being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) < 0
holds IExec(if>=0(A16 m pIF X6
proof
ets Stateof ,I Program , Int_position,k1 be
Integer;
set b=DataLoc(s.a,k1);
set IF=if>=0(a,k1,I), pIF=stop IF, s3 = Initialize s,
P3 = P +* pIF,
s4 = Comput(P3,s3,1), s5 = Comput(P3,s3,2), P4 = P3, P5 = P3;
set i = (a,k1)>=0_goto 2, j = goto (card I + 1);
set SAl=Start-At((card I+2),SCMPDS);
A1: IF =i ';' (j ';' I) by SCMPDS_4:16;
A2: not b in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
not a in dom Start-At(0,SCMPDS) by SCMPDS_4:18;
then
A3: s3.DataLoc(s3.a,k1)=s3.b by FUNCT_4:11
.= s.b by A2,FUNCT_4:11;
A4: IC s3 = 0 by MEMSTR_0:47;
A5: pIF c= P3 by FUNCT_4:25;
then
A6: pIF c= P4;
A7: pIF c= P5 by A5;
A8: Comput(P3, s3,0 + 1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
.= Following(P3,s3) by EXTPRO_1:2
.= Exec(i,s3) by A1,Th3;
assume
s.b < 0;
then
A9: IC s4 = IC s3 + 1 by A8,A3,SCMPDS_2:57
.= (0+1) by A4;
A10: 1 in dom IF by Lm9;
then 1 in dom pIF by COMPOS_1:62;
then
A11: P4.1 = pIF. 1 by A6,GRFUNC_1:2
.=IF. 1 by A10,COMPOS_1:63
.=j by Lm10;
A12: P3/.IC s4 = P3.IC s4 by PBOOLE:143;
A13: Comput(P3, s3,1 + 1) = Following(P3,s4) by EXTPRO_1:3
.= Exec(j,s4) by A9,A11,A12;
then
A14: IC s5 = ICplusConst(s4,card I+1) by SCMPDS_2:54
.= (card I+1+1) by A9,Th4
.= (card I+(1+1));
A15: (P3)/.IC s5
= P3.IC s5 by PBOOLE:143;
A16: card IF=card I+2 by Lm8;
then (card I+2) in dom pIF by COMPOS_1:64;
then P5.(card I+2) = pIF.(card I+2) by A7,GRFUNC_1:2
.=halt SCMPDS by A16,COMPOS_1:64;
then
A17: CurInstr(P3,s5) = halt SCMPDS by A14,A15;
then
A18: P3 halts_on s3 by EXTPRO_1:29;
A19: CurInstr(P3,s3) = i by A1,Th3;
now
let l be Nat;
assume
l < 1+1;
then
A20: l <= 1 by NAT_1:13;
A21: Comput(P3,s3,0) = s3 by EXTPRO_1:2;
A22: P3/.IC Comput(P3,s3,l)
= P3.IC Comput(P3,s3,l) by PBOOLE:143;
per cases by A20,NAT_1:25;
suppose
l=0;
then CurInstr(P3,Comput(P3,s3,l))
= CurInstr(P3,s3)
by A21;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A19;
end;
suppose
l=1;
hence CurInstr(P3,Comput(P3,s3,l))
<> halt SCMPDS by A9,A11,A22;
end;
end;
then for l be Nat st CurInstr(P3,
Comput(P3,s3,l)) = halt SCMPDS
holds 2 <= l;
then LifeSpan(P3,s3) = 2 by A17,A18,EXTPRO_1:def 15;
then
A23: s5 = Result(P3,s3) by A18,EXTPRO_1:23;
A24: now
A25: dom SAl = {IC SCMPDS} by FUNCOP_1:13;
let x be object;
assume
A26: x in dom IExec(IF,P,Initialize s);
per cases by A26,SCMPDS_4:6;
suppose
A27: x is Int_position;
then x <> IC SCMPDS by SCMPDS_2:43;
then
A28: not x in dom SAl by A25,TARSKI:def 1;
A29: not x in dom Start-At(0,SCMPDS) by A27,SCMPDS_4:18;
thus IExec(IF,P,Initialize s).x = s5.x by A23
.= s4.x by A13,A27,SCMPDS_2:54
.= s3.x by A8,A27,SCMPDS_2:57
.= s.x by A29,FUNCT_4:11
.= (s +* SAl).x by A28,FUNCT_4:11;
end;
suppose
A30: x = IC SCMPDS;
hence IExec(IF,P,Initialize s).x = (card I + 2) by A14,A23
.= (s +* Start-At((card I+2),SCMPDS)).x by A30,FUNCT_4:113;
end;
end;
dom IExec(IF,P,Initialize s) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (s +* SAl) by PARTFUN1:def 2;
hence thesis by A24,FUNCT_1:2;
end;
registration
let I be shiftable parahalting Program of SCMPDS, a be Int_position,k1 be
Integer;
cluster if>=0(a,k1,I) -> shiftable parahalting;
correctness
proof
set i = (a,k1)>=0_goto 2, j = goto (card I + 1);
set IF=if>=0(a,k1,I), pIF = stop IF;
thus IF is shiftable;
let s be 0-started State of SCMPDS;
let P be Instruction-Sequence of SCMPDS;
A1: Initialize s = s by MEMSTR_0:44;
assume pIF c= P;
then
A2: P = P +* stop IF by FUNCT_4:98;
A3: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
per cases;
suppose
s.DataLoc(s.a,k1) >= 0;
then IF is_halting_on s,P by A3,Th109;
hence P halts_on s by A2,A1;
end;
suppose
s.DataLoc(s.a,k1) < 0;
then IF is_halting_on s,P by Th110;
hence P halts_on s by A2,A1;
end;
end;
end;
registration
let I be halt-free Program of SCMPDS, a be Int_position,k1 be Integer;
cluster if>=0(a,k1,I) -> halt-free;
coherence;
end;
theorem
for s being 0-started State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,a being Int_position,k1 being Integer
holds IC IExec(if>=0(a,k1,I),P,s) = card I + 2
proof
let s be 0-started State of SCMPDS,
I be halt-free shiftable parahalting Program of
SCMPDS,a be Int_position,k1 be Integer;
set IF=if>=0(a,k1,I);
A1: I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
A2: Initialize s = s by MEMSTR_0:44;
per cases;
suppose
s.DataLoc(s.a,k1) >= 0;
then IExec(IF,P,s) =IExec(I,P,s) +* Start-At((card I+2),SCMPDS)
by A1,Th111,A2;
hence thesis by FUNCT_4:113;
end;
suppose
s.DataLoc(s.a,k1) < 0;
then IExec(IF,P,s) =s +* Start-At((card I+2),SCMPDS) by Th112,A2;
hence thesis by FUNCT_4:113;
end;
end;
theorem
for s being State of SCMPDS,I being halt-free shiftable parahalting
Program of SCMPDS,a,b being Int_position,k1 being Integer st s.DataLoc(s.a,k1)
>= 0 holds IExec(if>=0(a,k1,I),P,Initialize s).b = IExec(I,P,Initialize s).b
proof
let s be State of SCMPDS,I be halt-free shiftable parahalting Program of
SCMPDS,a,b be Int_position,k1 be Integer;
assume
A1: s.DataLoc(s.a,k1) >= 0;
A2: not b in dom Start-At((card I+2),SCMPDS) by SCMPDS_4:18;
I is_closed_on s,P & I is_halting_on s,P by Th11,Th12;
then IExec(if>=0(a,k1,I),P,Initialize s) = IExec(I,P,Initialize s)
+* Start-At((card I+2),SCMPDS)
by A1,Th111;
hence thesis by A2,FUNCT_4:11;
end;
theorem
for s being State of SCMPDS,I being Program of SCMPDS,a,b being
Int_position, k1 being Integer st s.DataLoc(s.a,k1) < 0
holds IExec(if>=0(a,k1,I),P,Initialize s).b = s.b
proof
let s be State of SCMPDS,I be Program of SCMPDS,a,b be Int_position, k1 be
Integer;
assume
s.DataLoc(s.a,k1) < 0;
then
A1: IExec(if>=0(a,k1,I),P,Initialize s) = s +* Start-At((card I+2),SCMPDS)
by Th112;
not b in dom Start-At((card I+2),SCMPDS) by SCMPDS_4:18;
hence thesis by A1,FUNCT_4:11;
end;
theorem
for s being State of SCMPDS,I being Program of SCMPDS
holds I is_closed_on s,P iff I is_closed_on Initialize s,P;
theorem
for s being State of SCMPDS,I being Program of SCMPDS
holds I is_halting_on s,P iff I is_halting_on Initialize s,P;
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.852Angebot
¤
*Eine klare Vorstellung vom Zielzustand
|
|
2026-11-23
|