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) + 2)))

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) + 2)))

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) + 2)))

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) + 2))) )
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) + 2))) )
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) + 2))) )
assume A3: I is_halting_on s ; :: thesis: IExec (if>=0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 2)))
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 2;
set j = goto ((card I) + 1);
set SAl = Start-At (inspos ((card I) + 2));
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: if>=0 a,k1,I = (a,k1 >=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:52;
A8: IC (s +* (Initialized (stop (if>=0 a,k1,I)))) = inspos 0 by FUNCT_4:26, SCMPDS_5:18;
A9: CurInstr (s +* (Initialized (stop (if>=0 a,k1,I)))) = a,k1 >=0_goto 2 by A7, Th22;
A10: 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 2),(s +* (Initialized (stop (if>=0 a,k1,I)))) by A7, Th22 ;
A11: dom (s | NAT ) = NAT by Th1;
A12: ( 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 A13: (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 A12, FUNCT_4:12 ;
A14: Shift (stop I),2 c= Computation (s +* (Initialized (stop (if>=0 a,k1,I)))),1 by Lm7;
A15: IC (Computation (s +* (Initialized (stop (if>=0 a,k1,I)))),1) = ICplusConst (s +* (Initialized (stop (if>=0 a,k1,I)))),2 by A1, A10, A13, SCMPDS_2:69
.= inspos (0 + 2) by A8, Th23 ;
A16: 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 A16, SCMPDS_4:23
.= (Computation (s +* (Initialized (stop (if>=0 a,k1,I)))),1) . a by A10, SCMPDS_2:69 ; :: thesis: verum
end;
then A17: DataPart (s +* (Initialized (stop I))) = DataPart (Computation (s +* (Initialized (stop (if>=0 a,k1,I)))),1) by SCMPDS_4:23;
A18: 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, A14, A15, A17, Th45
.= halt SCMPDS by A5, AMI_1:def 46 ;
then A19: 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 A20: 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 ) ;
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 A24: LifeSpan (s +* (Initialized (stop (if>=0 a,k1,I)))) = (LifeSpan (s +* (Initialized (stop I)))) + 1 by A18, A19, AMI_1:def 46;
A25: 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, A14, A15, A17, 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 A19, A24, AMI_1:122 ;
A26: 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) + 2)))) 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) + 2)))) . b1 )
A27: IExec I,s = (Result (s +* (Initialized (stop I)))) +* (s | NAT ) by SCMPDS_4:def 8;
A28: IExec (if>=0 a,k1,I),s = (Result (s +* (Initialized (stop (if>=0 a,k1,I))))) +* (s | NAT ) by SCMPDS_4:def 8;
assume A29: 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) + 2)))) . b1
A30: dom (Start-At (inspos ((card I) + 2))) = {(IC SCMPDS )} by FUNCOP_1:19;
per cases ( x is Int_position or x = IC SCMPDS or x is Instruction-Location of SCMPDS ) by A29, SCMPDS_4:20;
suppose A31: x is Int_position ; :: thesis: (IExec (if>=0 a,k1,I),s) . b1 = ((IExec I,s) +* (Start-At (inspos ((card I) + 2)))) . b1
then x <> IC SCMPDS by SCMPDS_2:52;
then A32: not x in dom (Start-At (inspos ((card I) + 2))) by A30, TARSKI:def 1;
A33: now
assume x in dom (s | NAT ) ; :: thesis: contradiction
then reconsider l = x as Instruction-Location of SCMPDS by A11, AMI_1:def 4;
l = x ;
hence contradiction by A31, 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 A28, FUNCT_4:12
.= (Result (s +* (Initialized (stop I)))) . x by A25, A31, SCMPDS_4:23
.= (IExec I,s) . x by A27, A33, FUNCT_4:12
.= ((IExec I,s) +* (Start-At (inspos ((card I) + 2)))) . x by A32, FUNCT_4:12 ;
:: thesis: verum
end;
suppose A34: x = IC SCMPDS ; :: thesis: (IExec (if>=0 a,k1,I),s) . b1 = ((IExec I,s) +* (Start-At (inspos ((card I) + 2)))) . b1
then A35: x in dom (Start-At (inspos ((card I) + 2))) by A30, TARSKI:def 1;
A36: now
assume x in dom (s | NAT ) ; :: thesis: contradiction
then reconsider l = x as Instruction-Location of SCMPDS by A11, AMI_1:def 4;
l = x ;
hence contradiction by A34, AMI_1:48; :: thesis: verum
end;
then A37: IC (Result (s +* (Initialized (stop I)))) = IC (IExec I,s) by A27, A34, 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 A28, A36, FUNCT_4:12
.= (Computation (s +* (Initialized (stop (if>=0 a,k1,I)))),((LifeSpan (s +* (Initialized (stop I)))) + 1)) . x by A19, A24, AMI_1:122
.= IC (Computation (Computation (s +* (Initialized (stop (if>=0 a,k1,I)))),1),(LifeSpan (s +* (Initialized (stop I))))) by A34, AMI_1:51
.= (IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I)))))) + 2 by A4, A6, A14, A15, A17, Th45
.= (IC (Result (s +* (Initialized (stop I))))) + 2 by A5, AMI_1:122
.= (Start-At (inspos ((card I) + 2))) . (IC SCMPDS ) by A37, FUNCOP_1:87
.= ((IExec I,s) +* (Start-At (inspos ((card I) + 2)))) . x by A34, A35, 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) + 2)))) . b1
hence (IExec (if>=0 a,k1,I),s) . x = ((IExec I,s) +* (Start-At (inspos ((card I) + 2)))) . x by Th26; :: thesis: verum
end;
end;
end;
hence IExec (if>=0 a,k1,I),s = (IExec I,s) +* (Start-At (inspos ((card I) + 2))) by A26, FUNCT_1:9; :: thesis: verum