reserve m,n for Nat,
  a for Int_position,
  i,j for Instruction of SCMPDS,
  s,s1,s2 for State of SCMPDS,
  k1 for Integer,
  loc for Nat,
  I,J,K for Program of SCMPDS;
reserve P,P1,P2 for Instruction-Sequence of SCMPDS;

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