reserve V for Universe,
  a,b,x,y,z,x9,y9 for Element of V,
  X for Subclass of V,
  o,p,q,r,s,t,u,a1,a2,a3,A,B,C,D for set,
  K,L,M for Ordinal,
  n for Element of omega,
  fs for finite Subset of omega,
  e,g,h for Function,
  E for non empty set,
  f for Function of VAR,E,
  k,k1 for Element of NAT,
  v1,v2,v3 for Element of VAR,
  H,H9 for ZF-formula;

theorem Th4:
  X is closed_wrt_A1-A7 & A in X & B in X implies A \/ B in X & A\B
  in X & A(#)B in X
proof
  assume that
A1: X is closed_wrt_A1-A7 and
A2: A in X and
A3: B in X;
  reconsider b=B as Element of V by A3;
  reconsider a=A as Element of V by A2;
A4: {a} in X & {b} in X by A1,A2,A3,Th2;
  set D={x \/ y: x in {a} & y in {b}};
A5: now
    let o be object;
A6: now
      assume o in D;
      then consider x,y such that
A7:   o=x \/ y and
A8:   x in {a} and
A9:   y in {b};
      x=a by A8,TARSKI:def 1;
      hence o=a \/ b by A7,A9,TARSKI:def 1;
    end;
    now
A10:  a in {a} & b in {b} by TARSKI:def 1;
      assume o=a \/ b;
      hence o in D by A10;
    end;
    hence o in D iff o=a \/ b by A6;
  end;
  X is closed_wrt_A5 by A1;
  then D in X by A4;
  then {a \/ b} in X by A5,TARSKI:def 1;
  hence A \/ B in X by A1,Th2;
  set D={x\y: x in {a} & y in {b}};
A11: now
    let o be object;
A12: now
      assume o in D;
      then consider x,y such that
A13:  o=x\y and
A14:  x in {a} and
A15:  y in {b};
      x=a by A14,TARSKI:def 1;
      hence o=a\b by A13,A15,TARSKI:def 1;
    end;
    now
A16:  a in {a} & b in {b} by TARSKI:def 1;
      assume o=a\b;
      hence o in D by A16;
    end;
    hence o in D iff o=a\b by A12;
  end;
  X is closed_wrt_A6 by A1;
  then D in X by A4;
  then {a\b} in X by A11,TARSKI:def 1;
  hence A\B in X by A1,Th2;
  set D={x(#)y: x in {a} & y in {b}};
A17: now
    let o be object;
A18: now
      assume o in D;
      then consider x,y such that
A19:  o=x(#)y and
A20:  x in {a} and
A21:  y in {b};
      x=a by A20,TARSKI:def 1;
      hence o=a(#)b by A19,A21,TARSKI:def 1;
    end;
    now
A22:  a in {a} & b in {b} by TARSKI:def 1;
      assume o=a(#)b;
      hence o in D by A22;
    end;
    hence o in D iff o=a(#)b by A18;
  end;
  X is closed_wrt_A7 by A1;
  then D in X by A4;
  then {a(#)b} in X by A17,TARSKI:def 1;
  hence thesis by A1,Th2;
end;
