reserve
  a,b,c,d,e for Ordinal,
  m,n for Nat,
  f for Ordinal-Sequence,
  x for object;
reserve S,S1,S2 for Sequence;

theorem Th40:
  for e being epsilon Ordinal holds first_epsilon_greater_than e = e |^|^ omega
  proof let e be epsilon Ordinal;
    deffunc phi(Ordinal) = exp(omega, $1);
A1: for a,b st a in b holds phi(a) in phi(b) by ORDINAL4:24;
A2: now let a such that
A3:   a is non empty limit_ordinal;
      let phi being Ordinal-Sequence such that
A4:   dom phi = a & for b st b in a holds phi.b = phi(b);
      phi is non-decreasing
      proof
        let b,c; assume
A5:     b in c & c in dom phi; then
        phi.b = phi(b) & phi.c = phi(c) by A4,ORDINAL1:10; then
        phi.b in phi.c by A5,ORDINAL4:24;
        hence thesis by ORDINAL1:def 2;
      end; then
      Union phi is_limes_of phi & phi(a) = lim phi by A3,A4,Th6,ORDINAL2:45;
      hence phi(a) is_limes_of phi by ORDINAL2:def 10;
    end;
    deffunc F(Ordinal,Ordinal) = phi($2);
    deffunc G(Ordinal,Ordinal-Sequence) = lim $2;
    consider f being Ordinal-Sequence such that
A6: dom f = omega and
A7: 0 in omega implies f.0 = succ e and
A8: for a st succ a in omega holds f.(succ a) = F(a,f.a) and
    for a st a in omega & a <> 0 & a is limit_ordinal
    holds f.a = G(a,f|a) from ORDINAL2:sch 11;
A9: dom f = omega & f.0 = succ e by A6,A7;
A10: for a st a in omega holds f.(succ a) = phi(f.a) by A8,ORDINAL1:28;
A11: succ e c= Union f & phi(Union f) = Union f &
    for b st succ e c= b & phi(b) = b holds Union f c= b
    from CriticalNumber2(A1,A2,A9,A10);
    Union f is epsilon
    by A11; then
    reconsider e9 = Union f as epsilon Ordinal;
A12: now e in succ e by ORDINAL1:6;
      hence e in e9 by A11;
      let b be epsilon Ordinal; assume e in b; then
      succ e c= b & phi(b) = b by Def5,ORDINAL1:21;
      hence e9 c= b by A11;
    end;
A13: succ 0 = 1 & succ 1 = 2 & succ 2 = 3; then
A14: f.1 = phi(succ e) by A7,A8 .= omega*^phi(e) by ORDINAL2:44
    .= omega*^e by Def5; then
A15: f.2 = phi(omega*^e) by A13,A8 .= exp(phi(e), omega) by ORDINAL4:31
    .= exp(e, omega) by Def5; then
A16: f.3 = phi(exp(e, omega)) by A13,A8 .= exp(e, exp(e, omega)) by Th38;
A17: e|^|^0 = 1 & e|^|^1 = e & e|^|^2 = exp(e, e) by Th13,Th16,Th18;
    omega in e & 1 in omega by Th37; then
A18: 1 in e by ORDINAL1:10; then
    exp(e,1) in exp(e, e) & exp(e,1) in exp(e, omega) by ORDINAL4:24; then
A19: e in exp(e, e) & e in exp(e, omega) by ORDINAL2:46;
    defpred I[Nat] means e|^|^$1 in f.($1+1) & f.$1 in e|^|^($1+2);
    e in exp(e,e) & exp(e,e) is limit_ordinal
      by A17,A18,Th24,Th9,ORDINAL3:8; then
A20: I[0] by A7,A14,A17,ORDINAL1:28,ORDINAL3:32;
A21: for n st I[n] holds I[n+1]
    proof
      let n such that
A22:   I[n];
A23:   Segm(n+1) = succ Segm n & Segm(n+1+1) = succ  Segm(n+1) &
        n in omega & n+1 in omega
      by NAT_1:38,ORDINAL1:def 12; then
A24:   f.(n+1) = phi(f.n) & f.(n+1+1) = phi(f.(n+1)) by A10;
      thus e|^|^(n+1) in f.(n+1+1)
      proof
        per cases by NAT_1:23;
        suppose n = 0;
          hence thesis by A15,Th16,A19;
        end;
        suppose n = 1;
          hence thesis by A16,A17,A18,A19,ORDINAL4:24;
        end;
        suppose n >= 2; then
          consider k being Nat such that
A25:       n = 2+k by NAT_1:10;
          0 in Segm(k+1) & k+2 = k+1+1 by NAT_1:44; then
          phi(e|^|^(k+2)) = e|^|^(k+1+2) by Th39;
          hence thesis by A24,A25,A22,ORDINAL4:24;
        end;
      end;
      0 in Segm(n+1) & n+2 = n+1+1 by NAT_1:44; then
      phi(e|^|^(n+2)) = e|^|^(n+1+2) by Th39; then
      phi(f.n) in e|^|^(n+1+2) by A22,ORDINAL4:24;
      hence f.(n+1) in e|^|^(n+1+2) by A23,A10;
    end;
A26: for n holds I[n] from NAT_1:sch 2(A20,A21);
    deffunc G(Ordinal) = e|^|^$1;
    consider g being Ordinal-Sequence such that
A27: dom g = omega & for a st a in omega holds g.a = G(a) from ORDINAL2:sch 3;
A28: e |^|^ omega = lim g by A27,Th15;
    1 in omega & omega in e by Th37; then
    1 in e by ORDINAL1:10; then
    g is increasing Ordinal-Sequence by A27,Th25; then
    Union g is_limes_of g by A27,Th6; then
A29: e |^|^ omega = Union g by A28,ORDINAL2:def 10;
    e9 = Union g
    proof
      thus e9 c= Union g
      proof
        let x be Ordinal; assume x in e9; then
        consider a being object such that
A30:     a in dom f & x in f.a by CARD_5:2;
        reconsider a as Element of omega by A6,A30;
        f.a in e|^|^(a+2) & g.(a+2) = G(a+2) by A26,A27; then
        f.a in Union g by A27,CARD_5:2;
        hence thesis by A30,ORDINAL1:10;
      end;
      let x be Ordinal; assume x in Union g; then
      consider a being object such that
A31:   a in dom g & x in g.a by CARD_5:2;
      reconsider a as Element of omega by A27,A31;
      a+1 in omega & e|^|^a in f.(a+1) & g.a = G(a) by A26,A27; then
      g.a in Union f by A6,CARD_5:2;
      hence thesis by A31,ORDINAL1:10;
    end;
    hence thesis by A12,A29,Def6;
  end;
