set i1 = (F4(),F5()) <>0_goto 2;
set i2 = goto ((card F3()) + 2);
set i3 = goto (- ((card F3()) + 2));
set WHL = while<>0 (F4(),F5(),F3());
set pWH = 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, Th16; :: 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 COMPOS_1:135;
A15: dom (ProgramPart t) = NAT by COMPOS_1:34;
A16: while<>0 (F4(),F5(),F3()) = ((F4(),F5()) <>0_goto 2) ';' (((goto ((card F3()) + 2)) ';' F3()) ';' (goto (- ((card F3()) + 2)))) by Lm10;
A17: not DataLoc ((F2() . F4()),F5()) in dom (Initialize (stop (while<>0 (F4(),F5(),F3())))) by SCMPDS_4:31;
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);
I2: (Initialize t) +* (stop F3()) = t +* (Initialize (stop F3())) by COMPOS_1:125;
I3: (Initialize t) +* (stop (while<>0 (F4(),F5(),F3()))) = t +* (Initialize (stop (while<>0 (F4(),F5(),F3())))) by COMPOS_1:125;
A18: Initialize (stop F3()) c= (Initialize t) +* (stop F3()) by I2, 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 l2 = (card F3()) + 2;
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()) + 2 < (card F3()) + 3 by XREAL_1:8;
then A20: (card F3()) + 2 in dom (while<>0 (F4(),F5(),F3())) by Th13;
( 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 I3, 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(),2) c= while<>0 (F4(),F5(),F3()) by Lm11;
then Shift (F3(),2) c= (Initialize t) +* (stop (while<>0 (F4(),F5(),F3()))) by A21, XBOOLE_1:1;
then A22: Shift (F3(),2) 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 EXTPRO_1:4
.= Following ((ProgramPart ((Initialize t) +* (stop (while<>0 (F4(),F5(),F3()))))),((Initialize t) +* (stop (while<>0 (F4(),F5(),F3()))))) by EXTPRO_1:3
.= Exec (((F4(),F5()) <>0_goto 2),((Initialize t) +* (stop (while<>0 (F4(),F5(),F3()))))) by A16, I3, SCMPDS_6:22 ;
A24: DataPart ((Initialize t) +* (stop F3())) = DataPart ((Initialize t) +* (stop (while<>0 (F4(),F5(),F3())))) by COMPOS_1:138, FUNCT_7:134;
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:67 ; :: 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;
I4: (Initialize ((Initialize t) +* (stop F3()))) +* (stop F3()) = ((Initialize t) +* (stop F3())) +* (Initialize (stop F3())) by COMPOS_1:125;
(Initialize t) +* (stop F3()) = (Initialize ((Initialize t) +* (stop F3()))) +* (stop F3()) by A18, I4, 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, I3, FUNCT_4:12
.= t . (DataLoc ((F2() . F4()),F5())) by A17, I3, 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)) = ICplusConst (((Initialize t) +* (stop (while<>0 (F4(),F5(),F3())))),2) by A10, A23, SCMPDS_2:67
.= 0 + 2 by A19, SCMPDS_6:23 ;
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()) + 2 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 EXTPRO_1:5;
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()) + 2) 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()) + 2) by AMI_1:54
.= ((Initialize t) +* (stop (while<>0 (F4(),F5(),F3())))) . ((card F3()) + 2) by AMI_1:54
.= (while<>0 (F4(),F5(),F3())) . ((card F3()) + 2) by A20, A21, GRFUNC_1:8
.= goto (- ((card F3()) + 2)) by Th15 ;
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 EXTPRO_1:4
.= Exec ((goto (- ((card F3()) + 2))),(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()) + 2))) 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, EXTPRO_1:23
.= 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()) + 2))) = 0 by SCMPDS_2:21;
then InsCode (goto (- ((card F3()) + 2))) 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, SCMPDS_8:3
.= Dstate (IExec (F3(),t)) by A39, A34, SCMPDS_8:2 ;
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, EXTPRO_1:23
.= 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, EXTPRO_1:5 ;
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, EXTPRO_1:3; :: 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))) + 2 = 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 + 2 by A48, t, EXTPRO_1:5;
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 + 2 < ((card F3()) + 1) + 2 by XREAL_1:8;
(card F3()) + 3 < (card F3()) + 4 by XREAL_1:8;
then lm + 2 < (card F3()) + 4 by A50, XXREAL_0:2;
then lm + 2 < card (stop (while<>0 (F4(),F5(),F3()))) by Lm9;
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()) + 2 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;
reconsider nn = nn as Element of NAT by ORDINAL1:def 13;
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;
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, EXTPRO_1:5;
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, 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 EXTPRO_1:22;
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()));
A53: 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
A54: ( F1((Dstate t)) <= 0 & P1[ Dstate t] ) and
A55: 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 NAT_1:2;
then t . (DataLoc ((F2() . F4()),F5())) = 0 by A2, A54, XXREAL_0:1;
hence ( while<>0 (F4(),F5(),F3()) is_closed_on t & while<>0 (F4(),F5(),F3()) is_halting_on t ) by A55, Th16; :: thesis: verum
end;
for k being Element of NAT holds S1[k] from NAT_1:sch 1(A53, 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