let a be Int-Location ; :: thesis: for I being Program of SCM+FSA
for s being State of SCM+FSA st I is_closed_on s & I is_halting_on s & IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) + 4 holds
CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4))
let I be Program of SCM+FSA ; :: thesis: for s being State of SCM+FSA st I is_closed_on s & I is_halting_on s & IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) + 4 holds
CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4))
let s be State of SCM+FSA ; :: thesis: ( I is_closed_on s & I is_halting_on s & IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) + 4 implies CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4)) )
set s1 = s +* ((while>0 a,I) +* (Start-At (insloc 0 )));
set sI = s +* (I +* (Start-At (insloc 0 )));
set life = LifeSpan (s +* (I +* (Start-At (insloc 0 ))));
set sK1 = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))));
set sK2 = Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 )))));
assume A1:
I is_closed_on s
; :: thesis: ( not I is_halting_on s or not IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) + 4 or CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4)) )
assume A2:
I is_halting_on s
; :: thesis: ( not IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) + 4 or CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4)) )
assume A3:
IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) + 4
; :: thesis: CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4))
set I1 = I ';' (Goto (insloc 0 ));
set J = Stop SCM+FSA ;
set f = (insloc ((card I) + 4)) .--> (goto (insloc 0 ));
set i = a >0_goto (insloc ((card (Stop SCM+FSA )) + 3));
A4:
dom ((insloc ((card I) + 4)) .--> (goto (insloc 0 ))) = {(insloc ((card I) + 4))}
by FUNCOP_1:19;
reconsider n = IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) as Element of NAT by ORDINAL1:def 13;
A6:
insloc n in dom I
by A1, SCMFSA7B:def 7;
then A7:
n < card I
by SCMFSA6A:15;
n + 4 <> (card I) + 4
by A6, SCMFSA6A:15;
then A8:
not insloc (n + 4) in dom ((insloc ((card I) + 4)) .--> (goto (insloc 0 )))
by A4, TARSKI:def 1;
A9:
n + 4 < (card I) + 6
by A7, XREAL_1:10;
card (while>0 a,I) = (card I) + 6
by Th5;
then A10:
insloc (n + 4) in dom (while>0 a,I)
by A9, SCMFSA6A:15;
A11:
dom (while>0 a,I) = (dom (if>0 a,(I ';' (Goto (insloc 0 ))),(Stop SCM+FSA ))) \/ (dom ((insloc ((card I) + 4)) .--> (goto (insloc 0 ))))
by FUNCT_4:def 1;
then A12:
insloc (n + 4) in dom (if>0 a,(I ';' (Goto (insloc 0 ))),(Stop SCM+FSA ))
by A8, A10, XBOOLE_0:def 3;
set Mi = ((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1)));
set J2 = (I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA );
set J3 = (Goto (insloc 0 )) ';' (Stop SCM+FSA );
A13: card (((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1)))) =
(card ((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA ))) + (card (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1))))
by SCMFSA6A:61
.=
(card ((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA ))) + 1
by SCMFSA8A:29
.=
((card (Macro (a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))))) + (card (Stop SCM+FSA ))) + 1
by SCMFSA6A:61
.=
(2 + 1) + 1
by SCMFSA7B:6, SCMFSA8A:17
.=
3 + 1
;
then
n + 4 >= card (((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1))))
by NAT_1:11;
then A14:
not insloc (n + 4) in dom (((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1))))
by SCMFSA6A:15;
A15: if>0 a,(I ';' (Goto (insloc 0 ))),(Stop SCM+FSA ) =
((((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1)))) ';' (I ';' (Goto (insloc 0 )))) ';' (Stop SCM+FSA )
by SCMFSA8B:def 2
.=
(((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1)))) ';' ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA ))
by SCMFSA6A:67
.=
(Directed (((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1))))) +* (ProgramPart (Relocated ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4))
by A13
;
then A16:
dom (if>0 a,(I ';' (Goto (insloc 0 ))),(Stop SCM+FSA )) = (dom (Directed (((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1)))))) \/ (dom (ProgramPart (Relocated ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4)))
by FUNCT_4:def 1;
then
dom (if>0 a,(I ';' (Goto (insloc 0 ))),(Stop SCM+FSA )) = (dom (((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1))))) \/ (dom (ProgramPart (Relocated ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4)))
by FUNCT_4:105;
then A17:
insloc (n + 4) in dom (ProgramPart (Relocated ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4))
by A12, A14, XBOOLE_0:def 3;
while>0 a,I c= (while>0 a,I) +* (Start-At (insloc 0 ))
by SCMFSA8A:9;
then A19:
dom (while>0 a,I) c= dom ((while>0 a,I) +* (Start-At (insloc 0 )))
by GRFUNC_1:8;
I c= I +* (Start-At (insloc 0 ))
by SCMFSA8A:9;
then A20:
dom I c= dom (I +* (Start-At (insloc 0 )))
by GRFUNC_1:8;
A21: CurInstr (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) =
(Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) . (insloc n)
by AMI_1:def 17
.=
(s +* (I +* (Start-At (insloc 0 )))) . (insloc n)
by AMI_1:54
.=
(I +* (Start-At (insloc 0 ))) . (insloc n)
by A6, A20, FUNCT_4:14
.=
I . (insloc n)
by A6, SCMFSA6B:7
;
s +* (I +* (Start-At (insloc 0 ))) is halting
by A2, SCMFSA7B:def 8;
then A22:
I . (insloc n) = halt SCM+FSA
by A21, AMI_1:def 46;
A23:
(I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA ) = I ';' ((Goto (insloc 0 )) ';' (Stop SCM+FSA ))
by SCMFSA6A:67;
then dom ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )) =
(dom (Directed I)) \/ (dom (ProgramPart (Relocated ((Goto (insloc 0 )) ';' (Stop SCM+FSA )),(card I))))
by FUNCT_4:def 1
.=
(dom I) \/ (dom (ProgramPart (Relocated ((Goto (insloc 0 )) ';' (Stop SCM+FSA )),(card I))))
by FUNCT_4:105
;
then A24:
insloc n in dom ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA ))
by A6, XBOOLE_0:def 3;
then
(insloc n) + 4 in { (il + 4) where il is Element of NAT : il in dom ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )) }
;
then A25:
insloc (n + 4) in dom (Shift ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4)
by VALUED_1:def 12;
then A26: pi (Shift ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4),(n + 4) =
(Shift ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4) . ((insloc n) + 4)
by AMI_1:def 47
.=
((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )) . (insloc n)
by A24, VALUED_1:def 12
.=
(Directed I) . (insloc n)
by A6, A23, SCMFSA8A:28
.=
goto (insloc (card I))
by A6, A22, SCMFSA8A:30
;
(Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) . (insloc (n + 4)) =
(s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . (insloc (n + 4))
by AMI_1:54
.=
((while>0 a,I) +* (Start-At (insloc 0 ))) . (insloc (n + 4))
by A10, A19, FUNCT_4:14
.=
((if>0 a,(I ';' (Goto (insloc 0 ))),(Stop SCM+FSA )) +* ((insloc ((card I) + 4)) .--> (goto (insloc 0 )))) . (insloc (n + 4))
by A10, SCMFSA6B:7
.=
((Directed (((a >0_goto (insloc ((card (Stop SCM+FSA )) + 3))) ';' (Stop SCM+FSA )) ';' (Goto (insloc ((card (I ';' (Goto (insloc 0 )))) + 1))))) +* (ProgramPart (Relocated ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4))) . (insloc (n + 4))
by A8, A10, A11, A15, FUNCT_4:def 1
.=
(ProgramPart (Relocated ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4)) . (insloc (n + 4))
by A12, A16, A17, FUNCT_4:def 1
.=
(IncAddr [(Shift (ProgramPart ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA ))),4)],4) . (insloc (n + 4))
by SCMFSA_5:2
.=
(IncAddr (Shift ((I ';' (Goto (insloc 0 ))) ';' (Stop SCM+FSA )),4),4) . (insloc (n + 4))
by AMI_1:105
.=
IncAddr (goto (insloc (card I))),4
by A25, A26, SCMFSA_4:24
.=
goto (insloc ((card I) + 4))
by SCMFSA_4:14
;
hence
CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4))
by A3, AMI_1:def 17; :: thesis: verum