let s be State of SCMPDS ; for I being Program of SCMPDS
for J being shiftable No-StopCode Program of SCMPDS
for a being Int_position
for k1 being Integer st s . (DataLoc (s . a),k1) >= 0 & J is_closed_on s & J is_halting_on s holds
IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )
let I be Program of SCMPDS ; for J being shiftable No-StopCode Program of SCMPDS
for a being Int_position
for k1 being Integer st s . (DataLoc (s . a),k1) >= 0 & J is_closed_on s & J is_halting_on s holds
IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )
let J be shiftable No-StopCode Program of SCMPDS ; for a being Int_position
for k1 being Integer st s . (DataLoc (s . a),k1) >= 0 & J is_closed_on s & J is_halting_on s holds
IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )
let a be Int_position ; for k1 being Integer st s . (DataLoc (s . a),k1) >= 0 & J is_closed_on s & J is_halting_on s holds
IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )
let k1 be Integer; ( s . (DataLoc (s . a),k1) >= 0 & J is_closed_on s & J is_halting_on s implies IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS ) )
set b = DataLoc (s . a),k1;
set pJ = stop J;
set IsJ = Initialized (stop J);
set s1 = s +* (Initialized (stop J));
set IF = if<0 a,k1,I,J;
set pIF = stop (if<0 a,k1,I,J);
set IsIF = Initialized (stop (if<0 a,k1,I,J));
set s3 = s +* (Initialized (stop (if<0 a,k1,I,J)));
set s4 = Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1;
set i = a,k1 >=0_goto ((card I) + 2);
set G = Goto ((card J) + 1);
set iG = ((a,k1 >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1));
set SAl = Start-At (((card I) + (card J)) + 2),SCMPDS ;
A1: if<0 a,k1,I,J =
((a,k1 >=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J
by SCMPDS_4:50
.=
(a,k1 >=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J)
by SCMPDS_4:50
;
A2: Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),(0 + 1) =
Following (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),0 )
by AMI_1:14
.=
Following (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J))))
by AMI_1:13
.=
Exec (a,k1 >=0_goto ((card I) + 2)),(s +* (Initialized (stop (if<0 a,k1,I,J))))
by A1, Th22
;
A3:
not DataLoc (s . a),k1 in dom (Initialized (stop (if<0 a,k1,I,J)))
by SCMPDS_4:31;
not a in dom (Initialized (stop (if<0 a,k1,I,J)))
by SCMPDS_4:31;
then A4: (s +* (Initialized (stop (if<0 a,k1,I,J)))) . (DataLoc ((s +* (Initialized (stop (if<0 a,k1,I,J)))) . a),k1) =
(s +* (Initialized (stop (if<0 a,k1,I,J)))) . (DataLoc (s . a),k1)
by FUNCT_4:12
.=
s . (DataLoc (s . a),k1)
by A3, FUNCT_4:12
;
A5:
IC (s +* (Initialized (stop (if<0 a,k1,I,J)))) = 0
by FUNCT_4:26, SCMPDS_5:18;
A6:
dom (s | NAT ) = NAT
by Th1;
assume
s . (DataLoc (s . a),k1) >= 0
; ( not J is_closed_on s or not J is_halting_on s or IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS ) )
then A7: IC (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1) =
ICplusConst (s +* (Initialized (stop (if<0 a,k1,I,J)))),((card I) + 2)
by A2, A4, SCMPDS_2:69
.=
0 + ((card I) + 2)
by A5, Th23
;
A8:
DataPart (s +* (Initialized (stop J))) = DataPart (s +* (Initialized (stop (if<0 a,k1,I,J))))
by SCMPDS_4:24, SCMPDS_4:36;
now let a be
Int_position ;
(s +* (Initialized (stop J))) . a = (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1) . athus (s +* (Initialized (stop J))) . a =
(s +* (Initialized (stop (if<0 a,k1,I,J)))) . a
by A8, SCMPDS_4:23
.=
(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1) . a
by A2, SCMPDS_2:69
;
verum end;
then A9:
DataPart (s +* (Initialized (stop J))) = DataPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)
by SCMPDS_4:23;
card (((a,k1 >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) =
(card ((a,k1 >=0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1)))
by SCMPDS_4:45
.=
(card ((a,k1 >=0_goto ((card I) + 2)) ';' I)) + 1
by SCMPDS_5:6
.=
((card I) + 1) + 1
by Th15
.=
(card I) + (1 + 1)
;
then A10:
Shift (stop J),((card I) + 2) c= stop (if<0 a,k1,I,J)
by Th24;
stop (if<0 a,k1,I,J) c= s +* (Initialized (stop (if<0 a,k1,I,J)))
by FUNCT_4:26, SCMPDS_4:57;
then
Shift (stop J),((card I) + 2) c= s +* (Initialized (stop (if<0 a,k1,I,J)))
by A10, XBOOLE_1:1;
then A11:
Shift (stop J),((card I) + 2) c= Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1
by AMI_1:81;
assume A12:
J is_closed_on s
; ( not J is_halting_on s or IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS ) )
then A13:
( Initialized (stop J) c= s +* (Initialized (stop J)) & J is_closed_on s +* (Initialized (stop J)) )
by Th38, FUNCT_4:26;
assume A14:
J is_halting_on s
; IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )
then A15:
ProgramPart (s +* (Initialized (stop J))) halts_on s +* (Initialized (stop J))
by Def3;
T:
ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J)))) = ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)
by AMI_1:144;
x:
Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),((LifeSpan (s +* (Initialized (stop J)))) + 1) = Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),(LifeSpan (s +* (Initialized (stop J))))
by AMI_1:51;
A16: CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),((LifeSpan (s +* (Initialized (stop J)))) + 1))),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),((LifeSpan (s +* (Initialized (stop J)))) + 1)) =
CurInstr (ProgramPart (Comput (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),(LifeSpan (s +* (Initialized (stop J)))))),(Comput (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),(LifeSpan (s +* (Initialized (stop J)))))
by x, T
.=
CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop J)))),(s +* (Initialized (stop J))),(LifeSpan (s +* (Initialized (stop J)))))),(Comput (ProgramPart (s +* (Initialized (stop J)))),(s +* (Initialized (stop J))),(LifeSpan (s +* (Initialized (stop J)))))
by A13, A11, A7, A9, Th45
.=
halt SCMPDS
by A15, AMI_1:def 46
;
then A17:
ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J)))) halts_on s +* (Initialized (stop (if<0 a,k1,I,J)))
by AMI_1:146;
A18:
CurInstr (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))) = a,k1 >=0_goto ((card I) + 2)
by A1, Th22;
now let l be
Element of
NAT ;
( l < (LifeSpan (s +* (Initialized (stop J)))) + 1 implies CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1) <> halt SCMPDS )assume A19:
l < (LifeSpan (s +* (Initialized (stop J)))) + 1
;
CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1) <> halt SCMPDS u:
Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),
(s +* (Initialized (stop (if<0 a,k1,I,J)))),
0 = s +* (Initialized (stop (if<0 a,k1,I,J)))
by AMI_1:13;
per cases
( l = 0 or l <> 0 )
;
suppose
l = 0
;
CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1) <> halt SCMPDS then
CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l)),
(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l) = CurInstr (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),
(s +* (Initialized (stop (if<0 a,k1,I,J))))
by u;
hence
CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l)),
(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l) <> halt SCMPDS
by A18, Th31;
verum end; suppose
l <> 0
;
not CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),b1) = halt SCMPDS then consider n being
Nat such that A20:
l = n + 1
by NAT_1:6;
reconsider n =
n as
Element of
NAT by ORDINAL1:def 13;
A21:
n < LifeSpan (s +* (Initialized (stop J)))
by A19, A20, XREAL_1:8;
assume A22:
CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l)),
(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l) = halt SCMPDS
;
contradictionT:
ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J)))) = ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)
by AMI_1:144;
x:
Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),
(s +* (Initialized (stop (if<0 a,k1,I,J)))),
(n + 1) = Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),
(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),
n
by AMI_1:51;
CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop J)))),(s +* (Initialized (stop J))),n)),
(Comput (ProgramPart (s +* (Initialized (stop J)))),(s +* (Initialized (stop J))),n) =
CurInstr (ProgramPart (Comput (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),n)),
(Comput (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),n)
by A13, A11, A7, A9, Th45
.=
halt SCMPDS
by A20, A22, x, T
;
hence
contradiction
by A15, A21, AMI_1:def 46;
verum end; end; end;
then
for l being Element of NAT st CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l)),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),l) = halt SCMPDS holds
(LifeSpan (s +* (Initialized (stop J)))) + 1 <= l
;
then A23:
LifeSpan (s +* (Initialized (stop (if<0 a,k1,I,J)))) = (LifeSpan (s +* (Initialized (stop J)))) + 1
by A16, A17, AMI_1:def 46;
T:
ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J)))) = ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)
by AMI_1:144;
A24: DataPart (Result (s +* (Initialized (stop J)))) =
DataPart (Comput (ProgramPart (s +* (Initialized (stop J)))),(s +* (Initialized (stop J))),(LifeSpan (s +* (Initialized (stop J)))))
by A15, AMI_1:122
.=
DataPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),(LifeSpan (s +* (Initialized (stop J)))))
by A13, A11, A7, A9, Th45, T
.=
DataPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),((LifeSpan (s +* (Initialized (stop J)))) + 1))
by AMI_1:51
.=
DataPart (Result (s +* (Initialized (stop (if<0 a,k1,I,J)))))
by A17, A23, AMI_1:122
;
A25:
now let x be
set ;
( x in dom (IExec (if<0 a,k1,I,J),s) implies (IExec (if<0 a,k1,I,J),s) . b1 = ((IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )) . b1 )A26:
IExec J,
s = (Result (s +* (Initialized (stop J)))) +* (s | NAT )
by SCMPDS_4:def 8;
A27:
IExec (if<0 a,k1,I,J),
s = (Result (s +* (Initialized (stop (if<0 a,k1,I,J))))) +* (s | NAT )
by SCMPDS_4:def 8;
A28:
dom (Start-At (((card I) + (card J)) + 2),SCMPDS ) = {(IC SCMPDS )}
by FUNCOP_1:19;
assume A29:
x in dom (IExec (if<0 a,k1,I,J),s)
;
(IExec (if<0 a,k1,I,J),s) . b1 = ((IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )) . b1per cases
( x is Int_position or x = IC SCMPDS or x is Element of NAT )
by A29, SCMPDS_4:20;
suppose A30:
x is
Int_position
;
(IExec (if<0 a,k1,I,J),s) . b1 = ((IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )) . b1then
x <> IC SCMPDS
by SCMPDS_2:52;
then A31:
not
x in dom (Start-At (((card I) + (card J)) + 2),SCMPDS )
by A28, TARSKI:def 1;
A32:
not
x in dom (s | NAT )
by A6, A30, SCMPDS_2:53;
hence (IExec (if<0 a,k1,I,J),s) . x =
(Result (s +* (Initialized (stop (if<0 a,k1,I,J))))) . x
by A27, FUNCT_4:12
.=
(Result (s +* (Initialized (stop J)))) . x
by A24, A30, SCMPDS_4:23
.=
(IExec J,s) . x
by A26, A32, FUNCT_4:12
.=
((IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )) . x
by A31, FUNCT_4:12
;
verum end; suppose A33:
x = IC SCMPDS
;
(IExec (if<0 a,k1,I,J),s) . b1 = ((IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )) . b1A34:
not
x in dom (s | NAT )
by A6, A33, AMI_1:48;
then A35:
IC (Result (s +* (Initialized (stop J)))) =
IC (IExec J,s)
by A26, A33, FUNCT_4:12
.=
card J
by A12, A14, Th48
;
A36:
x in dom (Start-At (((card I) + (card J)) + 2),SCMPDS )
by A28, A33, TARSKI:def 1;
T:
ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J)))) = ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1)
by AMI_1:144;
thus (IExec (if<0 a,k1,I,J),s) . x =
(Result (s +* (Initialized (stop (if<0 a,k1,I,J))))) . x
by A27, A34, FUNCT_4:12
.=
(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),((LifeSpan (s +* (Initialized (stop J)))) + 1)) . x
by A17, A23, AMI_1:122
.=
IC (Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(Comput (ProgramPart (s +* (Initialized (stop (if<0 a,k1,I,J))))),(s +* (Initialized (stop (if<0 a,k1,I,J)))),1),(LifeSpan (s +* (Initialized (stop J)))))
by A33, AMI_1:51
.=
(IC (Comput (ProgramPart (s +* (Initialized (stop J)))),(s +* (Initialized (stop J))),(LifeSpan (s +* (Initialized (stop J)))))) + ((card I) + 2)
by A13, A11, A7, A9, Th45, T
.=
(IC (Result (s +* (Initialized (stop J))))) + ((card I) + 2)
by A15, AMI_1:122
.=
(Start-At ((card J) + ((card I) + 2)),SCMPDS ) . (IC SCMPDS )
by A35, FUNCOP_1:87
.=
((IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )) . x
by A33, A36, FUNCT_4:14
;
verum end; end; end;
dom (IExec (if<0 a,k1,I,J),s) =
the carrier of SCMPDS
by PARTFUN1:def 4
.=
dom ((IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS ))
by PARTFUN1:def 4
;
hence
IExec (if<0 a,k1,I,J),s = (IExec J,s) +* (Start-At (((card I) + (card J)) + 2),SCMPDS )
by A25, FUNCT_1:9; verum