
theorem Th30:
  for A being Universal_Algebra for G being Subset of A
  holds G is GeneratorSet of A iff
  for I being Element of A ex n being Nat st I in G|^n
proof
  let A be Universal_Algebra;
  let B be Subset of A;
  set X = the set of all B|^n where n is Element of NAT;
  consider C being Subset of A such that
A1: C = union X and
A2: C is opers_closed by Th24;
  B|^0 = B by Th18;
  then
A3: B in X;

  thus B is GeneratorSet of A implies for I being Element of A
  ex n being Nat st I in B|^n
  proof
    assume for D being Subset of A st D is opers_closed & B c= D
    holds D = the carrier of A;
    then
A4: C = the carrier of A by A1,A2,A3,ZFMISC_1:74;
    let I be Element of A;
    consider Y being set such that
A5: I in Y and
A6: Y in X by A1,A4,TARSKI:def 4;
    ex n being Element of NAT st Y = B|^n by A6;
    hence thesis by A5;
  end;
  assume
A7: for I being Element of A ex n being Nat st I in B|^n;
  let D be Subset of A;
  assume that
A8: D is opers_closed and
A9: B c= D;
A10: union X c= D by A8,A9,Th25;
  thus D c= the carrier of A;
  let x be object;
  assume x in the carrier of A;
  then reconsider I = x as Element of A;
  consider n being Nat such that
A11: I in B|^n by A7;
  reconsider n as Element of NAT by ORDINAL1:def 12;
  B|^n in X;
  then I in union X by A11,TARSKI:def 4;
  hence thesis by A10;
end;
