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 Th11:
  for S being halting IC-Ins-separated
   non empty with_non-empty_values AMI-Struct over N
  for l being Nat
  for P being NAT-defined (the InstructionsF of S)-valued Function
   st l .--> halt S c= P
  for p being l-started PartState of S
  for s being State of S st p c= s
   for i holds Comput(P,s,i) = s
proof
  let S be halting IC-Ins-separated
   non empty with_non-empty_values AMI-Struct over N;
  let l be Nat;
  let P be NAT-defined (the InstructionsF of S)-valued Function such that
A1: l .--> halt S c= P;
  let p be l-started PartState of S;
   set h = halt S;
  let s be State of S such that
A2: p c= s;
A3: Start-At(l,S) c= p by MEMSTR_0:29;
  defpred P[Nat] means Comput(P,s,$1) = s;
A4: Start-At(l,S) c= s by A3,A2,XBOOLE_1:1;
A5: now
    let i;
    assume
A6: P[i];
    Comput(P,s,i+1)
       = Following(P, s) by A6,Th3
      .= Exec(halt S,s) by A4,A1,Th9
      .= s by Def3;
    hence P[i+1];
  end;
A7: P[ 0];
  thus for i holds P[i] from NAT_1:sch 2(A7,A5);
end;
