set SAt = Start-At (insloc 0 );
set D = Int-Locations \/ FinSeq-Locations ;
let I be good Program of ; for J being Program of
for s being State of st s . (intloc 0 ) = 1 & I is_halting_on s & J is_halting_on IExec I,s & I is_closed_on s & J is_closed_on IExec I,s & 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 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
let J be Program of ; for s being State of st s . (intloc 0 ) = 1 & I is_halting_on s & J is_halting_on IExec I,s & I is_closed_on s & J is_closed_on IExec I,s & 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 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
let s be State of ; ( s . (intloc 0 ) = 1 & I is_halting_on s & J is_halting_on IExec I,s & I is_closed_on s & J is_closed_on IExec I,s & 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 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) ) )
assume that
A1:
s . (intloc 0 ) = 1
and
A2:
I is_halting_on s
and
A3:
J is_halting_on IExec I,s
and
A4:
I is_closed_on s
and
A5:
J is_closed_on IExec I,s
; ( not Initialized (I ';' J) c= s or ( 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 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) ) )
A6:
Start-At (insloc 0 ) c= (I ';' J) +* (Start-At (insloc 0 ))
by FUNCT_4:26;
set s1 = s +* I;
set m1 = LifeSpan (s +* I);
set s4 = Computation s,((LifeSpan (s +* I)) + 1);
A7:
(Directed I) +* (Start-At (insloc 0 )) c= (I ';' J) +* (Start-At (insloc 0 ))
by PRE_CIRC:3, SCMFSA6A:55;
assume A8:
Initialized (I ';' J) c= s
; ( 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 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
then
(I ';' J) +* (Start-At (insloc 0 )) c= s
by SCMFSA6B:8;
then A9:
Start-At (insloc 0 ) c= s
by A6, XBOOLE_1:1;
then A10: s +* I =
(s +* (Start-At (insloc 0 ))) +* I
by FUNCT_4:79
.=
(s +* I) +* (Start-At (insloc 0 ))
by SCMFSA6B:14
.=
s +* (I +* (Start-At (insloc 0 )))
by FUNCT_4:15
;
then A11:
ProgramPart (s +* I) halts_on s +* I
by A2, SCMFSA7B:def 8;
(I ';' J) +* (Start-At (insloc 0 )) c= s
by A8, SCMFSA6B:8;
then
(Directed I) +* (Start-At (insloc 0 )) c= s
by A7, XBOOLE_1:1;
then A12:
s = s +* ((Directed I) +* (Start-At (insloc 0 )))
by FUNCT_4:79;
hence A13:
IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I)
by A2, A4, A10, SCMFSA8A:36; ( 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 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
set JAt = J +* (Start-At (insloc 0 ));
set InJ = Initialized J;
set s3 = (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J);
reconsider kk = DataPart (J +* (Start-At (insloc 0 ))) as Function ;
A14:
DataPart (J +* (Start-At (insloc 0 ))) = {}
by Th2;
(Computation (s +* I),(LifeSpan (s +* I))) . (intloc 0 ) = s . (intloc 0 )
by A4, A10, SCMFSA8C:97;
then A15:
(Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J) = (Computation (s +* I),(LifeSpan (s +* I))) +* (J +* (Start-At (insloc 0 )))
by A1, SCMFSA8C:18;
then
DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) = (DataPart (Computation (s +* I),(LifeSpan (s +* I)))) +* kk
by FUNCT_4:75;
then
DataPart (Computation (s +* I),(LifeSpan (s +* I))) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by A14, LATTICE2:8, XBOOLE_1:2;
hence A16:
DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by A2, A4, A10, A12, SCMFSA8A:36; ( ProgramPart (Relocated J,(card I)) c= Computation s,((LifeSpan (s +* I)) + 1) & (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
NAT misses Int-Locations \/ FinSeq-Locations
by SCMFSA_2:13, SCMFSA_2:14, XBOOLE_1:70;
then A17:
dom (s | NAT ) misses Int-Locations \/ FinSeq-Locations
by SCMFSA8A:3;
A18:
ProgramPart (Relocated J,(card I)) c= I ';' J
by FUNCT_4:26;
A19:
intloc 0 in dom (Initialized J)
by SCMFSA6A:45;
A20:
s +* I = s +* (Initialized I)
by A8, SCMFSA6A:51;
A21: DataPart (IExec I,s) =
DataPart ((Result (s +* (Initialized I))) +* (s | NAT ))
by SCMFSA6B:def 1
.=
DataPart (Result (s +* (Initialized I)))
by A17, FUNCT_4:94, SCMFSA_2:127
.=
DataPart (Computation (s +* I),(LifeSpan (s +* I)))
by A11, A20, AMI_1:122
;
then
J is_halting_on Computation (s +* I),(LifeSpan (s +* I))
by A3, A5, SCMFSA8B:8;
then A22:
ProgramPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) halts_on (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by A15, SCMFSA7B:def 8;
I ';' J c= Initialized (I ';' J)
by SCMFSA6A:26;
then
I ';' J c= s
by A8, XBOOLE_1:1;
then
ProgramPart (Relocated J,(card I)) c= s
by A18, XBOOLE_1:1;
then A23:
[(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)
; ( (Computation s,((LifeSpan (s +* I)) + 1)) . (intloc 0 ) = 1 & ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
intloc 0 in Int-Locations
by SCMFSA_2:def 4;
then A24:
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 A16, FUNCT_1:72, SCMFSA_2:127
.=
((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) . (intloc 0 )
by A24, FUNCT_1:72, SCMFSA_2:127
.=
(Initialized J) . (intloc 0 )
by A19, FUNCT_4:14
.=
1
by SCMFSA6A:46
;
( ProgramPart s halts_on s & LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
A25:
I ';' J c= Initialized (I ';' J)
by SCMFSA6A:26;
set m3 = LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J));
A26:
dom (Directed I) = dom I
by FUNCT_4:105;
reconsider m = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))) as Element of NAT ;
A27:
Directed I c= I ';' J
by SCMFSA6A:55;
(s +* I) +* (Directed I) =
s +* (I +* (Directed I))
by FUNCT_4:15
.=
s +* (Directed I)
by A26, FUNCT_4:20
.=
(s +* (Initialized (I ';' J))) +* (Directed I)
by A8, LATTICE2:8
.=
s +* ((Initialized (I ';' J)) +* (Directed I))
by FUNCT_4:15
.=
s +* (Initialized (I ';' J))
by A27, A25, LATTICE2:8, XBOOLE_1:1
.=
s
by A8, LATTICE2:8
;
then
Directed I c= s
by FUNCT_4:26;
then
s +* (Directed I) = s
by FUNCT_4:79;
then
(s +* (Directed I)) +* (Start-At (insloc 0 )) = s
by A9, FUNCT_4:79;
then A28:
s +* ((Directed I) +* (Start-At (insloc 0 ))) = s
by FUNCT_4:15;
A29:
DataPart (IExec I,s) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by A15, A21, SCMFSA8A:11;
then A30:
J is_closed_on (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by A5, SCMFSA8B:6;
A31:
J +* (Start-At (insloc 0 )) c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by FUNCT_4:26, SCMFSA6B:8;
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 (Computation s,((LifeSpan (s +* I)) + 1)),(LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))))
by A30, A13, A16, A23, SCMFSA8C:42;
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 A32: CurInstr (Computation s,m) =
IncAddr (halt SCM+FSA ),(card I)
by A22, AMI_1:def 46
.=
halt SCM+FSA
by SCMFSA_4:8
;
hence A33:
ProgramPart s halts_on s
by AMI_1:146; ( LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is good implies (Result s) . (intloc 0 ) = 1 ) )
A34:
now let k be
Element of
NAT ;
( ((LifeSpan (s +* I)) + 1) + k < m implies not CurInstr (Computation s,(((LifeSpan (s +* I)) + 1) + k)) = halt SCM+FSA )assume
((LifeSpan (s +* I)) + 1) + k < m
;
not CurInstr (Computation s,(((LifeSpan (s +* I)) + 1) + k)) = halt SCM+FSA then A35:
k < LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by XREAL_1:8;
assume A36:
CurInstr (Computation s,(((LifeSpan (s +* I)) + 1) + k)) = halt SCM+FSA
;
contradiction IncAddr (CurInstr (Computation ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)),k)),
(card I) =
CurInstr (Computation (Computation s,((LifeSpan (s +* I)) + 1)),k)
by A30, A13, A16, A31, A23, SCMFSA8C:42
.=
halt SCM+FSA
by A36, AMI_1:51
;
then
InsCode (CurInstr (Computation ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)),k)) = 0
by SCMFSA_2:124, SCMFSA_4:22;
then
CurInstr (Computation ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)),k) = halt SCM+FSA
by SCMFSA_2:122;
hence
contradiction
by A22, A35, AMI_1:def 46;
verum end;
then
for k being Element of NAT st CurInstr (Computation s,k) = halt SCM+FSA holds
m <= k
;
then A39:
LifeSpan s = m
by A32, A33, AMI_1:def 46;
hence
LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J)))
by A11, AMI_1:122; ( J is good implies (Result s) . (intloc 0 ) = 1 )
J +* (Start-At (insloc 0 )) c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by FUNCT_4:26, SCMFSA6B:8;
then A40:
((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) +* (J +* (Start-At (insloc 0 ))) = (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by FUNCT_4:79;
A41:
Initialized J c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by FUNCT_4:26;
hereby verum
A42:
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 A30, A13, A16, A31, A23, SCMFSA8C:42;
assume A43:
J is
good
;
(Result s) . (intloc 0 ) = 1thus (Result s) . (intloc 0 ) =
(Computation s,m) . (intloc 0 )
by A33, 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 A42, SCMFSA6A:38
.=
((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) . (intloc 0 )
by A5, A29, A40, A43, SCMFSA8B:6, SCMFSA8C:97
.=
(Initialized J) . (intloc 0 )
by A19, A41, GRFUNC_1:8
.=
1
by SCMFSA6A:46
;
verum
end;