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