theorem Th16:
  for S being IC-Ins-separated halting
non empty with_non-empty_values AMI-Struct over N,
  p be NAT-defined (the InstructionsF of S)-valued Function,
    s being State of S holds p halts_on s
   iff ex i st p halts_at IC Comput(p,s,i)
proof
  let S be IC-Ins-separated halting
  non empty with_non-empty_values AMI-Struct over N;
  let p be NAT-defined (the InstructionsF of S)-valued Function;
  let s be State of S;
  hereby
    assume p halts_on s;
    then consider i being Nat such that
A1: IC Comput(p,s,i) in dom p and
A2: CurInstr(p,Comput(p,s,i)) = halt S;
     reconsider i as Nat;
    take i;
    p.IC Comput(p,s,i) = halt S by A1,A2,PARTFUN1:def 6;
    hence p halts_at IC Comput(p,s,i) by A1;
  end;
  given i being Nat such that
A3: p halts_at IC Comput(p,s,i);
A4: IC Comput(p,s,i) in dom p by A3;
A5: p.IC Comput(p,s,i) = halt S by A3;
  take i;
  thus IC Comput(p,s,i) in dom p by A3;
  thus CurInstr(p,Comput(p,s,i)) = halt S by A4,A5,PARTFUN1:def 6;
end;
