reserve n,m,k,k1,k2,i,j for Nat;
reserve x,y,z for object,X,Y,Z for set;
reserve A for Subset of X;
reserve B,A1,A2,A3 for SetSequence of X;
reserve Si for SigmaField of X;
reserve S,S1,S2,S3 for SetSequence of Si;

theorem Th15:
  for X, B for f being Function st dom f = NAT & for n holds f.n =
  meet {B.k: n <= k} holds f is SetSequence of X
proof
  let X, B;
  let f be Function such that
A1: dom f = NAT and
A2: for n holds f.n = meet {B.k: n <= k};
  rng f c= bool X
  proof
    let z be object;
    assume z in rng f;
    then consider x being object such that
A3: x in dom f and
A4: z = f.x by FUNCT_1:def 3;
    reconsider n = x as Element of NAT by A1,A3;
    set Y = {B.k: n <= k};
    set y = meet Y;
A5: y is Subset of X
    proof
     per cases;
     suppose Y<>{};
        then consider Z1 being object such that
A6:     Z1 in Y by XBOOLE_0:def 1;
      reconsider Z1 as set by TARSKI:1;
      consider k1 being Nat such that
A7:    Z1 = B.k1 & n <= k1 by A6;
      reconsider k1 as Element of NAT by ORDINAL1:def 12;
        now
          let x be object;
          assume x in y;
          then x in Z1 by A6,SETFAM_1:def 1;
          then x in B.k1 by A7;
          hence x in X;
        end;
        hence thesis by TARSKI:def 3;
      end;
      suppose Y = {};
        then y = {} by SETFAM_1:def 1;
        hence thesis by XBOOLE_1:2;
      end;
    end;
    z = y by A2,A4;
    hence thesis by A5;
  end;
  hence thesis by A1,FUNCT_2:2;
end;
