let P be Instruction-Sequence of SCMPDS; for s being State of SCMPDS
for I being Program of SCMPDS
for a being Int_position
for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds
IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS))
let s be State of SCMPDS; for I being Program of SCMPDS
for a being Int_position
for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds
IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS))
let I be Program of SCMPDS; for a being Int_position
for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds
IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS))
let a be Int_position ; for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds
IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS))
let k1 be Integer; ( s . (DataLoc ((s . a),k1)) = 0 implies IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) )
set b = DataLoc ((s . a),k1);
assume A1:
s . (DataLoc ((s . a),k1)) = 0
; IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS))
set SAl = Start-At (((card I) + 2),SCMPDS);
set i = (a,k1) <>0_goto 2;
set j = goto ((card I) + 1);
set IF = if<>0 (a,k1,I);
set pIF = stop (if<>0 (a,k1,I));
set s3 = Initialize s;
set P3 = P +* (stop (if<>0 (a,k1,I)));
set s4 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1);
set s5 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2);
set P4 = P +* (stop (if<>0 (a,k1,I)));
set P5 = P +* (stop (if<>0 (a,k1,I)));
A3:
if<>0 (a,k1,I) = ((a,k1) <>0_goto 2) ';' ((goto ((card I) + 1)) ';' I)
by SCMPDS_4:16;
A4:
stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I)))
by FUNCT_4:25;
then A5:
stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I)))
;
A6:
stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I)))
by A4;
A7:
not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS))
by SCMPDS_4:18;
A8:
IC (Initialize s) = 0
by MEMSTR_0:47;
A9: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(0 + 1)) =
Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),0)))
by EXTPRO_1:3
.=
Following ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s))
by EXTPRO_1:2
.=
Exec (((a,k1) <>0_goto 2),(Initialize s))
by A3, Th22
;
not a in dom (Start-At (0,SCMPDS))
by SCMPDS_4:18;
then (Initialize s) . (DataLoc (((Initialize s) . a),k1)) =
(Initialize s) . (DataLoc ((s . a),k1))
by FUNCT_4:11
.=
0
by A1, A7, FUNCT_4:11
;
then A10: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) =
succ (IC (Initialize s))
by A9, SCMPDS_2:55
.=
0 + 1
by A8
;
A11:
1 in dom (if<>0 (a,k1,I))
by Lm9;
then
1 in dom (stop (if<>0 (a,k1,I)))
by COMPOS_1:62;
then A12: (P +* (stop (if<>0 (a,k1,I)))) . 1 =
(stop (if<>0 (a,k1,I))) . 1
by A5, GRFUNC_1:2
.=
(if<>0 (a,k1,I)) . 1
by A11, COMPOS_1:63
.=
goto ((card I) + 1)
by Lm10
;
A13:
(P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)))
by PBOOLE:143;
A15: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(1 + 1)) =
Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)))
by EXTPRO_1:3
.=
Exec ((goto ((card I) + 1)),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)))
by A10, A12, A13
;
then A16: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2)) =
ICplusConst ((Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),((card I) + 1))
by SCMPDS_2:54
.=
((card I) + 1) + 1
by A10, Th23
.=
(card I) + (1 + 1)
;
A17:
(P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2)))
by PBOOLE:143;
A19:
card (if<>0 (a,k1,I)) = (card I) + 2
by Lm8;
then
(card I) + 2 in dom (stop (if<>0 (a,k1,I)))
by COMPOS_1:64;
then (P +* (stop (if<>0 (a,k1,I)))) . ((card I) + 2) =
(stop (if<>0 (a,k1,I))) . ((card I) + 2)
by A6, GRFUNC_1:2
.=
halt SCMPDS
by A19, COMPOS_1:64
;
then A20:
CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) = halt SCMPDS
by A16, A17;
then A21:
P +* (stop (if<>0 (a,k1,I))) halts_on Initialize s
by EXTPRO_1:29;
A22:
CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) = (a,k1) <>0_goto 2
by A3, Th22;
now let l be
Element of
NAT ;
( l < 1 + 1 implies CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS )assume
l < 1
+ 1
;
CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDSthen A23:
l <= 1
by NAT_1:13;
A24:
Comput (
(P +* (stop (if<>0 (a,k1,I)))),
(Initialize s),
0)
= Initialize s
by EXTPRO_1:2;
A25:
(P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l)))
by PBOOLE:143;
per cases
( l = 0 or l = 1 )
by A23, NAT_1:25;
suppose
l = 0
;
CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDSthen
CurInstr (
(P +* (stop (if<>0 (a,k1,I)))),
(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l)))
= CurInstr (
(P +* (stop (if<>0 (a,k1,I)))),
(Initialize s))
by A24;
hence
CurInstr (
(P +* (stop (if<>0 (a,k1,I)))),
(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l)))
<> halt SCMPDS
by A22;
verum end; end; end;
then
for l being Element of NAT st CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds
2 <= l
;
then
LifeSpan ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) = 2
by A20, A21, EXTPRO_1:def 15;
then A27:
Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2) = Result ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s))
by A21, EXTPRO_1:23;
A29:
now A30:
dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )}
by FUNCOP_1:13;
let x be
set ;
( x in dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 )assume A31:
x in dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s)))
;
(IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1per cases
( x is Int_position or x = IC )
by A31, SCMPDS_4:6;
suppose A32:
x is
Int_position
;
(IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1then
x <> IC
by SCMPDS_2:43;
then A33:
not
x in dom (Start-At (((card I) + 2),SCMPDS))
by A30, TARSKI:def 1;
TT:
not
x in dom (Start-At (0,SCMPDS))
by A32, SCMPDS_4:18;
thus (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . x =
(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2)) . x
by A27
.=
(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) . x
by A15, A32, SCMPDS_2:54
.=
(Initialize s) . x
by A9, A32, SCMPDS_2:55
.=
s . x
by TT, FUNCT_4:11
.=
(s +* (Start-At (((card I) + 2),SCMPDS))) . x
by A33, FUNCT_4:11
;
verum end; end; end;
dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) =
the carrier of SCMPDS
by PARTFUN1:def 2
.=
dom (s +* (Start-At (((card I) + 2),SCMPDS)))
by PARTFUN1:def 2
;
hence
IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS))
by A29, FUNCT_1:2; verum