let P be Instruction-Sequence of SCM+FSA; for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a > 0 & I is_closed_on s,P & I is_halting_on s,P holds
( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
let s be State of SCM+FSA; for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a > 0 & I is_closed_on s,P & I is_halting_on s,P holds
( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
let I, J be Program of SCM+FSA; for a being read-write Int-Location st s . a > 0 & I is_closed_on s,P & I is_halting_on s,P holds
( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
let a be read-write Int-Location; ( s . a > 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P ) )
set I1 = I ";" (Stop SCM+FSA);
set s1 = Initialize s;
set P1 = P +* (I ";" (Stop SCM+FSA));
set s3 = Initialize s;
set P3 = P +* (if>0 (a,I,J));
set s4 = Comput ((P +* (if>0 (a,I,J))),(Initialize s),1);
set i = a >0_goto ((card J) + 3);
A1:
I ";" (Stop SCM+FSA) c= P +* (I ";" (Stop SCM+FSA))
by FUNCT_4:25;
A2:
not a in dom (Start-At (0,SCM+FSA))
by SCMFSA_2:102;
A3:
0 in dom (if>0 (a,I,J))
by Lm2;
A4: (P +* (if>0 (a,I,J))) . 0 =
(if>0 (a,I,J)) . 0
by A3, FUNCT_4:13
.=
a >0_goto ((card J) + 3)
by Lm3
;
IC in dom (Start-At (0,SCM+FSA))
by MEMSTR_0:15;
then A5: IC (Initialize s) =
IC (Start-At (0,SCM+FSA))
by FUNCT_4:13
.=
0
by FUNCOP_1:72
;
A6:
if>0 (a,I,J) c= P +* (if>0 (a,I,J))
by FUNCT_4:25;
A7:
if>0 (a,I,J) = (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA))
by SCMFSA6A:25;
card (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) =
(card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))
by SCMFSA6A:21
.=
(card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + 1
by SCMFSA8A:15
.=
((card (Macro (a >0_goto ((card J) + 3)))) + (card J)) + 1
by SCMFSA6A:21
.=
((card J) + 2) + 1
by COMPOS_1:56
.=
(card J) + (2 + 1)
;
then A8:
Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= if>0 (a,I,J)
by A7, Lm1;
A9:
Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= P +* (if>0 (a,I,J))
by A8, A6, XBOOLE_1:1;
A10: Comput ((P +* (if>0 (a,I,J))),(Initialize s),(0 + 1)) =
Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),0)))
by EXTPRO_1:3
.=
Following ((P +* (if>0 (a,I,J))),(Initialize s))
.=
Exec ((a >0_goto ((card J) + 3)),(Initialize s))
by A5, A4, PBOOLE:143
;
A11:
for f being FinSeq-Location holds (Initialize s) . f = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) . f
by A10, SCMFSA_2:71;
for a being Int-Location holds (Initialize s) . a = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) . a
by A10, SCMFSA_2:71;
then A12:
DataPart (Initialize s) = DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1))
by A11, SCMFSA_M:2;
assume
s . a > 0
; ( not I is_closed_on s,P or not I is_halting_on s,P or ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P ) )
then
(Initialize s) . a > 0
by A2, FUNCT_4:11;
then A13:
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) = (card J) + 3
by A10, SCMFSA_2:71;
assume A14:
I is_closed_on s,P
; ( not I is_halting_on s,P or ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P ) )
assume A15:
I is_halting_on s,P
; ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
then A16:
I ";" (Stop SCM+FSA) is_closed_on s,P
by A14, SCMFSA8A:30;
I ";" (Stop SCM+FSA) is_halting_on s,P
by A14, A15, SCMFSA8A:30;
then A17:
P +* (I ";" (Stop SCM+FSA)) halts_on Initialize s
by SCMFSA7B:def 7;
DataPart s = DataPart (Initialize s)
by MEMSTR_0:79;
then A18:
I ";" (Stop SCM+FSA) is_closed_on Initialize s,P +* (I ";" (Stop SCM+FSA))
by A16, Th3;
now for k being Element of NAT holds IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J))let k be
Element of
NAT ;
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))per cases
( 0 < k or k = 0 )
;
suppose
0 < k
;
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))then consider k1 being
Nat such that A19:
k1 + 1
= k
by NAT_1:6;
reconsider k1 =
k1 as
Element of
NAT by ORDINAL1:def 12;
reconsider m =
IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),k1)) as
Element of
NAT ;
m in dom (I ";" (Stop SCM+FSA))
by A16, SCMFSA7B:def 6;
then A20:
m < card (I ";" (Stop SCM+FSA))
by AFINSQ_1:66;
card (Stop SCM+FSA) = 1
by COMPOS_1:4;
then A21:
card (I ";" (Stop SCM+FSA)) = (card I) + 1
by SCMFSA6A:21;
card (if>0 (a,I,J)) =
((card I) + (card J)) + 4
by Th12
.=
((card J) + 3) + (card (I ";" (Stop SCM+FSA)))
by A21
;
then A22:
m + ((card J) + 3) < card (if>0 (a,I,J))
by A20, XREAL_1:6;
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) =
IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)),k1))
by A19, EXTPRO_1:4
.=
m + ((card J) + 3)
by A18, A13, A12, Th8, A9, A1
;
hence
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J))
by A22, AFINSQ_1:66;
verum end; end; end;
hence
if>0 (a,I,J) is_closed_on s,P
by SCMFSA7B:def 6; if>0 (a,I,J) is_halting_on s,P
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),((LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1)))) =
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)),(LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))))))
by EXTPRO_1:4
.=
IncAddr ((CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))))))),((card J) + 3))
by A18, A13, A12, Th8, A9, A1
.=
IncAddr ((halt SCM+FSA),((card J) + 3))
by A17, EXTPRO_1:def 15
.=
halt SCM+FSA
by COMPOS_0:4
;
then
P +* (if>0 (a,I,J)) halts_on Initialize s
by EXTPRO_1:29;
hence
if>0 (a,I,J) is_halting_on s,P
by SCMFSA7B:def 7; verum