set i1 = F4(),F5() <=0_goto ((card F3()) + 2);
set i2 = goto (- ((card F3()) + 1));
set WHL = while>0 F4(),F5(),F3();
set pWHL = stop (while>0 F4(),F5(),F3());
set pI = stop F3();
set b = DataLoc (F2() . F4()),F5();
defpred S1[ Element of NAT ] means for t being State of SCMPDS st F1((Dstate t)) <= $1 & P1[ Dstate t] & t . F4() = F2() . F4() holds
( while>0 F4(),F5(),F3() is_closed_on t & while>0 F4(),F5(),F3() is_halting_on t );
A5: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; :: thesis: ( S1[k] implies S1[k + 1] )
assume A6: S1[k] ; :: thesis: S1[k + 1]
now
let t be State of SCMPDS ; :: thesis: ( F1((Dstate t)) <= k + 1 & P1[ Dstate t] & t . F4() = F2() . F4() implies ( while>0 F4(),F5(),F3() is_closed_on b1 & while>0 F4(),F5(),F3() is_halting_on b1 ) )
assume A7: F1((Dstate t)) <= k + 1 ; :: thesis: ( P1[ Dstate t] & t . F4() = F2() . F4() implies ( while>0 F4(),F5(),F3() is_closed_on b1 & while>0 F4(),F5(),F3() is_halting_on b1 ) )
assume A8: P1[ Dstate t] ; :: thesis: ( t . F4() = F2() . F4() implies ( while>0 F4(),F5(),F3() is_closed_on b1 & while>0 F4(),F5(),F3() is_halting_on b1 ) )
assume A9: t . F4() = F2() . F4() ; :: thesis: ( while>0 F4(),F5(),F3() is_closed_on b1 & while>0 F4(),F5(),F3() is_halting_on b1 )
per cases ( t . (DataLoc (F2() . F4()),F5()) <= 0 or t . (DataLoc (F2() . F4()),F5()) > 0 ) ;
suppose t . (DataLoc (F2() . F4()),F5()) <= 0 ; :: thesis: ( while>0 F4(),F5(),F3() is_closed_on b1 & while>0 F4(),F5(),F3() is_halting_on b1 )
hence ( while>0 F4(),F5(),F3() is_closed_on t & while>0 F4(),F5(),F3() is_halting_on t ) by A9, Th20; :: thesis: verum
end;
suppose A10: t . (DataLoc (F2() . F4()),F5()) > 0 ; :: thesis: ( while>0 F4(),F5(),F3() is_closed_on b1 & while>0 F4(),F5(),F3() is_halting_on b1 )
A11: dom (ProgramPart t) = NAT by COMPOS_1:34;
A12: not F4() in dom (t | NAT ) by A11, SCMPDS_2:53;
A13: (IExec F3(),t) . F4() = t . F4() by A4, A8, A9, A10;
A14: 0 in dom (stop (while>0 F4(),F5(),F3())) by SCMPDS_4:75;
A15: dom (ProgramPart t) = NAT by COMPOS_1:34;
A16: not DataLoc (F2() . F4()),F5() in dom (Initialize (stop (while>0 F4(),F5(),F3()))) by SCMPDS_4:31;
A17: while>0 F4(),F5(),F3() = (F4(),F5() <=0_goto ((card F3()) + 2)) ';' (F3() ';' (goto (- ((card F3()) + 1)))) by SCMPDS_4:51;
I1: (Initialize t) +* (stop F3()) = t +* (Initialize (stop F3())) by SCMPDS_4:5;
I2: (Initialize t) +* (stop (while>0 F4(),F5(),F3())) = t +* (Initialize (stop (while>0 F4(),F5(),F3()))) by SCMPDS_4:5;
set t2 = (Initialize t) +* (stop F3());
set t3 = (Initialize t) +* (stop (while>0 F4(),F5(),F3()));
set t4 = Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1;
A18: Initialize (stop F3()) c= (Initialize t) +* (stop F3()) by I1, FUNCT_4:26;
set m2 = LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()));
set t5 = Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())));
set l1 = (card F3()) + 1;
A19: IC ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) = 0 by SCMPDS_6:21;
set m3 = (LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1;
set t6 = Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1);
set t7 = Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1);
(card F3()) + 1 < (card F3()) + 2 by XREAL_1:8;
then A20: (card F3()) + 1 in dom (while>0 F4(),F5(),F3()) by Th18;
( while>0 F4(),F5(),F3() c= Initialize (stop (while>0 F4(),F5(),F3())) & Initialize (stop (while>0 F4(),F5(),F3())) c= (Initialize t) +* (stop (while>0 F4(),F5(),F3())) ) by I2, FUNCT_4:26, SCMPDS_6:17;
then A21: while>0 F4(),F5(),F3() c= (Initialize t) +* (stop (while>0 F4(),F5(),F3())) by XBOOLE_1:1;
Shift F3(),1 c= while>0 F4(),F5(),F3() by Lm4;
then Shift F3(),1 c= (Initialize t) +* (stop (while>0 F4(),F5(),F3())) by A21, XBOOLE_1:1;
then A22: Shift F3(),1 c= Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1 by AMI_1:81;
A23: Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(0 + 1) = Following (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),0 ) by AMI_1:14
.= Following (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) by AMI_1:13
.= Exec (F4(),F5() <=0_goto ((card F3()) + 2)),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) by A17, I2, SCMPDS_6:22 ;
A24: DataPart ((Initialize t) +* (stop F3())) = DataPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) by FUNCT_7:134, SCMPDS_4:24;
now
let a be Int_position ; :: thesis: ((Initialize t) +* (stop F3())) . a = (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) . a
thus ((Initialize t) +* (stop F3())) . a = ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) . a by A24, SCMPDS_4:23
.= (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) . a by A23, SCMPDS_2:68 ; :: thesis: verum
end;
then A25: DataPart ((Initialize t) +* (stop F3())) = DataPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) by SCMPDS_4:23;
F3() is_halting_on t by A4, A8, A9, A10;
then A26: ProgramPart ((Initialize t) +* (stop F3())) halts_on (Initialize t) +* (stop F3()) by SCMPDS_6:def 3;
I3: (Initialize ((Initialize t) +* (stop F3()))) +* (stop F3()) = ((Initialize t) +* (stop F3())) +* (Initialize (stop F3())) by SCMPDS_4:5;
(Initialize t) +* (stop F3()) = (Initialize ((Initialize t) +* (stop F3()))) +* (stop F3()) by A18, I3, FUNCT_4:79;
then ProgramPart ((Initialize ((Initialize t) +* (stop F3()))) +* (stop F3())) halts_on (Initialize ((Initialize t) +* (stop F3()))) +* (stop F3()) by A26;
then A27: F3() is_halting_on (Initialize t) +* (stop F3()) by SCMPDS_6:def 3;
A28: IExec F3(),t = (Result (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) +* (t | NAT ) by SCMPDS_4:def 8;
A29: P1[ Dstate (IExec F3(),t)] by A4, A8, A9, A10;
A30: F3() is_closed_on t by A4, A8, A9, A10;
then A31: F3() is_closed_on (Initialize t) +* (stop F3()) by SCMPDS_6:38;
not F4() in dom (Initialize (stop (while>0 F4(),F5(),F3()))) by SCMPDS_4:31;
then ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) . (DataLoc (((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) . F4()),F5()) = ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) . (DataLoc (F2() . F4()),F5()) by A9, I2, FUNCT_4:12
.= t . (DataLoc (F2() . F4()),F5()) by A16, I2, FUNCT_4:12 ;
then A32: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) = succ (IC ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))) by A10, A23, SCMPDS_2:68
.= 0 + 1 by A19 ;
then A33: IC (Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())))) = (card F3()) + 1 by A1, A18, A27, A31, A25, A22, SCMPDS_7:36;
Y: (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1))) /. (IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1))) = (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)) . (IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1))) by COMPOS_1:38;
ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) = ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) by AMI_1:123;
then A34: Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) = Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) by AMI_1:51;
then A35: CurInstr (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1))),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)) = (Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())))) . ((card F3()) + 1) by A1, A18, A27, A31, A32, A25, A22, Y, SCMPDS_7:36
.= (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) . ((card F3()) + 1) by AMI_1:54
.= ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) . ((card F3()) + 1) by AMI_1:54
.= (while>0 F4(),F5(),F3()) . ((card F3()) + 1) by A20, A21, GRFUNC_1:8
.= goto (- ((card F3()) + 1)) by Th19 ;
T: ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) = ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)) by AMI_1:123;
A36: Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1) = Following (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)) by AMI_1:14
.= Exec (goto (- ((card F3()) + 1))),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)) by A35, T ;
then IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1)) = ICplusConst (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)),(0 - ((card F3()) + 1)) by SCMPDS_2:66
.= 0 by A33, A34, SCMPDS_7:1 ;
then A37: (Initialize (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1))) +* (stop (while>0 F4(),F5(),F3())) = Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1) by SCMPDS_7:37;
A38: DataPart (Comput (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())))) = DataPart (Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())))) by A1, A18, A27, A31, A32, A25, A22, SCMPDS_7:36;
then A39: DataPart (Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())))) = DataPart (Result (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) by A26, AMI_1:122
.= DataPart ((Result (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) +* (t | NAT )) by A15, AMI_2:29, FUNCT_4:76, SCMPDS_2:100
.= DataPart (IExec F3(),t) by SCMPDS_4:def 8 ;
InsCode (goto (- ((card F3()) + 1))) = 0 by SCMPDS_2:21;
then InsCode (goto (- ((card F3()) + 1))) in {0 ,4,5,6} by ENUMSET1:def 2;
then A40: Dstate (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1)) = Dstate (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)) by A36, Th3
.= Dstate (IExec F3(),t) by A39, A34, Th2 ;
A41: now
F1((Dstate (IExec F3(),t))) < F1((Dstate t)) by A4, A8, A9, A10;
then A42: F1((Dstate (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1)))) < k + 1 by A7, A40, XXREAL_0:2;
assume F1((Dstate (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1)))) > k ; :: thesis: contradiction
hence contradiction by A42, INT_1:20; :: thesis: verum
end;
A43: (Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())))) . F4() = (Comput (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())),(LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())))) . F4() by A38, SCMPDS_4:23
.= (Result (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) . F4() by A26, AMI_1:122
.= F2() . F4() by A9, A13, A28, A12, FUNCT_4:12 ;
T1: ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) = ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) by AMI_1:123;
A44: (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1)) . F4() = (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1)) . F4() by A36, SCMPDS_2:66
.= F2() . F4() by A43, T1, AMI_1:51 ;
then A45: while>0 F4(),F5(),F3() is_closed_on Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1) by A6, A29, A40, A41;
now
let k be Element of NAT ; :: thesis: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),b1) in dom (stop (while>0 F4(),F5(),F3()))
per cases ( k < ((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1 or k >= ((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1 ) ;
suppose k < ((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1 ; :: thesis: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),b1) in dom (stop (while>0 F4(),F5(),F3()))
then A46: k <= (LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1 by INT_1:20;
hereby :: thesis: verum
per cases ( k <= LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())) or k = (LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1 ) by A46, NAT_1:8;
suppose A47: k <= LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())) ; :: thesis: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3()))
hereby :: thesis: verum
per cases ( k = 0 or k <> 0 ) ;
suppose k = 0 ; :: thesis: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3()))
hence IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3())) by A14, A19, AMI_1:13; :: thesis: verum
end;
suppose k <> 0 ; :: thesis: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3()))
then consider kn being Nat such that
A48: k = kn + 1 by NAT_1:6;
reconsider kn = kn as Element of NAT by ORDINAL1:def 13;
reconsider lm = IC (Comput (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())),kn) as Element of NAT ;
t: ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) = ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1) by AMI_1:123;
kn < k by A48, XREAL_1:31;
then kn < LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())) by A47, XXREAL_0:2;
then (IC (Comput (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())),kn)) + 1 = IC (Comput (ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1)),(Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),1),kn) by A1, A18, A27, A31, A32, A25, A22, SCMPDS_7:34;
then A49: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) = lm + 1 by A48, t, AMI_1:51;
IC (Comput (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3())),kn) in dom (stop F3()) by A30, SCMPDS_6:def 2;
then lm < card (stop F3()) by AFINSQ_1:70;
then lm < (card F3()) + 1 by SCMPDS_5:7;
then A50: lm + 1 <= (card F3()) + 1 by INT_1:20;
(card F3()) + 1 < (card F3()) + 3 by XREAL_1:8;
then lm + 1 < (card F3()) + 3 by A50, XXREAL_0:2;
then lm + 1 < card (stop (while>0 F4(),F5(),F3())) by Lm3;
hence IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3())) by A49, AFINSQ_1:70; :: thesis: verum
end;
end;
end;
end;
suppose A51: k = (LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1 ; :: thesis: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3()))
(card F3()) + 1 in dom (stop (while>0 F4(),F5(),F3())) by A20, SCMPDS_6:18;
hence IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3())) by A1, A18, A27, A31, A32, A25, A22, A34, A51, SCMPDS_7:36; :: thesis: verum
end;
end;
end;
end;
suppose k >= ((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1 ; :: thesis: IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),b1) in dom (stop (while>0 F4(),F5(),F3()))
then consider nn being Nat such that
A52: k = (((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1) + nn by NAT_1:10;
T: ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) = ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1)) by AMI_1:123;
A53: nn in NAT by ORDINAL1:def 13;
then Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k = Comput (ProgramPart ((Initialize (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1))) +* (stop (while>0 F4(),F5(),F3())))),((Initialize (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1))) +* (stop (while>0 F4(),F5(),F3()))),nn by A37, A52, T, AMI_1:51;
hence IC (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),k) in dom (stop (while>0 F4(),F5(),F3())) by A45, A53, SCMPDS_6:def 2; :: thesis: verum
end;
end;
end;
hence while>0 F4(),F5(),F3() is_closed_on t by SCMPDS_6:def 2; :: thesis: while>0 F4(),F5(),F3() is_halting_on t
while>0 F4(),F5(),F3() is_halting_on Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1) by A6, A29, A44, A40, A41;
then ProgramPart (Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1)) halts_on Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1) by A37, SCMPDS_6:def 3;
then ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) halts_on Comput (ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3())))),((Initialize t) +* (stop (while>0 F4(),F5(),F3()))),(((LifeSpan (ProgramPart ((Initialize t) +* (stop F3()))),((Initialize t) +* (stop F3()))) + 1) + 1) by AMI_1:123;
then ProgramPart ((Initialize t) +* (stop (while>0 F4(),F5(),F3()))) halts_on (Initialize t) +* (stop (while>0 F4(),F5(),F3())) by AMI_1:93;
hence while>0 F4(),F5(),F3() is_halting_on t by SCMPDS_6:def 3; :: thesis: verum
end;
end;
end;
hence S1[k + 1] ; :: thesis: verum
end;
set n = F1((Dstate F2()));
thus ( F1(F2()) = F1(F2()) or P1[F2()] ) ; :: thesis: ( while>0 F4(),F5(),F3() is_closed_on F2() & while>0 F4(),F5(),F3() is_halting_on F2() )
A54: S1[ 0 ]
proof
let t be State of SCMPDS ; :: thesis: ( F1((Dstate t)) <= 0 & P1[ Dstate t] & t . F4() = F2() . F4() implies ( while>0 F4(),F5(),F3() is_closed_on t & while>0 F4(),F5(),F3() is_halting_on t ) )
assume that
A55: F1((Dstate t)) <= 0 and
A56: P1[ Dstate t] and
A57: t . F4() = F2() . F4() ; :: thesis: ( while>0 F4(),F5(),F3() is_closed_on t & while>0 F4(),F5(),F3() is_halting_on t )
F1((Dstate t)) = 0 by A55;
then t . (DataLoc (F2() . F4()),F5()) <= 0 by A2, A56;
hence ( while>0 F4(),F5(),F3() is_closed_on t & while>0 F4(),F5(),F3() is_halting_on t ) by A57, Th20; :: thesis: verum
end;
for k being Element of NAT holds S1[k] from NAT_1:sch 1(A54, A5);
then S1[F1((Dstate F2()))] ;
hence ( while>0 F4(),F5(),F3() is_closed_on F2() & while>0 F4(),F5(),F3() is_halting_on F2() ) by A3; :: thesis: verum