let P1, P2 be the Instructions of SCM+FSA -valued ManySortedSet of NAT ; :: thesis: for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA
for a being Int-Location st ( for d being read-write Int-Location st a <> d holds
s1 . d = s2 . d ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) & not I refers a & I is_closed_on Initialized s1,P1 & I is_halting_on Initialized s1,P1 holds
( ( for d being Int-Location st a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) )

let s1, s2 be State of SCM+FSA; :: thesis: for I being Program of SCM+FSA
for a being Int-Location st ( for d being read-write Int-Location st a <> d holds
s1 . d = s2 . d ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) & not I refers a & I is_closed_on Initialized s1,P1 & I is_halting_on Initialized s1,P1 holds
( ( for d being Int-Location st a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) )

let I be Program of SCM+FSA; :: thesis: for a being Int-Location st ( for d being read-write Int-Location st a <> d holds
s1 . d = s2 . d ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) & not I refers a & I is_closed_on Initialized s1,P1 & I is_halting_on Initialized s1,P1 holds
( ( for d being Int-Location st a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) )

A1: ProgramPart I = I by RELAT_1:209;
let a be Int-Location ; :: thesis: ( ( for d being read-write Int-Location st a <> d holds
s1 . d = s2 . d ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) & not I refers a & I is_closed_on Initialized s1,P1 & I is_halting_on Initialized s1,P1 implies ( ( for d being Int-Location st a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) ) )

assume that
A2: for d being read-write Int-Location st a <> d holds
s1 . d = s2 . d and
A3: for f being FinSeq-Location holds s1 . f = s2 . f ; :: thesis: ( I refers a or not I is_closed_on Initialized s1,P1 or not I is_halting_on Initialized s1,P1 or ( ( for d being Int-Location st a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) ) )

A4: now
let d be Int-Location ; :: thesis: ( a <> d implies (Initialized s1) . b1 = (Initialized s2) . b1 )
assume A5: a <> d ; :: thesis: (Initialized s1) . b1 = (Initialized s2) . b1
per cases ( d = intloc 0 or d <> intloc 0 ) ;
end;
end;
set S1 = s1 +* (Initialized I);
set Q1 = P1 +* I;
set S2 = s2 +* (Initialized I);
set Q2 = P2 +* I;
assume A8: not I refers a ; :: thesis: ( not I is_closed_on Initialized s1,P1 or not I is_halting_on Initialized s1,P1 or ( ( for d being Int-Location st a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) ) )

A9: s2 +* (Initialized I) = (Initialized s2) +* (Initialize I) by SCMFSA8A:13;
assume that
A10: I is_closed_on Initialized s1,P1 and
A11: I is_halting_on Initialized s1,P1 ; :: thesis: ( ( for d being Int-Location st a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) )

A12: now
let f be FinSeq-Location ; :: thesis: (Initialized s1) . f = (Initialized s2) . f
thus (Initialized s1) . f = s1 . f by SCMFSA6C:3
.= s2 . f by A3
.= (Initialized s2) . f by SCMFSA6C:3 ; :: thesis: verum
end;
then I is_halting_on Initialized s2,P2 by A8, A10, A11, A4, Th40;
then A13: P2 +* I halts_on s2 +* (Initialized I) by A9, SCMFSA7B:def 8, A1;
A14: s1 +* (Initialized I) = (Initialized s1) +* (Initialize I) by SCMFSA8A:13;
then A15: P1 +* I halts_on s1 +* (Initialized I) by A11, SCMFSA7B:def 8, A1;
now
let l be Element of NAT ; :: thesis: ( l < LifeSpan ((P1 +* I),(s1 +* (Initialized I))) implies CurInstr ((P2 +* I),(Comput ((P2 +* I),(s2 +* (Initialized I)),l))) <> halt SCM+FSA )
assume l < LifeSpan ((P1 +* I),(s1 +* (Initialized I))) ; :: thesis: CurInstr ((P2 +* I),(Comput ((P2 +* I),(s2 +* (Initialized I)),l))) <> halt SCM+FSA
then CurInstr ((P1 +* I),(Comput ((P1 +* I),(s1 +* (Initialized I)),l))) <> halt SCM+FSA by A15, EXTPRO_1:def 14;
hence CurInstr ((P2 +* I),(Comput ((P2 +* I),(s2 +* (Initialized I)),l))) <> halt SCM+FSA by A8, A10, A4, A12, A14, A9, Th38; :: thesis: verum
end;
then A16: for l being Element of NAT st CurInstr ((P2 +* I),(Comput ((P2 +* I),(s2 +* (Initialized I)),l))) = halt SCM+FSA holds
LifeSpan ((P1 +* I),(s1 +* (Initialized I))) <= l ;
CurInstr ((P2 +* I),(Comput ((P2 +* I),(s2 +* (Initialized I)),(LifeSpan ((P1 +* I),(s1 +* (Initialized I))))))) = CurInstr ((P1 +* I),(Comput ((P1 +* I),(s1 +* (Initialized I)),(LifeSpan ((P1 +* I),(s1 +* (Initialized I))))))) by A8, A10, A4, A12, A14, A9, Th38
.= halt SCM+FSA by A15, EXTPRO_1:def 14 ;
then A17: LifeSpan ((P1 +* I),(s1 +* (Initialized I))) = LifeSpan ((P2 +* I),(s2 +* (Initialized I))) by A13, A16, EXTPRO_1:def 14;
then A18: Result ((P2 +* I),(s2 +* (Initialized I))) = Comput ((P2 +* I),(s2 +* (Initialized I)),(LifeSpan ((P1 +* I),(s1 +* (Initialized I))))) by A13, EXTPRO_1:23;
A19: Result ((P1 +* I),(s1 +* (Initialized I))) = Comput ((P1 +* I),(s1 +* (Initialized I)),(LifeSpan ((P1 +* I),(s1 +* (Initialized I))))) by A15, EXTPRO_1:23;
hereby :: thesis: ( ( for f being FinSeq-Location holds (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) & IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) )
let d be Int-Location ; :: thesis: ( a <> d implies (IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d )
assume A20: a <> d ; :: thesis: (IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d
thus (IExec (I,P1,s1)) . d = (Result ((P1 +* I),(s1 +* (Initialized I)))) . d by Th36, SCMFSA10:92
.= (Result ((P2 +* I),(s2 +* (Initialized I)))) . d by A8, A10, A4, A12, A14, A9, A18, A19, A20, Th38
.= (IExec (I,P2,s2)) . d by Th36, SCMFSA10:92 ; :: thesis: verum
end;
hereby :: thesis: IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2))
let f be FinSeq-Location ; :: thesis: (IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f
thus (IExec (I,P1,s1)) . f = (Result ((P1 +* I),(s1 +* (Initialized I)))) . f by Th36, SCMFSA10:93
.= (Result ((P2 +* I),(s2 +* (Initialized I)))) . f by A8, A10, A4, A12, A14, A9, A18, A19, Th38
.= (IExec (I,P2,s2)) . f by Th36, SCMFSA10:93 ; :: thesis: verum
end;
thus IC (IExec (I,P1,s1)) = IC (Result ((P1 +* I),(s1 +* (Initialized I)))) by SCMFSA8A:7
.= IC (Comput ((P1 +* I),(s1 +* (Initialized I)),(LifeSpan ((P1 +* I),(s1 +* (Initialized I)))))) by A15, EXTPRO_1:23
.= IC (Comput ((P2 +* I),(s2 +* (Initialized I)),(LifeSpan ((P2 +* I),(s2 +* (Initialized I)))))) by A8, A10, A4, A12, A14, A9, A17, Th38
.= IC (Result ((P2 +* I),(s2 +* (Initialized I)))) by A13, EXTPRO_1:23
.= IC (IExec (I,P2,s2)) by SCMFSA8A:7 ; :: thesis: verum