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

theorem Th9:
  for s1,s2 being State of SCMPDS,I being Program of SCMPDS st I
is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2
 holds LifeSpan(P1 +* stop I,Initialize s1)
  = LifeSpan(P2 +* stop I,Initialize s2) &
  Result(P1 +* stop I,Initialize s1)
 =  Result(P2 +* stop I,Initialize s2)
proof
  let s1,s2 be State of SCMPDS,I be Program of SCMPDS;
  assume
A1: I is_closed_on s1,P1;
  set ss1 = Initialize s1, PP1 = P1 +* stop I;
  set ss2 = Initialize s2, PP2 = P2 +* stop I;
  assume
A2: I is_halting_on s1,P1;
  then
A3: PP1 halts_on ss1 by SCMPDS_6:def 3;
  then
A4: Result(PP1,ss1) = Comput(PP1,ss1,LifeSpan(
PP1,ss1)) by EXTPRO_1:23;
  assume
A5: DataPart s1 = DataPart s2;
  then I is_halting_on s2,P2 by A1,A2,SCMPDS_6:23;
  then
A6: PP2 halts_on ss2 by SCMPDS_6:def 3;
A7: now
    let l be Nat;
    assume
A8: CurInstr(PP2,Comput(PP2,ss2,l)) = halt SCMPDS;
    CurInstr(PP1,Comput(PP1,ss1,l))
     = CurInstr(PP2,Comput(PP2,ss2,l))
      by A1,A5,Th6;
    hence LifeSpan(PP1,ss1) <= l by A3,A8,EXTPRO_1:def 15;
  end;
  CurInstr(PP2,
  Comput(PP2,ss2,LifeSpan(PP1,ss1))) =
   CurInstr(PP1,
   Comput(PP1,ss1,LifeSpan(PP1,ss1)))
    by A1,A5,Th6
    .= halt SCMPDS by A3,EXTPRO_1:def 15;
  hence LifeSpan(PP1,ss1) = LifeSpan(PP2,ss2) by A7,A6,EXTPRO_1:def 15;
  then Result(PP2,ss2) = Comput(PP2,ss2,LifeSpan(
PP1,ss1)) by A6,EXTPRO_1:23;
  hence thesis by A1,A5,A4,Th6;
end;
