reserve N for with_zero set;
reserve N for with_zero set;
reserve x,y,z,A,B for set,
  f,g,h for Function,
  i,j,k for Nat;
reserve S for IC-Ins-separated non empty
     with_non-empty_values AMI-Struct over N,
  s for State of S;
reserve N for non empty with_zero set,
 S for IC-Ins-separated non empty with_non-empty_values AMI-Struct over N,
  s for State of S;
reserve n for Nat;

theorem Th7:
  for S being IC-Ins-separated halting
non empty with_non-empty_values AMI-Struct over N
  for P being Instruction-Sequence of S
  for s being State of S, k st P.IC Comput(P,s,k) = halt S
  holds Result(P,s) = Comput(P,s,k)
proof
  let S be IC-Ins-separated halting non empty with_non-empty_values
         AMI-Struct over N;
  let P be Instruction-Sequence of S;
  let s be State of S, k;
A1: dom P = NAT by PARTFUN1:def 2;
  assume P.IC Comput(P,s,k) = halt S;
  then
A2: CurInstr(P,Comput(P,s,k)) = halt S by A1,PARTFUN1:def 6;
  then P halts_on s by A1;
 hence thesis by A2,Def9;
end;
