let P be the Instructions of SCM+FSA -valued ManySortedSet of NAT ; :: thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being read-write Int-Location st I is_closed_onInit s,P & I is_halting_onInit s,P & s . a > 0 holds
( IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 & DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) )

let s be State of SCM+FSA; :: thesis: for I being Program of SCM+FSA
for a being read-write Int-Location st I is_closed_onInit s,P & I is_halting_onInit s,P & s . a > 0 holds
( IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 & DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) )

let I be Program of SCM+FSA; :: thesis: for a being read-write Int-Location st I is_closed_onInit s,P & I is_halting_onInit s,P & s . a > 0 holds
( IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 & DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) )

let a be read-write Int-Location ; :: thesis: ( I is_closed_onInit s,P & I is_halting_onInit s,P & s . a > 0 implies ( IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 & DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) ) )
set D = Data-Locations SCM+FSA;
set s0 = Initialized s;
set s1 = Initialize (Initialized s);
set P1 = P +* (while>0 (a,I));
set PI = P +* I;
set s2 = Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),1);
set i = a >0_goto 4;
set sI = Initialize (Initialized s);
A1: while>0 (a,I) c= P +* (while>0 (a,I)) by FUNCT_4:26;
defpred S1[ Nat] means ( $1 <= LifeSpan ((P +* I),(Initialize (Initialized s))) implies ( IC (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + $1))) = (IC (Comput ((P +* I),(Initialize (Initialized s)),$1))) + 4 & DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + $1))) = DataPart (Comput ((P +* I),(Initialize (Initialized s)),$1)) ) );
set loc4 = (card I) + 4;
set s3 = Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1));
A2: (card I) + 4 in dom (while>0 (a,I)) by SCMFSA_9:38;
assume A4: I is_closed_onInit s,P ; :: thesis: ( not I is_halting_onInit s,P or not s . a > 0 or ( IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 & DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) ) )
YY: Initialize (Initialized s) = (s +* (Initialize ((intloc 0) .--> 1))) +* (Start-At (0,SCM+FSA)) by SCMFSA6A:def 4
.= s +* ((Initialize ((intloc 0) .--> 1)) +* (Start-At (0,SCM+FSA))) by FUNCT_4:15
.= s +* (Initialize ((intloc 0) .--> 1)) by FUNCT_4:99 ;
now
let k be Element of NAT ; :: thesis: IC (Comput ((P +* I),(Initialize (Initialized s)),k)) in dom I
thus IC (Comput ((P +* I),(Initialize (Initialized s)),k)) in dom I by A4, YY, SCM_HALT:def 4; :: thesis: verum
end;
then A5: I is_closed_on Initialized s,P by SCMFSA7B:def 7;
assume I is_halting_onInit s,P ; :: thesis: ( not s . a > 0 or ( IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 & DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) ) )
then A6: P +* I halts_on s +* (Initialize ((intloc 0) .--> 1)) by SCM_HALT:def 5;
A7: I is_halting_on Initialized s,P by A6, YY, SCMFSA7B:def 8;
A8: now
let k be Element of NAT ; :: thesis: ( S1[k] implies S1[k + 1] )
assume A9: S1[k] ; :: thesis: S1[k + 1]
now
A10: k + 0 < k + 1 by XREAL_1:8;
assume k + 1 <= LifeSpan ((P +* I),(Initialize (Initialized s))) ; :: thesis: ( IC (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + k) + 1))) = (IC (Comput ((P +* I),(Initialize (Initialized s)),(k + 1)))) + 4 & DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + k) + 1))) = DataPart (Comput ((P +* I),(Initialize (Initialized s)),(k + 1))) )
then k < LifeSpan ((P +* I),(Initialize (Initialized s))) by A10, XXREAL_0:2;
hence ( IC (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + k) + 1))) = (IC (Comput ((P +* I),(Initialize (Initialized s)),(k + 1)))) + 4 & DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + k) + 1))) = DataPart (Comput ((P +* I),(Initialize (Initialized s)),(k + 1))) ) by A5, A7, A9, SCMFSA_9:44; :: thesis: verum
end;
hence S1[k + 1] ; :: thesis: verum
end;
0 in dom (while>0 (a,I)) by SCMFSA_9:10;
then A11: (P +* (while>0 (a,I))) . 0 = (while>0 (a,I)) . 0 by A1, GRFUNC_1:8
.= a >0_goto 4 by SCMFSA_9:11 ;
Start-At (0,SCM+FSA) c= Initialize (while>0 (a,I)) by FUNCT_4:26;
then uu: dom (Start-At (0,SCM+FSA)) c= dom (Initialize (while>0 (a,I))) by RELAT_1:25;
IC in dom (Start-At (0,SCM+FSA)) by COMPOS_1:52;
then A12: IC (Initialize (Initialized s)) = IC (Start-At (0,SCM+FSA)) by FUNCT_4:14
.= 0 by COMPOS_1:64 ;
A13: Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(0 + 1)) = Following ((P +* (while>0 (a,I))),(Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),0))) by EXTPRO_1:4
.= Following ((P +* (while>0 (a,I))),(Initialize (Initialized s))) by EXTPRO_1:3
.= Exec ((a >0_goto 4),(Initialize (Initialized s))) by A12, A11, PBOOLE:158 ;
then A14: for f being FinSeq-Location holds (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),1)) . f = (Initialize (Initialized s)) . f by SCMFSA_2:97;
for c being Int-Location holds (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),1)) . c = (Initialize (Initialized s)) . c by A13, SCMFSA_2:97;
then A15: DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),1)) = DataPart (Initialize (Initialized s)) by A14, SCMFSA6A:38
.= DataPart (Initialize (Initialized s)) ;
set s4 = Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1) + 1));
set s2 = Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))));
not a in dom (Initialize (while>0 (a,I))) by SCMFSA6B:12;
then not a in dom (Start-At (0,SCM+FSA)) by uu;
then A16: (Initialize (Initialized s)) . a = (Initialized s) . a by FUNCT_4:12;
assume s . a > 0 ; :: thesis: ( IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 & DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) )
then A17: (Initialized s) . a > 0 by SCMFSA6C:3;
A18: S1[ 0 ]
proof
assume 0 <= LifeSpan ((P +* I),(Initialize (Initialized s))) ; :: thesis: ( IC (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + 0))) = (IC (Comput ((P +* I),(Initialize (Initialized s)),0))) + 4 & DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + 0))) = DataPart (Comput ((P +* I),(Initialize (Initialized s)),0)) )
B19: IC in dom (Start-At (0,SCM+FSA)) by COMPOS_1:52;
IC (Comput ((P +* I),(Initialize (Initialized s)),0)) = IC (Initialize (Initialized s)) by EXTPRO_1:3
.= IC (Start-At (0,SCM+FSA)) by B19, FUNCT_4:14
.= 0 by COMPOS_1:64 ;
hence ( IC (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + 0))) = (IC (Comput ((P +* I),(Initialize (Initialized s)),0))) + 4 & DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + 0))) = DataPart (Comput ((P +* I),(Initialize (Initialized s)),0)) ) by A17, A13, A16, A15, EXTPRO_1:3, SCMFSA_2:97; :: thesis: verum
end;
for k being Element of NAT holds S1[k] from NAT_1:sch 1(A18, A8);
then A20: S1[ LifeSpan ((P +* I),(Initialize (Initialized s)))] ;
A21: Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1)) = Following ((P +* (while>0 (a,I))),(Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + (LifeSpan ((P +* I),(Initialize (Initialized s)))))))) by EXTPRO_1:4
.= Exec ((goto ((card I) + 4)),(Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + (LifeSpan ((P +* I),(Initialize (Initialized s)))))))) by A5, A7, A20, SCMFSA_9:45 ;
then A22: for f being FinSeq-Location holds (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1))) . f = (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))))) . f by SCMFSA_2:95;
A23: (P +* (while>0 (a,I))) . ((card I) + 4) = (while>0 (a,I)) . ((card I) + 4) by A2, A1, GRFUNC_1:8
.= goto 0 by SCMFSA_9:46 ;
A24: (P +* (while>0 (a,I))) /. (IC (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1)))) = (P +* (while>0 (a,I))) . (IC (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1)))) by PBOOLE:158;
A25: Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1) + 1)) = Following ((P +* (while>0 (a,I))),(Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1)))) by EXTPRO_1:4
.= Exec ((goto 0),(Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1)))) by A21, A23, A24, SCMFSA_2:95 ;
then A26: for f being FinSeq-Location holds (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1) + 1))) . f = (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1))) . f by SCMFSA_2:95;
for c being Int-Location holds (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1))) . c = (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))))) . c by A21, SCMFSA_2:95;
then A27: DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1))) = DataPart (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))))) by A22, SCMFSA6A:38;
A28: s +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized s) by SCMFSA8A:13;
Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3)) = Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1) + 1)) by A28;
hence IC (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0 by A25, SCMFSA_2:95; :: thesis: DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1)))))))
A32: Initialize (Initialized s) = s +* (Initialize ((intloc 0) .--> 1)) by SCMFSA8A:13;
for c being Int-Location holds (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),(((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1) + 1))) . c = (Comput ((P +* (while>0 (a,I))),(Initialize (Initialized s)),((1 + (LifeSpan ((P +* I),(Initialize (Initialized s))))) + 1))) . c by A25, SCMFSA_2:95;
hence DataPart (Comput ((P +* (while>0 (a,I))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) by A32, A20, A27, A26, SCMFSA6A:38; :: thesis: verum