let s1, s2 be State of SCM+FSA ; :: thesis: for I being Program of SCM+FSA st I is_closed_on s1 & I is_halting_on s1 & I +* (Start-At (insloc 0 )) c= s1 & I +* (Start-At (insloc 0 )) c= s2 & ex k being Element of NAT st Computation s1,k,s2 equal_outside NAT holds
Result s1, Result s2 equal_outside NAT
set A = NAT ;
set D = Int-Locations \/ FinSeq-Locations ;
let I be Program of SCM+FSA ; :: thesis: ( I is_closed_on s1 & I is_halting_on s1 & I +* (Start-At (insloc 0 )) c= s1 & I +* (Start-At (insloc 0 )) c= s2 & ex k being Element of NAT st Computation s1,k,s2 equal_outside NAT implies Result s1, Result s2 equal_outside NAT )
assume A1:
I is_closed_on s1
; :: thesis: ( not I is_halting_on s1 or not I +* (Start-At (insloc 0 )) c= s1 or not I +* (Start-At (insloc 0 )) c= s2 or for k being Element of NAT holds not Computation s1,k,s2 equal_outside NAT or Result s1, Result s2 equal_outside NAT )
assume A2:
I is_halting_on s1
; :: thesis: ( not I +* (Start-At (insloc 0 )) c= s1 or not I +* (Start-At (insloc 0 )) c= s2 or for k being Element of NAT holds not Computation s1,k,s2 equal_outside NAT or Result s1, Result s2 equal_outside NAT )
assume A3:
I +* (Start-At (insloc 0 )) c= s1
; :: thesis: ( not I +* (Start-At (insloc 0 )) c= s2 or for k being Element of NAT holds not Computation s1,k,s2 equal_outside NAT or Result s1, Result s2 equal_outside NAT )
then A4:
s1 = s1 +* (I +* (Start-At (insloc 0 )))
by FUNCT_4:79;
then A5:
s1 is halting
by A2, SCMFSA7B:def 8;
then consider n being Element of NAT such that
A6:
CurInstr (Computation s1,n) = halt SCM+FSA
by AMI_1:def 20;
assume
I +* (Start-At (insloc 0 )) c= s2
; :: thesis: ( for k being Element of NAT holds not Computation s1,k,s2 equal_outside NAT or Result s1, Result s2 equal_outside NAT )
then A7:
s2 = s2 +* (I +* (Start-At (insloc 0 )))
by FUNCT_4:79;
given k being Element of NAT such that A8:
Computation s1,k,s2 equal_outside NAT
; :: thesis: Result s1, Result s2 equal_outside NAT
set s3 = Computation s1,k;
A9:
IC SCM+FSA in dom (Computation s1,k)
by AMI_1:94;
I c= I +* (Start-At (insloc 0 ))
by SCMFSA8A:9;
then
I c= s1
by A3, XBOOLE_1:1;
then A10:
I c= Computation s1,k
by AMI_1:86;
IC (Computation s1,k) =
IC s2
by A8, SCMFSA8A:6
.=
IC ((s2 +* I) +* (Start-At (insloc 0 )))
by A7, FUNCT_4:15
.=
insloc 0
by AMI_1:111
;
then
(IC SCM+FSA ) .--> (insloc 0 ) c= Computation s1,k
by A9, FUNCOP_1:88;
then
I +* (Start-At (insloc 0 )) c= Computation s1,k
by A10, FUNCT_4:92;
then A11:
Computation s1,k = (Computation s1,k) +* (I +* (Start-At (insloc 0 )))
by FUNCT_4:79;
CurInstr (Computation (Computation s1,k),n) =
CurInstr (Computation s1,(k + n))
by AMI_1:51
.=
CurInstr (Computation s1,n)
by A6, AMI_1:52, NAT_1:11
;
then
Computation s1,k is halting
by A6, AMI_1:def 20;
then A13:
I is_halting_on Computation s1,k
by A11, SCMFSA7B:def 8;
A14:
DataPart (Computation s1,k) = DataPart s2
by A8, SCMFSA8A:6;
consider k being Element of NAT such that
A15:
CurInstr (Computation s1,k) = halt SCM+FSA
by A5, AMI_1:def 20;
A16:
s1 . (IC (Computation s1,k)) = halt SCM+FSA
by A15, AMI_1:54;
I is_closed_on Computation s1,k
by A11, A12, SCMFSA7B:def 7;
then
Result (Computation s1,k), Result s2 equal_outside NAT
by A7, A14, A11, A13, Th101;
hence
Result s1, Result s2 equal_outside NAT
by A16, AMI_1:57; :: thesis: verum