let I be No-StopCode Program of SCMPDS ; :: thesis: for J being shiftable Program of SCMPDS
for s, s1, s2 being State of SCMPDS st I is_closed_on s & I is_halting_on s & J is_closed_on IExec I,s & J is_halting_on IExec I,s & s2 = s +* (Initialized (stop (I ';' J))) & s1 = s +* (Initialized (stop I)) holds
( IC (Computation s2,(LifeSpan s1)) = inspos (card I) & DataPart (Computation s2,(LifeSpan s1)) = DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))) & Shift (stop J),(card I) c= Computation s2,(LifeSpan s1) & LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J)))) )
let J be shiftable Program of SCMPDS ; :: thesis: for s, s1, s2 being State of SCMPDS st I is_closed_on s & I is_halting_on s & J is_closed_on IExec I,s & J is_halting_on IExec I,s & s2 = s +* (Initialized (stop (I ';' J))) & s1 = s +* (Initialized (stop I)) holds
( IC (Computation s2,(LifeSpan s1)) = inspos (card I) & DataPart (Computation s2,(LifeSpan s1)) = DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))) & Shift (stop J),(card I) c= Computation s2,(LifeSpan s1) & LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J)))) )
let s, s1, s2 be State of SCMPDS ; :: thesis: ( I is_closed_on s & I is_halting_on s & J is_closed_on IExec I,s & J is_halting_on IExec I,s & s2 = s +* (Initialized (stop (I ';' J))) & s1 = s +* (Initialized (stop I)) implies ( IC (Computation s2,(LifeSpan s1)) = inspos (card I) & DataPart (Computation s2,(LifeSpan s1)) = DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))) & Shift (stop J),(card I) c= Computation s2,(LifeSpan s1) & LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J)))) ) )
set IsI = Initialized (stop I);
set spJ = stop J;
set IsJ = Initialized (stop J);
set IJ = I ';' J;
set sIJ = stop (I ';' J);
set IsIJ = Initialized (stop (I ';' J));
set m1 = LifeSpan s1;
set sm = Computation s1,(LifeSpan s1);
set s3 = (Computation s1,(LifeSpan s1)) +* (Initialized (stop J));
set m3 = LifeSpan ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J)));
set sE = IExec I,s;
assume A1:
( I is_closed_on s & I is_halting_on s & J is_closed_on IExec I,s & J is_halting_on IExec I,s & s2 = s +* (Initialized (stop (I ';' J))) & s1 = s +* (Initialized (stop I)) )
; :: thesis: ( IC (Computation s2,(LifeSpan s1)) = inspos (card I) & DataPart (Computation s2,(LifeSpan s1)) = DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))) & Shift (stop J),(card I) c= Computation s2,(LifeSpan s1) & LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J)))) )
then A2:
s2 = s +* ((I ';' (J ';' (Stop SCMPDS ))) +* (Start-At (inspos 0 )))
by SCMPDS_4:46;
A3:
Initialized (stop (I ';' J)) c= s2
by A1, FUNCT_4:26;
stop (I ';' J) c= Initialized (stop (I ';' J))
by SCMPDS_4:9;
then A4:
stop (I ';' J) c= s2
by A3, XBOOLE_1:1;
A5:
DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))) = (DataPart (Computation s1,(LifeSpan s1))) +* (DataPart (Initialized (stop J)))
by FUNCT_4:75;
A10:
Initialized (stop J) c= (Computation s1,(LifeSpan s1)) +* (Initialized (stop J))
by FUNCT_4:26;
then
dom (Initialized (stop J)) c= dom ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J)))
by GRFUNC_1:8;
then A11:
dom (Initialized (stop J)) c= the carrier of SCMPDS
by AMI_1:79;
dom (DataPart (Initialized (stop J))) = (dom (Initialized (stop J))) /\ SCM-Data-Loc
by RELAT_1:90, SCMPDS_2:100;
then
dom (DataPart (Initialized (stop J))) c= the carrier of SCMPDS /\ SCM-Data-Loc
by A11, XBOOLE_1:26;
then
dom (DataPart (Initialized (stop J))) c= (dom (Computation s1,(LifeSpan s1))) /\ SCM-Data-Loc
by AMI_1:79;
then
dom (DataPart (Initialized (stop J))) c= dom (DataPart (Computation s1,(LifeSpan s1)))
by RELAT_1:90, SCMPDS_2:100;
then
DataPart (Initialized (stop J)) c= DataPart (Computation s1,(LifeSpan s1))
by A6, GRFUNC_1:8;
then A12:
DataPart (Computation s1,(LifeSpan s1)) = DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J)))
by A5, LATTICE2:8;
set s4 = Computation s2,(LifeSpan s1);
A13:
( J is_closed_on Computation s1,(LifeSpan s1) & J is_halting_on Computation s1,(LifeSpan s1) )
by A1, Th42;
then A14:
J is_closed_on (Computation s1,(LifeSpan s1)) +* (Initialized (stop J))
by SCMPDS_6:38;
A15:
(Computation s1,(LifeSpan s1)) +* (Initialized (stop J)) is halting
by A13, SCMPDS_6:def 3;
thus A16:
IC (Computation s2,(LifeSpan s1)) = inspos (card I)
by A1, Th17, Th44; :: thesis: ( DataPart (Computation s2,(LifeSpan s1)) = DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))) & Shift (stop J),(card I) c= Computation s2,(LifeSpan s1) & LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J)))) )
thus A17:
DataPart (Computation s2,(LifeSpan s1)) = DataPart ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J)))
by A1, A2, A12, Th38, SCMPDS_4:24; :: thesis: ( Shift (stop J),(card I) c= Computation s2,(LifeSpan s1) & LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J)))) )
reconsider m = (LifeSpan s1) + (LifeSpan ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J)))) as Element of NAT ;
stop (I ';' J) =
I ';' (J ';' (Stop SCMPDS ))
by SCMPDS_4:46
.=
I +* (Shift (stop J),(card I))
;
then
Shift (stop J),(card I) c= stop (I ';' J)
by FUNCT_4:26;
then
Shift (stop J),(card I) c= s2
by A4, XBOOLE_1:1;
hence A18:
Shift (stop J),(card I) c= Computation s2,(LifeSpan s1)
by AMI_1:81; :: thesis: LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J))))
A19:
now let k be
Element of
NAT ;
:: thesis: ( (LifeSpan s1) + k < m implies not CurInstr (Computation s2,((LifeSpan s1) + k)) = halt SCMPDS )assume
(LifeSpan s1) + k < m
;
:: thesis: not CurInstr (Computation s2,((LifeSpan s1) + k)) = halt SCMPDS then A20:
k < LifeSpan ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J)))
by XREAL_1:8;
assume A21:
CurInstr (Computation s2,((LifeSpan s1) + k)) = halt SCMPDS
;
:: thesis: contradiction CurInstr (Computation ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))),k) =
CurInstr (Computation (Computation s2,(LifeSpan s1)),k)
by A10, A14, A16, A17, A18, SCMPDS_6:45
.=
halt SCMPDS
by A21, AMI_1:51
;
hence
contradiction
by A15, A20, AMI_1:def 46;
:: thesis: verum end;
CurInstr (Computation ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))),(LifeSpan ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))))) = CurInstr (Computation (Computation s2,(LifeSpan s1)),(LifeSpan ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J)))))
by A10, A14, A16, A17, A18, SCMPDS_6:45;
then
CurInstr (Computation ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))),(LifeSpan ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))))) = CurInstr (Computation s2,((LifeSpan s1) + (LifeSpan ((Computation s1,(LifeSpan s1)) +* (Initialized (stop J))))))
by AMI_1:51;
then A22:
CurInstr (Computation s2,m) = halt SCMPDS
by A15, AMI_1:def 46;
then A25:
for k being Element of NAT st CurInstr (Computation s2,k) = halt SCMPDS holds
m <= k
;
I ';' J is_halting_on s
by A1, Th43;
then
s2 is halting
by A1, SCMPDS_6:def 3;
then A26:
LifeSpan s2 = m
by A22, A25, AMI_1:def 46;
s1 is halting
by A1, SCMPDS_6:def 3;
hence
LifeSpan s2 = (LifeSpan s1) + (LifeSpan ((Result s1) +* (Initialized (stop J))))
by A26, AMI_1:122; :: thesis: verum