let P be the Instructions of SCM+FSA -valued ManySortedSet of NAT ; 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 & J is_closed_on s,P & J 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 & J is_closed_on s,P & J 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 & J is_closed_on s,P & J 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 & J is_closed_on s,P & J 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 JI2 = ((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA);
set s2 = s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)));
set P2 = P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA));
A1:
((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA) c= P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))
by FUNCT_4:26;
set s3 = s +* (Initialize (if>0 (a,I,J)));
set P3 = P +* (if>0 (a,I,J));
set s4 = Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1);
set s5 = Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2);
set i = a >0_goto ((card J) + 3);
A2:
Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)) c= s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))
by FUNCT_4:26;
A3:
ProgramPart (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)) = ((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)
by RELAT_1:209;
A4:
ProgramPart (if>0 (a,I,J)) = if>0 (a,I,J)
by RELAT_1:209;
IC in dom (Initialize (if>0 (a,I,J)))
by COMPOS_1:141;
then A5: IC (s +* (Initialize (if>0 (a,I,J)))) =
IC (Initialize (if>0 (a,I,J)))
by FUNCT_4:14
.=
0
by COMPOS_1:142
;
A6:
if>0 (a,I,J) c= Initialize (if>0 (a,I,J))
by SCMFSA8A:9;
Initialize (if>0 (a,I,J)) c= s +* (Initialize (if>0 (a,I,J)))
by FUNCT_4:26;
then A7:
if>0 (a,I,J) c= s +* (Initialize (if>0 (a,I,J)))
by A6, XBOOLE_1:1;
A8:
if>0 (a,I,J) c= P +* (if>0 (a,I,J))
by FUNCT_4:26;
A9: if>0 (a,I,J) =
(((a >0_goto ((card J) + 3)) ';' J) ';' (Goto ((card I) + 1))) ';' (I ';' (Stop SCM+FSA))
by SCMFSA6A:67
.=
((a >0_goto ((card J) + 3)) ';' J) ';' ((Goto ((card I) + 1)) ';' (I ';' (Stop SCM+FSA)))
by SCMFSA6A:67
.=
(a >0_goto ((card J) + 3)) ';' (J ';' ((Goto ((card I) + 1)) ';' (I ';' (Stop SCM+FSA))))
by SCMFSA6A:71
.=
(a >0_goto ((card J) + 3)) ';' ((J ';' (Goto ((card I) + 1))) ';' (I ';' (Stop SCM+FSA)))
by SCMFSA6A:67
.=
(a >0_goto ((card J) + 3)) ';' (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))
by SCMFSA6A:67
.=
(Macro (a >0_goto ((card J) + 3))) ';' (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))
by SCMFSA6A:def 6
;
then A10:
Reloc ((((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)),(card (Macro (a >0_goto ((card J) + 3))))) c= if>0 (a,I,J)
by Lm1;
then
Reloc ((((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)),2) c= if>0 (a,I,J)
by COMPOS_1:150;
then
Reloc ((((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)),2) c= s +* (Initialize (if>0 (a,I,J)))
by A7, XBOOLE_1:1;
then A11:
Reloc ((((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)),2) c= Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2)
by AMI_1:81;
card (Macro (a >0_goto ((card J) + 3))) = 2
by COMPOS_1:150;
then A12:
Reloc ((((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)),2) c= P +* (if>0 (a,I,J))
by A8, A10, XBOOLE_1:1;
A13:
not a in dom (Initialize (if>0 (a,I,J)))
by SCMFSA6B:12;
A14:
0 in dom (if>0 (a,I,J))
by Lm2;
A15: (P +* (if>0 (a,I,J))) . 0 =
(if>0 (a,I,J)) . 0
by A14, FUNCT_4:14
.=
a >0_goto ((card J) + 3)
by Lm3
;
A16:
1 in dom (if>0 (a,I,J))
by Lm2;
A17: Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),(0 + 1)) =
Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),0)))
by EXTPRO_1:4
.=
Following ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))))
by EXTPRO_1:3
.=
Exec ((a >0_goto ((card J) + 3)),(s +* (Initialize (if>0 (a,I,J)))))
by A5, A15, PBOOLE:158
;
assume
s . a <= 0
; ( not J is_closed_on s,P or not J 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
(s +* (Initialize (if>0 (a,I,J)))) . a <= 0
by A13, FUNCT_4:12;
then A18: IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1)) =
succ 0
by A5, A17, SCMFSA_2:97
.=
0 + 1
;
A19: (P +* (if>0 (a,I,J))) . 1 =
(if>0 (a,I,J)) . 1
by A16, FUNCT_4:14
.=
goto 2
by Lm3
;
assume A20:
J is_closed_on s,P
; ( not J 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 ) )
A21: Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),(1 + 1)) =
Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1)))
by EXTPRO_1:4
.=
Exec ((goto 2),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1)))
by A18, A19, PBOOLE:158
;
A22:
DataPart (s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))) = DataPart (s +* (Initialize (if>0 (a,I,J))))
by COMPOS_1:138, SCMFSA8A:14;
A23:
now let f be
FinSeq-Location ;
(s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))) . f = (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2)) . fthus (s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))) . f =
(s +* (Initialize (if>0 (a,I,J)))) . f
by A22, SCMFSA6A:38
.=
(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1)) . f
by A17, SCMFSA_2:97
.=
(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2)) . f
by A21, SCMFSA_2:95
;
verum end;
now let a be
Int-Location ;
(s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))) . a = (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2)) . athus (s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))) . a =
(s +* (Initialize (if>0 (a,I,J)))) . a
by A22, SCMFSA6A:38
.=
(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1)) . a
by A17, SCMFSA_2:97
.=
(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2)) . a
by A21, SCMFSA_2:95
;
verum end;
then A24:
DataPart (s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))) = DataPart (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2))
by A23, SCMFSA6A:38;
assume A25:
J 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 A26:
((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA) is_closed_on s,P
by A20, SCMFSA8A:58;
then A27:
((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA) is_closed_on s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))),P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))
by Th10;
A28:
P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)) halts_on s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))
by A20, A25, SCMFSA8A:59;
A29:
IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2)) = 2
by A21, SCMFSA_2:95;
now let k be
Element of
NAT ;
IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),b1)) in dom (if>0 (a,I,J))
(
k = 0 or
0 + 1
< k + 1 )
by XREAL_1:8;
then A30:
(
k = 0 or 1
<= k )
by NAT_1:13;
per cases
( 1 < k or k = 0 or k = 1 )
by A30, XXREAL_0:1;
suppose A31:
1
< k
;
IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),b1)) in dom (if>0 (a,I,J))then consider k1 being
Nat such that A32:
k1 + 1
= k
by NAT_1:6;
0 + 1
< k1 + 1
by A31, A32;
then consider k2 being
Nat such that A33:
k2 + 1
= k1
by NAT_1:6;
reconsider k1 =
k1,
k2 =
k2 as
Element of
NAT by ORDINAL1:def 13;
reconsider m =
IC (Comput ((P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))),(s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))),k2)) as
Element of
NAT ;
A34:
card (if>0 (a,I,J)) =
(card (Macro (a >0_goto ((card J) + 3)))) + (card (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))
by A9, SCMFSA6A:61
.=
2
+ (card (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))
by COMPOS_1:150
;
m in dom (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))
by A26, SCMFSA7B:def 7, A3;
then
m < card (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))
by AFINSQ_1:70;
then A35:
m + 2
< card (if>0 (a,I,J))
by A34, XREAL_1:8;
IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),k)) =
IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1)),k1))
by A32, EXTPRO_1:5
.=
IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),1)),1)),k2))
by A33, EXTPRO_1:5
.=
IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),(1 + 1))),k2))
by EXTPRO_1:5
.=
m + 2
by A2, A27, A11, A29, A24, Th11, A12, A1
;
hence
IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),k)) in dom (if>0 (a,I,J))
by A35, AFINSQ_1:70;
verum end; suppose
k = 0
;
IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),b1)) in dom (if>0 (a,I,J))hence
IC (Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),k)) in dom (if>0 (a,I,J))
by A14, A5, EXTPRO_1:3;
verum end; end; end;
hence
if>0 (a,I,J) is_closed_on s,P
by SCMFSA7B:def 7, A4; if>0 (a,I,J) is_halting_on s,P
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),((LifeSpan ((P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))),(s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))))) + 2)))) =
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(s +* (Initialize (if>0 (a,I,J)))),2)),(LifeSpan ((P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))),(s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))))))))
by EXTPRO_1:5
.=
IncAddr ((CurInstr ((P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))),(Comput ((P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))),(s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))),(LifeSpan ((P +* (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA))),(s +* (Initialize (((J ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA)))))))))),2)
by A2, A27, A11, A12, A29, A24, Th11, A1
.=
IncAddr ((halt SCM+FSA),2)
by A28, EXTPRO_1:def 14
.=
halt SCM+FSA
by COMPOS_1:93
;
then
P +* (if>0 (a,I,J)) halts_on s +* (Initialize (if>0 (a,I,J)))
by EXTPRO_1:30;
hence
if>0 (a,I,J) is_halting_on s,P
by SCMFSA7B:def 8, A4; verum