set D = Int-Locations \/ FinSeq-Locations ;
let I be InitHalting keepInt0_1 Program of ; for J being InitHalting Program of
for s being State of 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 & ProgramPart s halts_on s & 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 InitHalting Program of ; for s being State of 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 & ProgramPart s halts_on s & 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 ; ( 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 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));
A1:
((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )) c= (I ';' J) +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )))
by FUNCT_4:26;
assume A2:
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 keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
then A3:
s = s +* (Initialized (I ';' J))
by FUNCT_4:79;
set s4 = Computation s,((LifeSpan (s +* I)) + 1);
A4:
( Directed I c= I ';' J & I ';' J c= Initialized (I ';' J) )
by SCMFSA6A:26, SCMFSA6A:55;
reconsider m = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))) as Element of NAT ;
A5:
dom (Directed I) = dom I
by FUNCT_4:105;
A6: (s +* I) +* (Directed I) =
s +* (I +* (Directed I))
by FUNCT_4:15
.=
s +* (Directed I)
by A5, FUNCT_4:20
.=
(s +* (Initialized (I ';' J))) +* (Directed I)
by A2, LATTICE2:8
.=
s +* ((Initialized (I ';' J)) +* (Directed I))
by FUNCT_4:15
.=
s +* (Initialized (I ';' J))
by A4, LATTICE2:8, XBOOLE_1:1
.=
s
by A2, LATTICE2:8
;
then A7:
Directed I c= s
by FUNCT_4:26;
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 A8:
dom (Initialized J) c= the carrier of SCM+FSA
by AMI_1:79;
A9:
ProgramPart (Relocated J,(card I)) c= I ';' J
by FUNCT_4:26;
(I ';' J) +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 ))) c= s
by A2, FUNCT_4:15;
then A10:
((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )) c= s
by A1, XBOOLE_1:1;
A11:
Initialized I c= s +* I
by A2, SCMFSA6A:52;
then A12:
ProgramPart (s +* I) halts_on s +* I
by Th5;
hence A13:
IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I)
by A10, A6, Th21, FUNCT_4:26; ( 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 keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
A20:
J +* (Start-At (insloc 0 )) c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by FUNCT_4:26, SCMFSA6B:8;
A21:
ProgramPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) halts_on (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by Th5, FUNCT_4:26;
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 A8, 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 ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) = (DataPart (Computation (s +* I),(LifeSpan (s +* I)))) +* (DataPart (Initialized J)) & DataPart (Initialized J) c= DataPart (Computation (s +* I),(LifeSpan (s +* I))) )
by A14, FUNCT_4:75, GRFUNC_1:8;
then A22:
DataPart (Computation (s +* I),(LifeSpan (s +* I))) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by LATTICE2:8;
s +* I =
(s +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )))) +* I
by A10, FUNCT_4:79
.=
(s +* I) +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )))
by Th19
.=
s +* (I +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 ))))
by FUNCT_4:15
.=
s +* (Initialized I)
by FUNCT_4:15
;
then X:
DataPart (Computation s,(LifeSpan (s +* I))) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by A3, A12, A22, Th24, SCMFSA6A:39;
ProgramPart (s +* I) halts_on s +* I
by A11, A10, A7, Th5;
hence A23:
DataPart (Computation s,((LifeSpan (s +* I)) + 1)) = DataPart ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by A11, A10, A7, Th5, Th22, X; ( 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 keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
I ';' J c= Initialized (I ';' J)
by SCMFSA6A:26;
then
I ';' J c= s
by A2, XBOOLE_1:1;
then
ProgramPart (Relocated J,(card I)) c= s
by A9, XBOOLE_1:1;
then A24:
[(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 keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
A25:
intloc 0 in dom (Initialized J)
by SCMFSA6A:45;
intloc 0 in Int-Locations
by SCMFSA_2:9;
then A26:
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 A23, FUNCT_1:72, SCMFSA_2:127
.=
((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) . (intloc 0 )
by A26, FUNCT_1:72, SCMFSA_2:127
.=
(Initialized J) . (intloc 0 )
by A25, 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 keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
A27:
Initialized J c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by FUNCT_4:26;
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 A13, A23, A24, Th12;
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 A28: CurInstr (Computation s,m) =
IncAddr (halt SCM+FSA ),(card I)
by A21, AMI_1:def 46
.=
halt SCM+FSA
by SCMFSA_4:8
;
hence A29:
ProgramPart s halts_on s
by AMI_1:146; ( LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J))) & ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 ) )
A30:
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 A31:
k < LifeSpan ((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J))
by XREAL_1:8;
assume A32:
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 A13, A23, A27, A24, Th12
.=
halt SCM+FSA
by A32, 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 A21, A31, 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 A35:
LifeSpan s = m
by A28, A29, AMI_1:def 46;
s +* I = s +* (Initialized I)
by A2, SCMFSA6A:51;
then
Initialized I c= s +* I
by FUNCT_4:26;
then
ProgramPart (s +* I) halts_on s +* I
by Th5;
hence
LifeSpan s = ((LifeSpan (s +* I)) + 1) + (LifeSpan ((Result (s +* I)) +* (Initialized J)))
by A35, Th5, AMI_1:122; ( J is keeping_0 implies (Result s) . (intloc 0 ) = 1 )
A36:
Initialized J c= (Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)
by FUNCT_4:26;
hereby verum
A37:
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 A13, A23, A27, A24, Th12;
assume A38:
J is
keeping_0
;
(Result s) . (intloc 0 ) = 1thus (Result s) . (intloc 0 ) =
(Computation s,m) . (intloc 0 )
by A29, A35, 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 A37, SCMFSA6A:38
.=
((Computation (s +* I),(LifeSpan (s +* I))) +* (Initialized J)) . (intloc 0 )
by A20, A38, SCMFSA6B:def 4
.=
(Initialized J) . (intloc 0 )
by A25, A36, GRFUNC_1:8
.=
1
by SCMFSA6A:46
;
verum
end;