
theorem
  for V being RealUnitarySpace, W1,W2 being Subspace of V holds (ex W
  being Subspace of V st the carrier of W = (the carrier of W1) \/ (the carrier
  of W2)) iff W1 is Subspace of W2 or W2 is Subspace of W1
proof
  let V be RealUnitarySpace;
  let W1,W2 be Subspace of V;
  set VW1 = the carrier of W1;
  set VW2 = the carrier of W2;
  thus (ex W being Subspace of V st the carrier of W = (the carrier of W1) \/
  (the carrier of W2)) implies W1 is Subspace of W2 or W2 is Subspace of W1
  proof
    given W be Subspace of V such that
A1: the carrier of W = (the carrier of W1) \/ (the carrier of W2);
    set VW = the carrier of W;
    assume that
A2: not W1 is Subspace of W2 and
A3: not W2 is Subspace of W1;
    not VW2 c= VW1 by A3,RUSUB_1:22;
    then consider y being object such that
A4: y in VW2 and
A5: not y in VW1;
    reconsider y as Element of VW2 by A4;
    reconsider y as VECTOR of V by RUSUB_1:3;
    reconsider A1 = VW as Subset of V by RUSUB_1:def 1;
A6: A1 is linearly-closed by RUSUB_1:28;
    not VW1 c= VW2 by A2,RUSUB_1:22;
    then consider x being object such that
A7: x in VW1 and
A8: not x in VW2;
    reconsider x as Element of VW1 by A7;
    reconsider x as VECTOR of V by RUSUB_1:3;
A9: now
      reconsider A2 = VW2 as Subset of V by RUSUB_1:def 1;
A10:  A2 is linearly-closed by RUSUB_1:28;
      assume x + y in VW2;
      then (x + y) - y in VW2 by A10,RLSUB_1:3;
      then x + (y - y) in VW2 by RLVECT_1:def 3;
      then x + 0.V in VW2 by RLVECT_1:15;
      hence contradiction by A8,RLVECT_1:4;
    end;
A11: now
      reconsider A2 = VW1 as Subset of V by RUSUB_1:def 1;
A12:  A2 is linearly-closed by RUSUB_1:28;
      assume x + y in VW1;
      then (y + x) - x in VW1 by A12,RLSUB_1:3;
      then y + (x - x) in VW1 by RLVECT_1:def 3;
      then y + 0.V in VW1 by RLVECT_1:15;
      hence contradiction by A5,RLVECT_1:4;
    end;
    x in VW & y in VW by A1,XBOOLE_0:def 3;
    then x + y in VW by A6,RLSUB_1:def 1;
    hence thesis by A1,A11,A9,XBOOLE_0:def 3;
  end;
A13: now
    assume W1 is Subspace of W2;
    then VW1 c= VW2 by RUSUB_1:def 1;
    then VW1 \/ VW2 = VW2 by XBOOLE_1:12;
    hence thesis;
  end;
A14: now
    assume W2 is Subspace of W1;
    then VW2 c= VW1 by RUSUB_1:def 1;
    then VW1 \/ VW2 = VW1 by XBOOLE_1:12;
    hence thesis;
  end;
  assume W1 is Subspace of W2 or W2 is Subspace of W1;
  hence thesis by A13,A14;
end;
