reserve X for TopSpace;
reserve X for non empty TopSpace;
reserve X1, X2, X3 for non empty SubSpace of X;
reserve X1, X2, X3 for non empty SubSpace of X;
reserve X for TopSpace;
reserve A1, A2 for Subset of X;
reserve A1,A2 for Subset of X;
reserve X for TopSpace,
  A1, A2 for Subset of X;
reserve X for non empty TopSpace,
  A1, A2 for Subset of X;

theorem Th55:
  A1,A2 are_weakly_separated & not A1 c= A2 & not A2 c= A1 implies
ex C1, C2 being non empty Subset of X st C1 is closed & C2 is closed & C1 /\ (
A1 \/ A2) c= A1 & C2 /\ (A1 \/ A2) c= A2 & (A1 \/ A2 c= C1 \/ C2 or ex C being
non empty Subset of X st C is open & C /\ (A1 \/ A2) c= A1 /\ A2 & the carrier
  of X = (C1 \/ C2) \/ C)
proof
  assume that
A1: A1,A2 are_weakly_separated and
A2: not A1 c= A2 and
A3: not A2 c= A1;
  set B1 = A1 \ A2, B2 = A2 \ A1;
A4: B1 <> {} by A2,XBOOLE_1:37;
A5: B2 <> {} by A3,XBOOLE_1:37;
A6: A1 c= A1 \/ A2 by XBOOLE_1:7;
A7: A2 c= A1 \/ A2 by XBOOLE_1:7;
  consider C1, C2, C being Subset of X such that
A8: C1 /\ (A1 \/ A2) c= A1 and
A9: C2 /\ (A1 \/ A2) c= A2 and
A10: C /\ (A1 \/ A2) c= A1 /\ A2 and
A11: the carrier of X = (C1 \/ C2) \/ C and
A12: C1 is closed & C2 is closed and
A13: C is open by A1,Th54;
  A1 /\ A2 c= A1 by XBOOLE_1:17;
  then C /\ (A1 \/ A2) c= A1 by A10,XBOOLE_1:1;
  then C /\ (A1 \/ A2) \/ C1 /\ (A1 \/ A2) c= A1 by A8,XBOOLE_1:8;
  then (C \/ C1) /\ (A1 \/ A2) c= A1 by XBOOLE_1:23;
  then B2 c= (A1 \/ A2) \ (C \/ C1) /\ (A1 \/ A2) by A7,XBOOLE_1:35;
  then
A14: B2 c= (A1 \/ A2) \ (C \/ C1) by XBOOLE_1:47;
  A1 /\ A2 c= A2 by XBOOLE_1:17;
  then C /\ (A1 \/ A2) c= A2 by A10,XBOOLE_1:1;
  then C2 /\ (A1 \/ A2) \/ C /\ (A1 \/ A2) c= A2 by A9,XBOOLE_1:8;
  then (C2 \/ C) /\ (A1 \/ A2) c= A2 by XBOOLE_1:23;
  then B1 c= (A1 \/ A2) \ (C2 \/ C) /\ (A1 \/ A2) by A6,XBOOLE_1:35;
  then
A15: B1 c= (A1 \/ A2) \ (C2 \/ C) by XBOOLE_1:47;
A16: A1 \/ A2 c= [#]X;
  then A1 \/ A2 c= (C \/ C1) \/ C2 by A11,XBOOLE_1:4;
  then (A1 \/ A2) \ (C \/ C1) c= C2 by XBOOLE_1:43;
  then reconsider D2 = C2 as non empty Subset of X by A14,A5,XBOOLE_1:1,3;
  A1 \/ A2 c= (C2 \/ C) \/ C1 by A11,A16,XBOOLE_1:4;
  then (A1 \/ A2) \ (C2 \/ C) c= C1 by XBOOLE_1:43;
  then reconsider D1 = C1 as non empty Subset of X by A15,A4,XBOOLE_1:1,3;
  take D1,D2;
  now
    assume
A17: not A1 \/ A2 c= C1 \/ C2;
    thus ex C being non empty Subset of X st the carrier of X = (C1 \/ C2) \/
    C & C /\ (A1 \/ A2) c= A1 /\ A2 & C is open
    proof
      reconsider C0 = C as non empty Subset of X by A11,A17;
      take C0;
      thus thesis by A10,A11,A13;
    end;
  end;
  hence thesis by A8,A9,A12;
end;
