let s be State of ; for I being InitClosed Program of st ProgramPart (s +* I) halts_on s +* I & Directed I c= s & ((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )) c= s holds
IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I)
set A = NAT ;
let I be InitClosed Program of ; ( ProgramPart (s +* I) halts_on s +* I & Directed I c= s & ((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )) c= s implies IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I) )
assume that
A1:
ProgramPart (s +* I) halts_on s +* I
and
A2:
Directed I c= s
and
A3:
((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )) c= s
; IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I)
set sISA0 = s +* (I +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 ))));
A4:
Initialized I c= s +* (I +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 ))))
by A3, Th20;
set IAt = I +* (Start-At (insloc 0 ));
dom I misses dom (Start-At (insloc 0 ))
by SF_MASTR:64;
then
I c= I +* (Start-At (insloc 0 ))
by FUNCT_4:33;
then A5:
dom I c= dom (I +* (Start-At (insloc 0 )))
by GRFUNC_1:8;
A6:
s +* (I +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )))) = s +* I
by A3, Th20;
reconsider sISA0 = s +* (I +* (((intloc 0 ) .--> 1) +* (Start-At (insloc 0 )))) as State of ;
set m = LifeSpan sISA0;
set l1 = IC (Computation sISA0,(LifeSpan sISA0));
A7:
IC (Computation sISA0,(LifeSpan sISA0)) in dom I
by A4, Def1;
set s2 = sISA0 +* (Directed I);
A8:
now set s1 =
sISA0 +* (I ';' I);
let k be
Element of
NAT ;
( k <= LifeSpan sISA0 implies Computation sISA0,k, Computation (sISA0 +* (Directed I)),k equal_outside NAT )defpred S1[
Element of
NAT ]
means ( $1
<= k implies
Computation (sISA0 +* (I ';' I)),$1,
Computation (sISA0 +* (Directed I)),$1
equal_outside NAT );
assume A9:
k <= LifeSpan sISA0
;
Computation sISA0,k, Computation (sISA0 +* (Directed I)),k equal_outside NAT A10:
for
n being
Element of
NAT st
S1[
n] holds
S1[
n + 1]
proof
let n be
Element of
NAT ;
( S1[n] implies S1[n + 1] )
assume A11:
(
n <= k implies
Computation (sISA0 +* (I ';' I)),
n,
Computation (sISA0 +* (Directed I)),
n equal_outside NAT )
;
S1[n + 1]
A12:
Computation (sISA0 +* (Directed I)),
(n + 1) =
Following (Computation (sISA0 +* (Directed I)),n)
by AMI_1:14
.=
Exec (CurInstr (Computation (sISA0 +* (Directed I)),n)),
(Computation (sISA0 +* (Directed I)),n)
;
A13:
Computation (sISA0 +* (I ';' I)),
(n + 1) =
Following (Computation (sISA0 +* (I ';' I)),n)
by AMI_1:14
.=
Exec (CurInstr (Computation (sISA0 +* (I ';' I)),n)),
(Computation (sISA0 +* (I ';' I)),n)
;
A14:
n <= n + 1
by NAT_1:12;
assume A15:
n + 1
<= k
;
Computation (sISA0 +* (I ';' I)),(n + 1), Computation (sISA0 +* (Directed I)),(n + 1) equal_outside NAT
then A16:
IC (Computation (sISA0 +* (I ';' I)),n) = IC (Computation (sISA0 +* (Directed I)),n)
by A11, A14, AMI_1:121, XXREAL_0:2;
n <= k
by A15, A14, XXREAL_0:2;
then
n <= LifeSpan sISA0
by A9, XXREAL_0:2;
then
IC (Computation sISA0,n) = IC (Computation (sISA0 +* (I ';' I)),n)
by A1, A4, A6, Th18, AMI_1:121;
then A17:
IC (Computation (sISA0 +* (I ';' I)),n) in dom I
by A4, Def1;
then A18:
IC (Computation (sISA0 +* (Directed I)),n) in dom (Directed I)
by A16, FUNCT_4:105;
A19:
CurInstr (Computation (sISA0 +* (Directed I)),n) =
(sISA0 +* (Directed I)) . (IC (Computation (sISA0 +* (Directed I)),n))
by AMI_1:54
.=
(Directed I) . (IC (Computation (sISA0 +* (Directed I)),n))
by A18, FUNCT_4:14
;
(
dom I c= dom (I ';' I) &
CurInstr (Computation (sISA0 +* (I ';' I)),n) = (sISA0 +* (I ';' I)) . (IC (Computation (sISA0 +* (I ';' I)),n)) )
by AMI_1:54, SCMFSA6A:56;
then
(
Directed I c= I ';' I &
CurInstr (Computation (sISA0 +* (I ';' I)),n) = (I ';' I) . (IC (Computation (sISA0 +* (I ';' I)),n)) )
by A17, FUNCT_4:14, SCMFSA6A:55;
then
CurInstr (Computation (sISA0 +* (I ';' I)),n) = (Directed I) . (IC (Computation (sISA0 +* (I ';' I)),n))
by A16, A18, GRFUNC_1:8;
hence
Computation (sISA0 +* (I ';' I)),
(n + 1),
Computation (sISA0 +* (Directed I)),
(n + 1) equal_outside NAT
by A11, A15, A14, A16, A19, A13, A12, SCMFSA6A:32, XXREAL_0:2;
verum
end;
(
Computation (sISA0 +* (I ';' I)),
0 = sISA0 +* (I ';' I) &
Computation (sISA0 +* (Directed I)),
0 = sISA0 +* (Directed I) )
by AMI_1:13;
then
Computation (sISA0 +* (Directed I)),
0 ,
Computation (sISA0 +* (I ';' I)),
0 equal_outside NAT
by FUNCT_7:107, SCMFSA6A:42;
then A20:
S1[
0 ]
by FUNCT_7:28;
for
n being
Element of
NAT holds
S1[
n]
from NAT_1:sch 1(A20, A10);
then A21:
Computation (sISA0 +* (I ';' I)),
k,
Computation (sISA0 +* (Directed I)),
k equal_outside NAT
;
Computation sISA0,
k,
Computation (sISA0 +* (I ';' I)),
k equal_outside NAT
by A1, A4, A6, A9, Th18;
hence
Computation sISA0,
k,
Computation (sISA0 +* (Directed I)),
k equal_outside NAT
by A21, FUNCT_7:29;
verum end;
then A22:
IC (Computation sISA0,(LifeSpan sISA0)) = IC (Computation (sISA0 +* (Directed I)),(LifeSpan sISA0))
by AMI_1:121;
I +* (Start-At (insloc 0 )) c= Initialized I
by Th6;
then
I +* (Start-At (insloc 0 )) c= sISA0
by A4, XBOOLE_1:1;
then
sISA0 . (IC (Computation sISA0,(LifeSpan sISA0))) = (I +* (Start-At (insloc 0 ))) . (IC (Computation sISA0,(LifeSpan sISA0)))
by A7, A5, GRFUNC_1:8;
then A23: I . (IC (Computation sISA0,(LifeSpan sISA0))) =
sISA0 . (IC (Computation sISA0,(LifeSpan sISA0)))
by A7, SCMFSA6B:7
.=
CurInstr (Computation sISA0,(LifeSpan sISA0))
by AMI_1:54
.=
halt SCM+FSA
by A1, A6, AMI_1:def 46
;
IC (Computation (sISA0 +* (Directed I)),(LifeSpan sISA0)) in dom I
by A8, A7, AMI_1:121;
then
IC (Computation (sISA0 +* (Directed I)),(LifeSpan sISA0)) in dom (Directed I)
by FUNCT_4:105;
then A24: (sISA0 +* (Directed I)) . (IC (Computation sISA0,(LifeSpan sISA0))) =
(Directed I) . (IC (Computation sISA0,(LifeSpan sISA0)))
by A22, FUNCT_4:14
.=
goto (insloc (card I))
by A7, A23, FUNCT_4:112
;
Computation (sISA0 +* (Directed I)),((LifeSpan sISA0) + 1) =
Following (Computation (sISA0 +* (Directed I)),(LifeSpan sISA0))
by AMI_1:14
.=
Exec (goto (insloc (card I))),(Computation (sISA0 +* (Directed I)),(LifeSpan sISA0))
by A22, A24, AMI_1:54
;
then A25:
IC (Computation (sISA0 +* (Directed I)),((LifeSpan sISA0) + 1)) = insloc (card I)
by SCMFSA_2:95;
sISA0 +* (Directed I) =
s +* (Directed I)
by A3, Th20
.=
s
by A2, FUNCT_4:79
;
hence
IC (Computation s,((LifeSpan (s +* I)) + 1)) = insloc (card I)
by A3, A25, Th20; verum