let P1, P2 be Instruction-Sequence of SCMPDS; :: thesis: for s1, s2 being State of SCMPDS
for I being Program of st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 & I is_halting_on s1,P1 holds
( I is_closed_on s2,P2 & I is_halting_on s2,P2 )

let s1, s2 be State of SCMPDS; :: thesis: for I being Program of st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 & I is_halting_on s1,P1 holds
( I is_closed_on s2,P2 & I is_halting_on s2,P2 )

let I be Program of ; :: thesis: ( DataPart s1 = DataPart s2 & I is_closed_on s1,P1 & I is_halting_on s1,P1 implies ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) )
set pI = stop I;
set S1 = Initialize s1;
set S2 = Initialize s2;
set E1 = P1 +* (stop I);
set E2 = P2 +* (stop I);
defpred S1[ Nat] means ( IC (Comput ((P1 +* (stop I)),(Initialize s1),$1)) = IC (Comput ((P2 +* (stop I)),(Initialize s2),$1)) & CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),$1))) = CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),$1))) & DataPart (Comput ((P1 +* (stop I)),(Initialize s1),$1)) = DataPart (Comput ((P2 +* (stop I)),(Initialize s2),$1)) );
A1: Comput ((P1 +* (stop I)),(Initialize s1),0) = Initialize s1 by EXTPRO_1:2;
A2: Comput ((P2 +* (stop I)),(Initialize s2),0) = Initialize s2 by EXTPRO_1:2;
assume DataPart s1 = DataPart s2 ; :: thesis: ( not I is_closed_on s1,P1 or not I is_halting_on s1,P1 or ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) )
then A3: Comput ((P1 +* (stop I)),(Initialize s1),0) = Comput ((P2 +* (stop I)),(Initialize s2),0) by A1, A2, MEMSTR_0:80;
A4: 0 in dom (stop I) by COMPOS_1:36;
assume A5: I is_closed_on s1,P1 ; :: thesis: ( not I is_halting_on s1,P1 or ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) )
A6: now :: thesis: for k being Nat st S1[k] holds
S1[k + 1]
let k be Nat; :: thesis: ( S1[k] implies S1[k + 1] )
A7: Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)) = Following ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),k))) by EXTPRO_1:3;
assume A8: S1[k] ; :: thesis: S1[k + 1]
then for a being Int_position holds (Comput ((P1 +* (stop I)),(Initialize s1),k)) . a = (Comput ((P2 +* (stop I)),(Initialize s2),k)) . a by SCMPDS_4:8;
then A9: Comput ((P1 +* (stop I)),(Initialize s1),k) = Comput ((P2 +* (stop I)),(Initialize s2),k) by A8, SCMPDS_4:2;
A10: stop I c= P2 +* (stop I) by FUNCT_4:25;
A11: IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1))) in dom (stop I) by A5;
Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)) = Following ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),k))) by EXTPRO_1:3;
then A12: Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)) = Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)) by A8, A9, A7;
then A13: IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1))) = IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1))) ;
A14: (P1 +* (stop I)) /. (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) = (P1 +* (stop I)) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) by PBOOLE:143;
A15: (P2 +* (stop I)) /. (IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) = (P2 +* (stop I)) . (IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) by PBOOLE:143;
stop I c= P1 +* (stop I) by FUNCT_4:25;
then CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) = (stop I) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) by A11, A14, GRFUNC_1:2
.= CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) by A10, A13, A11, A15, GRFUNC_1:2 ;
hence S1[k + 1] by A12; :: thesis: verum
end;
A16: IC (Comput ((P2 +* (stop I)),(Initialize s2),0)) = IC (Initialize s2) by A2
.= 0 by MEMSTR_0:def 11 ;
assume I is_halting_on s1,P1 ; :: thesis: ( I is_closed_on s2,P2 & I is_halting_on s2,P2 )
then P1 +* (stop I) halts_on Initialize s1 ;
then consider m being Nat such that
A17: CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),m))) = halt SCMPDS ;
A18: (P1 +* (stop I)) /. (IC (Comput ((P1 +* (stop I)),(Initialize s1),0))) = (P1 +* (stop I)) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),0))) by PBOOLE:143;
A19: (P2 +* (stop I)) /. (IC (Comput ((P2 +* (stop I)),(Initialize s2),0))) = (P2 +* (stop I)) . (IC (Comput ((P2 +* (stop I)),(Initialize s2),0))) by PBOOLE:143;
IC (Comput ((P1 +* (stop I)),(Initialize s1),0)) = IC (Initialize s1) by A1
.= 0 by MEMSTR_0:def 11 ;
then CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),0))) = (stop I) . 0 by A4, A18, FUNCT_4:13
.= CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),0))) by A16, A4, A19, FUNCT_4:13 ;
then A20: S1[ 0 ] by A3;
now :: thesis: for k being Nat holds IC (Comput ((P2 +* (stop I)),(Initialize s2),k)) in dom (stop I)
let k be Nat; :: thesis: IC (Comput ((P2 +* (stop I)),(Initialize s2),k)) in dom (stop I)
A21: for k being Nat holds S1[k] from NAT_1:sch 2(A20, A6);
IC (Comput ((P1 +* (stop I)),(Initialize s1),k)) in dom (stop I) by A5;
hence IC (Comput ((P2 +* (stop I)),(Initialize s2),k)) in dom (stop I) by A21; :: thesis: verum
end;
hence I is_closed_on s2,P2 ; :: thesis: I is_halting_on s2,P2
for k being Nat holds S1[k] from NAT_1:sch 2(A20, A6);
then CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),m))) = halt SCMPDS by A17;
then P2 +* (stop I) halts_on Initialize s2 by EXTPRO_1:29;
hence I is_halting_on s2,P2 ; :: thesis: verum