
theorem Th7:
  for Gs being ManySortedSet of NAT st Gs is halting & Gs is
  iterative holds Gs is eventually-constant
proof
  let Gs be ManySortedSet of NAT such that
A1: Gs is halting and
A2: Gs is iterative;
  set GL = Gs.Lifespan();
  defpred P[Nat] means Gs.GL = Gs.(GL+$1);
A3: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat;
    assume P[k];
    then Gs.(GL+1) = Gs.(GL+k+1) by A2;
    hence thesis by A1,GLIB_000:def 56;
  end;
A4: P[ 0 ];
A5: for k being Nat holds P[k] from NAT_1:sch 2(A4,A3);
  now
    let n be Nat;
    assume GL <= n;
    then ex i being Nat st GL + i = n by NAT_1:10;
    hence Gs.GL = Gs.n by A5;
  end;
  hence thesis;
end;
