reserve x,y,z for Variable,
  H for ZF-formula,
  E for non empty set,
  a,b,c,X,Y,Z for set,
  u,v,w for Element of E,
  f,g,h,i,j for Function of VAR,E;

theorem Th6:
  E is epsilon-transitive implies (E |= the_axiom_of_infinity iff
  ex u st u <> {} & for v st v in u ex w st v c< w & w in u)
proof
  assume
A1: X in E implies X c= E;
  thus E |= the_axiom_of_infinity implies ex u st u <> {} & for v st v in u ex
  w st v c< w & w in u
  proof
    set f = the Function of VAR,E;
    assume E,g |= the_axiom_of_infinity;
    then E,f |= the_axiom_of_infinity;
    then consider g such that
    for x st g.x <> f.x holds x0 = x or x1 = x and
A2: E,g |= x1 'in' x0 '&' All(x2,x2 'in' x0 => Ex(x3,x3 'in' x0 '&'
    'not' x3 '=' x2 '&' All(x4,x4 'in' x2 => x4 'in' x3) )) by ZF_MODEL:22;
    take u = g.x0;
    E,g |= x1 'in' x0 by A2,ZF_MODEL:15;
    hence u <> {} by ZF_MODEL:13;
    let v such that
A3: v in u;
    set h = g+*(x2,v);
    ( for x st h.x <> g.x holds x2 = x)& E,g |= All(x2,x2 'in' x0 => Ex(
x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,x4 'in' x2 => x4 'in' x3) )) by A2
,FUNCT_7:32,ZF_MODEL:15;
    then
A4: E,h |= x2 'in' x0 => Ex(x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,
    x4 'in' x2 => x4 'in' x3) ) by ZF_MODEL:16;
A5: h.x2= v by FUNCT_7:128;
    h.x0 = g.x0 by FUNCT_7:32;
    then E,h |= x2 'in' x0 by A3,A5,ZF_MODEL:13;
    then E,h |= Ex(x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,x4 'in' x2 =>
    x4 'in' x3) ) by A4,ZF_MODEL:18;
    then consider f such that
A6: for x st f.x <> h.x holds x3 = x and
A7: E,f |= x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,x4 'in' x2 => x4
    'in' x3) by ZF_MODEL:20;
A8: f.x0 = h.x0 by A6;
    take w = f.x3;
A9: E,f |= All(x4,x4 'in' x2 => x4 'in' x3) by A7,ZF_MODEL:15;
    thus v c= w
    proof
      let a be object such that
A10:  a in v;
      v c= E by A1;
      then reconsider a9 = a as Element of E by A10;
      set m = f+*(x4,a9);
A11:  m.x4= a9 by FUNCT_7:128;
      for x st m.x <> f.x holds x4 = x by FUNCT_7:32;
      then
A12:  E,m |= x4 'in' x2 => x4 'in' x3 by A9,ZF_MODEL:16;
      m.x2 = f.x2 & f.x2 = h.x2 by A6,FUNCT_7:32;
      then E,m |= x4 'in' x2 by A5,A10,A11,ZF_MODEL:13;
      then E,m |= x4 'in' x3 by A12,ZF_MODEL:18;
      then m.x4 in m.x3 by ZF_MODEL:13;
      hence thesis by A11,FUNCT_7:32;
    end;
A13: E,f |= x3 'in' x0 '&' 'not' x3 '=' x2 by A7,ZF_MODEL:15;
    then E,f |= 'not' x3 '=' x2 by ZF_MODEL:15;
    then not E,f |= x3 '=' x2 by ZF_MODEL:14;
    then f.x3 <> f.x2 by ZF_MODEL:12;
    hence v <> w by A5,A6;
A14: h.x0 = g.x0 by FUNCT_7:32;
    E,f |= x3 'in' x0 by A13,ZF_MODEL:15;
    hence thesis by A8,A14,ZF_MODEL:13;
  end;
  given u such that
A15: u <> {} and
A16: for v st v in u ex w st v c< w & w in u;
  set a = the Element of u;
  u c= E by A1;
  then reconsider a as Element of E by A15;
  let f0 be Function of VAR,E;
  set f1 = f0+*(x0,u);
  set f2 = f1+*(x1,a);
A17: f1.x0= u by FUNCT_7:128;
  now
    let f such that
A18: for x st f.x <> f2.x holds x2 = x;
    now
      assume E,f |= x2 'in' x0;
      then
A19:  f.x2 in f.x0 by ZF_MODEL:13;
      f.x0 = f2.x0 & f2.x0 = f1.x0 by A18,FUNCT_7:32;
      then consider w such that
A20:  f.x2 c< w and
A21:  w in u by A16,A17,A19;
      set g = f+*(x3,w);
A22:  g.x3= w by FUNCT_7:128;
A23:  f.x2 c=w by A20;
      now
        let h such that
A24:    for x st h.x <> g.x holds x4 = x;
        now
          assume E,h |= x4 'in' x2;
          then
A25:      h.x4 in h.x2 by ZF_MODEL:13;
A26:      h.x3 = g.x3 by A24;
          h.x2 = g.x2 & g.x2 = f.x2 by A24,FUNCT_7:32;
          hence E,h |= x4 'in' x3 by A23,A22,A25,A26,ZF_MODEL:13;
        end;
        hence E,h |= x4 'in' x2 => x4 'in' x3 by ZF_MODEL:18;
      end;
      then
A27:  E,g |= All(x4,x4 'in' x2 => x4 'in' x3) by ZF_MODEL:16;
A28:  f2.x0 = f1.x0 by FUNCT_7:32;
      g.x2 = f.x2 by FUNCT_7:32;
      then not E,g |= x3 '=' x2 by A20,A22,ZF_MODEL:12;
      then
A29:  E,g |= 'not' x3 '=' x2 by ZF_MODEL:14;
      g.x0 = f.x0 & f.x0 = f2.x0 by A18,FUNCT_7:32;
      then E,g |= x3 'in' x0 by A17,A21,A22,A28,ZF_MODEL:13;
      then E,g |= x3 'in' x0 '&' 'not' x3 '=' x2 by A29,ZF_MODEL:15;
      then
      ( for x st g.x <> f.x holds x3 = x)& E,g |= x3 'in' x0 '&' 'not' x3
'=' x2 '&' All(x4,x4 'in' x2 => x4 'in' x3) by A27,FUNCT_7:32,ZF_MODEL:15;
      hence E,f |= Ex(x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,x4 'in' x2
      => x4 'in' x3) ) by ZF_MODEL:20;
    end;
    hence
    E,f |= x2 'in' x0 => Ex(x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,
    x4 'in' x2 => x4 'in' x3) ) by ZF_MODEL:18;
  end;
  then
A30: E,f2 |= All(x2,x2 'in' x0 => Ex(x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&'
  All(x4,x4 'in' x2 => x4 'in' x3) )) by ZF_MODEL:16;
  f2.x1= a & f2.x0 = f1.x0 by FUNCT_7:32,128;
  then E,f2 |= x1 'in' x0 by A15,A17,ZF_MODEL:13;
  then
  ( for x st f2.x <> f1.x holds x1 = x)& E,f2 |= x1 'in' x0 '&' All(x2,x2
  'in' x0 => Ex(x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,x4 'in' x2 => x4
  'in' x3) )) by A30,FUNCT_7:32,ZF_MODEL:15;
  then
  ( for x st f1.x <> f0.x holds x0 = x)& E,f1 |= Ex(x1,x1 'in' x0 '&' All
(x2,x2 'in' x0 => Ex(x3,x3 'in' x0 '&' 'not' x3 '=' x2 '&' All(x4,x4 'in' x2 =>
  x4 'in' x3) ))) by FUNCT_7:32,ZF_MODEL:20;
  hence thesis by ZF_MODEL:20;
end;
