let s be State of SCMPDS ; :: thesis: for I being shiftable No-StopCode Program of SCMPDS
for a being Int_position
for k1 being Integer st s . (DataLoc (s . a),k1) < 0 & I is_closed_on s & I is_halting_on s holds
IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1)))

let I be shiftable No-StopCode Program of SCMPDS ; :: thesis: for a being Int_position
for k1 being Integer st s . (DataLoc (s . a),k1) < 0 & I is_closed_on s & I is_halting_on s holds
IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1)))

let a be Int_position ; :: thesis: for k1 being Integer st s . (DataLoc (s . a),k1) < 0 & I is_closed_on s & I is_halting_on s holds
IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1)))

let k1 be Integer; :: thesis: ( s . (DataLoc (s . a),k1) < 0 & I is_closed_on s & I is_halting_on s implies IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1))) )
set b = DataLoc (s . a),k1;
assume A1: s . (DataLoc (s . a),k1) < 0 ; :: thesis: ( not I is_closed_on s or not I is_halting_on s or IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1))) )
assume A2: I is_closed_on s ; :: thesis: ( not I is_halting_on s or IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1))) )
assume A3: I is_halting_on s ; :: thesis: IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1)))
set IF = if<0 a,k1,I;
set IsIF = Initialized (stop (if<0 a,k1,I));
set pI = stop I;
set IsI = Initialized (stop I);
set s2 = s +* (Initialized (stop I));
set s3 = s +* (Initialized (stop (if<0 a,k1,I)));
set s4 = Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1;
set i = a,k1 >=0_goto ((card I) + 1);
set SAl = Start-At (inspos ((card I) + 1));
A4: Initialized (stop I) c= s +* (Initialized (stop I)) by FUNCT_4:26;
A5: s +* (Initialized (stop I)) is halting by A3, Def3;
A6: I is_closed_on s +* (Initialized (stop I)) by A2, Th38;
A7: IC (s +* (Initialized (stop (if<0 a,k1,I)))) = inspos 0 by FUNCT_4:26, SCMPDS_5:18;
A8: CurInstr (s +* (Initialized (stop (if<0 a,k1,I)))) = a,k1 >=0_goto ((card I) + 1) by Th22;
A9: Computation (s +* (Initialized (stop (if<0 a,k1,I)))),(0 + 1) = Following (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),0 ) by AMI_1:14
.= Following (s +* (Initialized (stop (if<0 a,k1,I)))) by AMI_1:13
.= Exec (a,k1 >=0_goto ((card I) + 1)),(s +* (Initialized (stop (if<0 a,k1,I)))) by Th22 ;
A10: dom (s | NAT ) = NAT by Th1;
A11: ( not DataLoc (s . a),k1 in dom (Initialized (stop (if<0 a,k1,I))) & DataLoc (s . a),k1 in dom s ) by SCMPDS_2:49, SCMPDS_4:31;
( not a in dom (Initialized (stop (if<0 a,k1,I))) & a in dom s ) by SCMPDS_2:49, SCMPDS_4:31;
then A12: (s +* (Initialized (stop (if<0 a,k1,I)))) . (DataLoc ((s +* (Initialized (stop (if<0 a,k1,I)))) . a),k1) = (s +* (Initialized (stop (if<0 a,k1,I)))) . (DataLoc (s . a),k1) by FUNCT_4:12
.= s . (DataLoc (s . a),k1) by A11, FUNCT_4:12 ;
A13: Shift (stop I),1 c= Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1 by Lm6;
A14: IC (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1) = Next (IC (s +* (Initialized (stop (if<0 a,k1,I))))) by A1, A9, A12, SCMPDS_2:69
.= inspos (0 + 1) by A7 ;
A15: DataPart (s +* (Initialized (stop I))) = DataPart (s +* (Initialized (stop (if<0 a,k1,I)))) by SCMPDS_4:24, SCMPDS_4:36;
now
let a be Int_position ; :: thesis: (s +* (Initialized (stop I))) . a = (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1) . a
thus (s +* (Initialized (stop I))) . a = (s +* (Initialized (stop (if<0 a,k1,I)))) . a by A15, SCMPDS_4:23
.= (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1) . a by A9, SCMPDS_2:69 ; :: thesis: verum
end;
then A16: DataPart (s +* (Initialized (stop I))) = DataPart (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1) by SCMPDS_4:23;
A17: CurInstr (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),((LifeSpan (s +* (Initialized (stop I)))) + 1)) = CurInstr (Computation (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1),(LifeSpan (s +* (Initialized (stop I))))) by AMI_1:51
.= CurInstr (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))) by A4, A6, A13, A14, A16, Th45
.= halt SCMPDS by A5, AMI_1:def 46 ;
then A18: s +* (Initialized (stop (if<0 a,k1,I))) is halting by AMI_1:def 20;
now
let l be Element of NAT ; :: thesis: ( l < (LifeSpan (s +* (Initialized (stop I)))) + 1 implies CurInstr (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),b1) <> halt SCMPDS )
assume A19: l < (LifeSpan (s +* (Initialized (stop I)))) + 1 ; :: thesis: CurInstr (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),b1) <> halt SCMPDS
per cases ( l = 0 or l <> 0 ) ;
suppose l <> 0 ; :: thesis: not CurInstr (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),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 I))) by A19, A20, XREAL_1:8;
assume A22: CurInstr (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),l) = halt SCMPDS ; :: thesis: contradiction
CurInstr (Computation (s +* (Initialized (stop I))),n) = CurInstr (Computation (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1),n) by A4, A6, A13, A14, A16, Th45
.= halt SCMPDS by A20, A22, AMI_1:51 ;
hence contradiction by A5, A21, AMI_1:def 46; :: thesis: verum
end;
end;
end;
then for l being Element of NAT st CurInstr (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),l) = halt SCMPDS holds
(LifeSpan (s +* (Initialized (stop I)))) + 1 <= l ;
then A23: LifeSpan (s +* (Initialized (stop (if<0 a,k1,I)))) = (LifeSpan (s +* (Initialized (stop I)))) + 1 by A17, A18, AMI_1:def 46;
A24: DataPart (Result (s +* (Initialized (stop I)))) = DataPart (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))) by A5, AMI_1:122
.= DataPart (Computation (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1),(LifeSpan (s +* (Initialized (stop I))))) by A4, A6, A13, A14, A16, Th45
.= DataPart (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),((LifeSpan (s +* (Initialized (stop I)))) + 1)) by AMI_1:51
.= DataPart (Result (s +* (Initialized (stop (if<0 a,k1,I))))) by A18, A23, AMI_1:122 ;
A25: dom (IExec (if<0 a,k1,I),s) = the carrier of SCMPDS by AMI_1:79
.= dom ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) by AMI_1:79 ;
now
let x be set ; :: thesis: ( x in dom (IExec (if<0 a,k1,I),s) implies (IExec (if<0 a,k1,I),s) . b1 = ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . b1 )
A26: IExec I,s = (Result (s +* (Initialized (stop I)))) +* (s | NAT ) by SCMPDS_4:def 8;
A27: IExec (if<0 a,k1,I),s = (Result (s +* (Initialized (stop (if<0 a,k1,I))))) +* (s | NAT ) by SCMPDS_4:def 8;
assume A28: x in dom (IExec (if<0 a,k1,I),s) ; :: thesis: (IExec (if<0 a,k1,I),s) . b1 = ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . b1
A29: dom (Start-At (inspos ((card I) + 1))) = {(IC SCMPDS )} by FUNCOP_1:19;
per cases ( x is Int_position or x = IC SCMPDS or x is Instruction-Location of SCMPDS ) by A28, SCMPDS_4:20;
suppose A30: x is Int_position ; :: thesis: (IExec (if<0 a,k1,I),s) . b1 = ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . b1
then x <> IC SCMPDS by SCMPDS_2:52;
then A31: not x in dom (Start-At (inspos ((card I) + 1))) by A29, TARSKI:def 1;
A32: now
assume x in dom (s | NAT ) ; :: thesis: contradiction
then reconsider l = x as Instruction-Location of SCMPDS by A10, AMI_1:def 4;
l = x ;
hence contradiction by A30, SCMPDS_2:53; :: thesis: verum
end;
hence (IExec (if<0 a,k1,I),s) . x = (Result (s +* (Initialized (stop (if<0 a,k1,I))))) . x by A27, FUNCT_4:12
.= (Result (s +* (Initialized (stop I)))) . x by A24, A30, SCMPDS_4:23
.= (IExec I,s) . x by A26, A32, FUNCT_4:12
.= ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . x by A31, FUNCT_4:12 ;
:: thesis: verum
end;
suppose A33: x = IC SCMPDS ; :: thesis: (IExec (if<0 a,k1,I),s) . b1 = ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . b1
then A34: x in dom (Start-At (inspos ((card I) + 1))) by A29, TARSKI:def 1;
A35: now
assume x in dom (s | NAT ) ; :: thesis: contradiction
then reconsider l = x as Instruction-Location of SCMPDS by A10, AMI_1:def 4;
l = x ;
hence contradiction by A33, AMI_1:48; :: thesis: verum
end;
then A36: IC (Result (s +* (Initialized (stop I)))) = IC (IExec I,s) by A26, A33, FUNCT_4:12
.= inspos (card I) by A2, A3, Th48 ;
thus (IExec (if<0 a,k1,I),s) . x = (Result (s +* (Initialized (stop (if<0 a,k1,I))))) . x by A27, A35, FUNCT_4:12
.= (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),((LifeSpan (s +* (Initialized (stop I)))) + 1)) . x by A18, A23, AMI_1:122
.= IC (Computation (Computation (s +* (Initialized (stop (if<0 a,k1,I)))),1),(LifeSpan (s +* (Initialized (stop I))))) by A33, AMI_1:51
.= (IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I)))))) + 1 by A4, A6, A13, A14, A16, Th45
.= (IC (Result (s +* (Initialized (stop I))))) + 1 by A5, AMI_1:122
.= (Start-At (inspos ((card I) + 1))) . (IC SCMPDS ) by A36, FUNCOP_1:87
.= ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . x by A33, A34, FUNCT_4:14 ; :: thesis: verum
end;
suppose x is Instruction-Location of SCMPDS ; :: thesis: (IExec (if<0 a,k1,I),s) . b1 = ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . b1
hence (IExec (if<0 a,k1,I),s) . x = ((IExec I,s) +* (Start-At (inspos ((card I) + 1)))) . x by Th26; :: thesis: verum
end;
end;
end;
hence IExec (if<0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 1))) by A25, FUNCT_1:9; :: thesis: verum