set SA0 = Start-At (insloc 0 );
let I be parahalting keeping_0 Program of SCM+FSA ; :: thesis: for J being parahalting Program of SCM+FSA
for s being State of SCM+FSA st Initialized (I ';' J) c= s holds
( IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I) & DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) & ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) & (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )

let J be parahalting Program of SCM+FSA ; :: thesis: for s being State of SCM+FSA st Initialized (I ';' J) c= s holds
( IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I) & DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) & ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) & (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )

let s be State of SCM+FSA ; :: thesis: ( Initialized (I ';' J) c= s implies ( IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I) & DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) & ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) & (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) ) )
set s1 = s +* I;
set s3 = (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J);
set m1 = LifeSpan (s +* I);
set m3 = LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J));
set D = Int-Locations \/ FinSeq-Locations ;
assume A1: Initialized (I ';' J) c= s ; :: thesis: ( IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I) & DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) & ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) & (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
then A2: Initialized I c= s +* I by SCMFSA6A:52;
then A3: I +* (Start-At (insloc 0 )) c= s +* I by Th8;
(I ';' J) +* (Start-At (insloc 0 )) c= s by A1, Th8;
then A4: s = s +* ((I ';' J) +* (Start-At (insloc 0 ))) by FUNCT_4:79;
A5: Start-At (insloc 0 ) c= (I ';' J) +* (Start-At (insloc 0 )) by FUNCT_4:26;
(I ';' J) +* (Start-At (insloc 0 )) c= s by A1, Th8;
then A6: Start-At (insloc 0 ) c= s by A5, XBOOLE_1:1;
then A7: s +* I = (s +* (Start-At (insloc 0 ))) +* I by FUNCT_4:79
.= (s +* I) +* (Start-At (insloc 0 )) by Th14
.= s +* (I +* (Start-At (insloc 0 ))) by FUNCT_4:15 ;
A8: s +* I is halting by A3, Th18;
A9: DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) = (DataPart (Computation (s +* I),(LifeSpan (s +* I)))) +* (DataPart (Initialized J)) by FUNCT_4:75;
A10: intloc 0 in dom (Initialized I) by SCMFSA6A:45;
A11: now
let x be set ; :: thesis: ( x in dom (DataPart (Initialized J)) implies (DataPart (Initialized J)) . b1 = (DataPart (Computation (s +* I),(LifeSpan (s +* I)))) . b1 )
assume x in dom (DataPart (Initialized J)) ; :: thesis: (DataPart (Initialized J)) . b1 = (DataPart (Computation (s +* I),(LifeSpan (s +* I)))) . b1
then A12: x in (dom (Initialized J)) /\ (Int-Locations \/ FinSeq-Locations ) by RELAT_1:90, SCMFSA_2:127;
then A13: ( x in dom (Initialized J) & x in Int-Locations \/ FinSeq-Locations ) by XBOOLE_0:def 4;
per cases ( x in dom J or x = intloc 0 or x = IC SCM+FSA ) by A13, SCMFSA6A:44;
end;
end;
Initialized J c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J) by FUNCT_4:26;
then dom (Initialized J) c= dom ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) by GRFUNC_1:8;
then A16: dom (Initialized J) c= the carrier of SCM+FSA by AMI_1:79;
dom (DataPart (Initialized J)) = (dom (Initialized J)) /\ (Int-Locations \/ FinSeq-Locations ) by RELAT_1:90, SCMFSA_2:127;
then dom (DataPart (Initialized J)) c= the carrier of SCM+FSA /\ (Int-Locations \/ FinSeq-Locations ) by A16, XBOOLE_1:26;
then dom (DataPart (Initialized J)) c= (dom (Computation (s +* I),(LifeSpan (s +* I)))) /\ (Int-Locations \/ FinSeq-Locations ) by AMI_1:79;
then dom (DataPart (Initialized J)) c= dom (DataPart (Computation (s +* I),(LifeSpan (s +* I)))) by RELAT_1:90, SCMFSA_2:127;
then DataPart (Initialized J) c= DataPart (Computation (s +* I),(LifeSpan (s +* I))) by A11, GRFUNC_1:8;
then DataPart (Computation (s +* I),(LifeSpan (s +* I))) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) by A9, LATTICE2:8;
then A17: DataPart (Computation s,(LifeSpan (s +* I))) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) by A4, A7, A8, Th40, SCMFSA6A:39;
A18: (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J) is halting by Th19, FUNCT_4:26;
A19: dom (Directed I) = dom I by FUNCT_4:105;
A20: Directed I c= I ';' J by SCMFSA6A:55;
A21: I ';' J c= Initialized (I ';' J) by SCMFSA6A:26;
A22: (s +* I) +* (Directed I) = s +* (I +* (Directed I)) by FUNCT_4:15
.= s +* (Directed I) by A19, FUNCT_4:20
.= (s +* (Initialized (I ';' J))) +* (Directed I) by A1, LATTICE2:8
.= s +* ((Initialized (I ';' J)) +* (Directed I)) by FUNCT_4:15
.= s +* (Initialized (I ';' J)) by A20, A21, LATTICE2:8, XBOOLE_1:1
.= s by A1, LATTICE2:8 ;
then A23: Directed I c= s by FUNCT_4:26;
thus A24: IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I) by A6, A8, A22, Th37, FUNCT_4:26; :: thesis: ( DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) & ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) & (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
thus A25: DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) by A3, A6, A17, A23, Th18, Th38; :: thesis: ( ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) & (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
reconsider m = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))) as Element of NAT ;
set s4 = Computation s,((LifeSpan (s +* I)) + 1);
A26: J +* (Start-At (insloc 0 )) c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J) by Th8, FUNCT_4:26;
I ';' J c= Initialized (I ';' J) by SCMFSA6A:26;
then A27: I ';' J c= s by A1, XBOOLE_1:1;
ProgramPart (Relocated J,(card I)) c= I ';' J by FUNCT_4:26;
then ProgramPart (Relocated J,(card I)) c= s by A27, XBOOLE_1:1;
then B28: [(ProgramPart (Relocated J,(card I)))] c= Computation s,((LifeSpan (s +* I)) + 1) by AMI_1:81;
hence ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) ; :: thesis: ( (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
A29: intloc 0 in dom (Initialized J) by SCMFSA6A:45;
intloc 0 in Int-Locations by SCMFSA_2:9;
then A30: intloc 0 in Int-Locations \/ FinSeq-Locations by XBOOLE_0:def 3;
hence (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = (DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))) . (intloc 0 ) by A25, FUNCT_1:72, SCMFSA_2:127
.= ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) . (intloc 0 ) by A30, FUNCT_1:72, SCMFSA_2:127
.= (Initialized J) . (intloc 0 ) by A29, FUNCT_4:14
.= 1 by SCMFSA6A:46 ;
:: thesis: ( s is halting & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
A31: now end;
IncAddr (CurInstr (Computation ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))))),(card I) = CurInstr (Computation (Computation s,((LifeSpan (s +* I)) + 1)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)))) by A24, A25, A26, B28, Th27;
then IncAddr (CurInstr (Computation ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))))),(card I) = CurInstr (Computation s,(((LifeSpan (s +* I)) + 1) + (LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))))) by AMI_1:51;
then A34: CurInstr (Computation s,m) = IncAddr (halt SCM+FSA ),(card I) by A18, AMI_1:def 46
.= halt SCM+FSA by SCMFSA_4:8 ;
now end;
then A37: for k being Element of NAT st CurInstr (Computation s,k) = halt SCM+FSA holds
m <= k ;
thus A38: s is halting by A34, AMI_1:def 20; :: thesis: ( LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
then A39: LifeSpan s = m by A34, A37, AMI_1:def 46;
s +* I = s +* (Initialized I) by A1, SCMFSA6A:51;
then Initialized I c= s +* I by FUNCT_4:26;
hence LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) by A39, Th19, AMI_1:122; :: thesis: ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 )
A40: Initialized J c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J) by FUNCT_4:26;
A41: J +* (Start-At (insloc 0 )) c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J) by Th8, FUNCT_4:26;
hereby :: thesis: verum
assume A42: J is keeping_0 ; :: thesis: (Result s) . (intloc 0 ) = 1
A43: DataPart (Computation ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)))) = DataPart (Computation (Computation s,((LifeSpan (s +* I)) + 1)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)))) by A24, A25, A26, B28, Th27;
thus (Result s) . (intloc 0 ) = (Computation s,m) . (intloc 0 ) by A38, A39, AMI_1:122
.= (Computation (Computation s,((LifeSpan (s +* I)) + 1)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)))) . (intloc 0 ) by AMI_1:51
.= (Computation ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)))) . (intloc 0 ) by A43, SCMFSA6A:38
.= ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) . (intloc 0 ) by A41, A42, Def4
.= (Initialized J) . (intloc 0 ) by A29, A40, GRFUNC_1:8
.= 1 by SCMFSA6A:46 ; :: thesis: verum
end;