let s be State of ; for I, J being Program of st I c= J & I is_closed_on s & I is_halting_on s & not CurInstr (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = halt SCMPDS holds
IC (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = inspos (card I)
let I, J be Program of ; ( I c= J & I is_closed_on s & I is_halting_on s & not CurInstr (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = halt SCMPDS implies IC (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = inspos (card I) )
set IsI = Initialized (stop I);
set ss = s +* (Initialized (stop I));
set m = LifeSpan (s +* (Initialized (stop I)));
set s0 = s +* (Initialized J);
set s1 = Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))));
set s2 = Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))));
set Ik = IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I)))));
assume that
A1:
I c= J
and
A2:
I is_closed_on s
and
A3:
I is_halting_on s
; ( CurInstr (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = halt SCMPDS or IC (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = inspos (card I) )
A4:
dom I c= dom J
by A1, GRFUNC_1:8;
reconsider n = IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))) as Element of NAT by ORDINAL1:def 13;
A5:
stop I c= Initialized (stop I)
by SCMPDS_4:9;
Initialized (stop I) c= s +* (Initialized (stop I))
by FUNCT_4:26;
then A6:
stop I c= s +* (Initialized (stop I))
by A5, XBOOLE_1:1;
A7:
ProgramPart (s +* (Initialized (stop I))) halts_on s +* (Initialized (stop I))
by A3, SCMPDS_6:def 3;
A8:
IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))) in dom (stop I)
by A2, SCMPDS_6:def 2;
card (stop I) = (card I) + 1
by SCMPDS_5:7;
then
n < (card I) + 1
by A8, SCMPDS_4:1;
then A9:
n <= card I
by INT_1:20;
A10:
IC (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I)))))
by A1, A2, A3, Th39, AMI_1:121;
now per cases
( n < card I or n = card I )
by A9, XXREAL_0:1;
case
n < card I
;
halt SCMPDS = CurInstr (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I)))))then A11:
inspos n in dom I
by SCMPDS_4:1;
thus halt SCMPDS =
CurInstr (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I)))))
by A7, AMI_1:def 46
.=
(s +* (Initialized (stop I))) . (IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))))
by AMI_1:54
.=
(stop I) . (IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))))
by A8, A6, GRFUNC_1:8
.=
I . (IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))))
by A11, SCMPDS_4:37
.=
J . (IC (Computation (s +* (Initialized (stop I))),(LifeSpan (s +* (Initialized (stop I))))))
by A1, A11, GRFUNC_1:8
.=
(s +* (Initialized J)) . (IC (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))))
by A4, A10, A11, Th10
.=
CurInstr (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I)))))
by AMI_1:54
;
verum end; end; end;
hence
( CurInstr (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = halt SCMPDS or IC (Computation (s +* (Initialized J)),(LifeSpan (s +* (Initialized (stop I))))) = inspos (card I) )
; verum