reserve e,u for set;
reserve X, Y for non empty TopSpace;

theorem Th5:
  for X, Y being TopSpace for B being Subset of [:X,Y:] holds B is
  open iff ex A being Subset-Family of [:X,Y:] st B = union A & for e st e in A
  ex X1 being Subset of X, Y1 being Subset of Y st e = [:X1,Y1:] & X1 is open &
  Y1 is open
proof
  let X, Y be TopSpace;
  let B be Subset of [:X,Y:];
A1: the topology of [:X,Y:] = { union A where A is Subset-Family of [:X,Y:]:
  A c= { [:X1,Y1:] where X1 is Subset of X, Y1 is Subset of Y : X1 in the
  topology of X & Y1 in the topology of Y}} by Def2;
  thus B is open implies ex A being Subset-Family of [:X,Y:] st B = union A &
for e st e in A ex X1 being Subset of X, Y1 being Subset of Y st e = [:X1,Y1:]
  & X1 is open & Y1 is open
  proof
    assume B in the topology of [:X,Y:];
    then consider A being Subset-Family of [:X,Y:] such that
A2: B = union A and
A3: A c= { [:X1,Y1:] where X1 is Subset of X, Y1 is Subset of Y : X1
    in the topology of X & Y1 in the topology of Y} by A1;
    take A;
    thus B = union A by A2;
    let e;
    assume e in A;
    then e in { [:X1,Y1:] where X1 is Subset of X, Y1 is Subset of Y : X1 in
    the topology of X & Y1 in the topology of Y} by A3;
    then consider X1 being Subset of X, Y1 being Subset of Y such that
A4: e = [:X1,Y1:] & X1 in the topology of X & Y1 in the topology of Y;
    reconsider Y1 as Subset of Y;
    reconsider X1 as Subset of X;
    take X1,Y1;
    thus thesis by A4;
  end;
  given A being Subset-Family of [:X,Y:] such that
A5: B = union A and
A6: for e st e in A ex X1 being Subset of X, Y1 being Subset of Y st e
  = [:X1,Y1:] & X1 is open & Y1 is open;
  A c= { [:X1,Y1:] where X1 is Subset of X, Y1 is Subset of Y : X1 in the
  topology of X & Y1 in the topology of Y}
  proof
    let e be object;
    assume e in A;
    then consider X1 being Subset of X, Y1 being Subset of Y such that
A7: e = [:X1,Y1:] and
A8: X1 is open & Y1 is open by A6;
    X1 in the topology of X & Y1 in the topology of Y by A8;
    hence thesis by A7;
  end;
  hence B in the topology of [:X,Y:] by A1,A5;
end;
