reserve k, m for Nat,
  x, x1, x2, x3, y, y1, y2, y3, X,Y,Z for set,
  N for with_zero set;
reserve n,m for Nat;

theorem
 for S being IC-Ins-separated non empty with_non-empty_values AMI-Struct over N
 for s being State of S, I being Program of S
 for P1,P2 being Instruction-Sequence of S
  st I c= P1 & I c= P2 &
     for m st m < n holds IC Comput(P2,s,m) in dom I
 for m st m <= n holds Comput(P1,s,m) =  Comput(P2,s,m)
proof
 let S be IC-Ins-separated non empty with_non-empty_values AMI-Struct over N;
 let s be State of S, I be Program of S;
 let P1,P2 be Instruction-Sequence of S
 such that
A1: I c= P1 & I c= P2;
  assume that
A2: for m st m < n holds IC Comput(P2,s,m) in dom I;
  defpred X[Nat] means $1 <= n implies
    Comput(P1,s,$1) =  Comput(P2,s,$1);
A3: for m st X[m] holds X[m+1]
  proof
    let m such that
A4: X[m];
A5: Comput(P2,s,m+1) = Following(P2,Comput(P2,s,m)) by EXTPRO_1:3
      .= Exec(CurInstr(P2,Comput(P2,s,m)),Comput(P2,s,m));
A6: Comput(P1,s,m+1) = Following(P1,Comput(P1,s,m)) by EXTPRO_1:3
      .= Exec(CurInstr(P1,Comput(P1,s,m)),Comput(P1,s,m));
    assume
A7: m+1 <= n;
    then m < n by NAT_1:13;
    then
A8: IC Comput(P1,s,m) = IC Comput(P2,s,m) by A4;
    m < n by A7,NAT_1:13;
    then
A9: IC Comput(P2,s,m) in dom I by A2;
    dom P2 = NAT by PARTFUN1:def 2;
    then
A10:  IC Comput(P2,s,m) in dom P2;
    dom P1 = NAT by PARTFUN1:def 2;
    then IC Comput(P1,s,m) in dom P1;
    then CurInstr(P1,Comput(P1,s,m))
       = P1.IC( Comput(P1,s,m)) by PARTFUN1:def 6
      .= I.IC( Comput(P1,s,m)) by A9,A8,A1,GRFUNC_1:2
      .= P2.IC Comput(P2,s,m) by A9,A8,A1,GRFUNC_1:2
      .= CurInstr(P2,Comput(P2,s,m)) by A10,PARTFUN1:def 6;
    hence thesis by A4,A6,A5,A7,NAT_1:13;
  end;
A11: X[0];
  thus for m holds X[m] from NAT_1:sch 2(A11,A3);
end;
