let s be State of SCMPDS ; :: thesis: for I being Program of SCMPDS
for a being Int_position
for i being Integer st s . (DataLoc (s . a),i) = 0 holds
( while<>0 a,i,I is_closed_on s & while<>0 a,i,I is_halting_on s )
let I be Program of SCMPDS ; :: thesis: for a being Int_position
for i being Integer st s . (DataLoc (s . a),i) = 0 holds
( while<>0 a,i,I is_closed_on s & while<>0 a,i,I is_halting_on s )
let a be Int_position ; :: thesis: for i being Integer st s . (DataLoc (s . a),i) = 0 holds
( while<>0 a,i,I is_closed_on s & while<>0 a,i,I is_halting_on s )
let i be Integer; :: thesis: ( s . (DataLoc (s . a),i) = 0 implies ( while<>0 a,i,I is_closed_on s & while<>0 a,i,I is_halting_on s ) )
set b = DataLoc (s . a),i;
assume A1:
s . (DataLoc (s . a),i) = 0
; :: thesis: ( while<>0 a,i,I is_closed_on s & while<>0 a,i,I is_halting_on s )
set WHL = while<>0 a,i,I;
set pWH = stop (while<>0 a,i,I);
set iWH = Initialized (stop (while<>0 a,i,I));
set s3 = s +* (Initialized (stop (while<>0 a,i,I)));
set s4 = Computation (s +* (Initialized (stop (while<>0 a,i,I)))),1;
set s5 = Computation (s +* (Initialized (stop (while<>0 a,i,I)))),2;
set i1 = a,i <>0_goto 2;
set i2 = goto ((card I) + 2);
set i3 = goto (- ((card I) + 2));
A2:
IC (s +* (Initialized (stop (while<>0 a,i,I)))) = inspos 0
by SCMPDS_6:21;
A3:
while<>0 a,i,I = (a,i <>0_goto 2) ';' (((goto ((card I) + 2)) ';' I) ';' (goto (- ((card I) + 2))))
by Lm10;
A4: Computation (s +* (Initialized (stop (while<>0 a,i,I)))),(0 + 1) =
Following (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),0 )
by AMI_1:14
.=
Following (s +* (Initialized (stop (while<>0 a,i,I))))
by AMI_1:13
.=
Exec (a,i <>0_goto 2),(s +* (Initialized (stop (while<>0 a,i,I))))
by A3, SCMPDS_6:22
;
A5:
( not DataLoc (s . a),i in dom (Initialized (stop (while<>0 a,i,I))) & DataLoc (s . a),i in dom s )
by SCMPDS_2:49, SCMPDS_4:31;
( not a in dom (Initialized (stop (while<>0 a,i,I))) & a in dom s )
by SCMPDS_2:49, SCMPDS_4:31;
then A6: (s +* (Initialized (stop (while<>0 a,i,I)))) . (DataLoc ((s +* (Initialized (stop (while<>0 a,i,I)))) . a),i) =
(s +* (Initialized (stop (while<>0 a,i,I)))) . (DataLoc (s . a),i)
by FUNCT_4:12
.=
0
by A1, A5, FUNCT_4:12
;
A7:
Initialized (stop (while<>0 a,i,I)) c= s +* (Initialized (stop (while<>0 a,i,I)))
by FUNCT_4:26;
then A8:
stop (while<>0 a,i,I) c= Computation (s +* (Initialized (stop (while<>0 a,i,I)))),1
by AMI_1:81, SCMPDS_4:57;
A9:
inspos 1 in dom (while<>0 a,i,I)
by Th14;
then A10:
inspos 1 in dom (stop (while<>0 a,i,I))
by SCMPDS_6:18;
A11: IC (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),1) =
Next (IC (s +* (Initialized (stop (while<>0 a,i,I)))))
by A4, A6, SCMPDS_2:67
.=
inspos (0 + 1)
by A2
;
A12: (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),1) . (inspos 1) =
(stop (while<>0 a,i,I)) . (inspos 1)
by A8, A10, GRFUNC_1:8
.=
(while<>0 a,i,I) . (inspos 1)
by A9, SCMPDS_6:19
.=
goto ((card I) + 2)
by Th15
;
A13: Computation (s +* (Initialized (stop (while<>0 a,i,I)))),(1 + 1) =
Following (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),1)
by AMI_1:14
.=
Exec (goto ((card I) + 2)),(Computation (s +* (Initialized (stop (while<>0 a,i,I)))),1)
by A11, A12
;
A14:
stop (while<>0 a,i,I) c= Computation (s +* (Initialized (stop (while<>0 a,i,I)))),2
by A7, AMI_1:81, SCMPDS_4:57;
A15:
card (while<>0 a,i,I) = (card I) + 3
by Th12;
then A16:
inspos ((card I) + 3) in dom (stop (while<>0 a,i,I))
by SCMPDS_6:25;
A17: IC (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),2) =
ICplusConst (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),1),((card I) + 2)
by A13, SCMPDS_2:66
.=
inspos (((card I) + 2) + 1)
by A11, SCMPDS_6:23
.=
inspos ((card I) + (2 + 1))
;
(Computation (s +* (Initialized (stop (while<>0 a,i,I)))),2) . (inspos ((card I) + 3)) =
(stop (while<>0 a,i,I)) . (inspos ((card I) + 3))
by A14, A16, GRFUNC_1:8
.=
halt SCMPDS
by A15, SCMPDS_6:25
;
then A18:
CurInstr (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),2) = halt SCMPDS
by A17;
now let k be
Element of
NAT ;
:: thesis: IC (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),b1) in dom (stop (while<>0 a,i,I))
(
k = 0 or
0 < k )
by NAT_1:3;
then A19:
(
k = 0 or
0 + 1
<= k )
by INT_1:20;
per cases
( k = 0 or k = 1 or 1 < k )
by A19, XXREAL_0:1;
suppose
k = 0
;
:: thesis: IC (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),b1) in dom (stop (while<>0 a,i,I))then
Computation (s +* (Initialized (stop (while<>0 a,i,I)))),
k = s +* (Initialized (stop (while<>0 a,i,I)))
by AMI_1:13;
hence
IC (Computation (s +* (Initialized (stop (while<>0 a,i,I)))),k) in dom (stop (while<>0 a,i,I))
by A2, SCMPDS_4:75;
:: thesis: verum end; end; end;
hence
while<>0 a,i,I is_closed_on s
by SCMPDS_6:def 2; :: thesis: while<>0 a,i,I is_halting_on s
s +* (Initialized (stop (while<>0 a,i,I))) is halting
by A18, AMI_1:def 20;
hence
while<>0 a,i,I is_halting_on s
by SCMPDS_6:def 3; :: thesis: verum