reserve E for RealLinearSpace;
reserve A, B, C for binary-image of E;
reserve a, b, v for Element of E;
reserve F, G for binary-image-family of E;
reserve A, B, C for non empty binary-image of E;

theorem Th9:
  ((the carrier of E) \ A)(+)B = (the carrier of E) \ (A(-)B)
  & ((the carrier of E) \ A)(-)B = (the carrier of E) \ (A(+)B)
  proof
    per cases;
    suppose
      A1: A = the carrier of E;
      reconsider X = {} as Subset of E by XBOOLE_1:2;
      thus ((the carrier of E) \ A)(+)B = X(+)B by A1,XBOOLE_1:37
      .= {} by Th1
      .= (the carrier of E) \ (the carrier of E) by XBOOLE_1:37
      .= (the carrier of E) \ (A(-)B) by A1,Th4;
      thus ((the carrier of E) \ A) (-)B = X(-)B by A1,XBOOLE_1:37
      .= {} by Th2
      .= (the carrier of E) \ (the carrier of E) by XBOOLE_1:37
      .= (the carrier of E) \ (A(+)B) by A1,Th3;
    end;
    suppose
      A2: A <> the carrier of E;
      A3: (the carrier of E) \ A is non empty
      by XBOOLE_1:37,A2;
      A4: for x be object holds x in {v where v is Element of E:
      (v + (-1)*B) /\ ((the carrier of E) \ A) <> {}}
      iff x in (the carrier of E)
      & not x in ({v where v is Element of E: v + (-1)*B c= A })
      proof
        let x be object;
        hereby
          assume x in {v where v is Element of E:
          (v + (-1)*B) /\ ( (the carrier of E) \ A) <> {}};
          then
          consider v be Element of E such that
          A5: x=v & (v + (-1)*B) /\ ((the carrier of E) \ A) <> {};
          thus x in (the carrier of E) by A5;
          thus not x in ({ w where w is Element of E: w + (-1)*B c= A })
          proof
            assume x in ({w where w is Element of E: w + (-1)*B c= A});
            then
            consider w be Element of E such that
            A6: w = x & w + (-1)*B c= A;
            (v + (-1)*B) misses ((the carrier of E) \ A)
            by A5,A6,XBOOLE_1:85;
            hence contradiction by A5;
          end;
        end;
        assume
        A7: x in (the carrier of E)
        & not x in ({v where v is Element of E: v + (-1)*B c= A });
        then
        reconsider w=x as Element of E;
        now assume (w + (-1)*B) /\ ((the carrier of E) \ A) = {};
          then {} = ((w + (-1)*B) /\ (the carrier of E)) \ A by XBOOLE_1:49
          .= (w + (-1)*B) \ A by XBOOLE_1:28;
          then (w + (-1)*B) c= A by XBOOLE_1:37;
          hence contradiction by A7;
        end;
        hence x in {v where v is Element of E:
        (v + (-1)*B) /\ ((the carrier of E) \ A) <> {}};
      end;

      A8: for x be object holds
      x in {v where v is Element of E: v + (-1)*B c= ((the carrier of E) \ A)}
      iff
      x in the carrier of E
      & not x in {v where v is Element of E: (v + (-1)*B) /\ A <> {}}
      proof
        let x be object;
        hereby
          assume x in {v where v is Element of E:
          (v + (-1)*B) c= ((the carrier of E) \ A)};
          then consider v be Element of E such that
          A9: x = v & (v + (-1)*B) c= ((the carrier of E) \ A);
          thus x in (the carrier of E) by A9;
          thus not x in
          {w where w is Element of E: (w + (-1)*B) /\ A <> {}}
          proof
            assume x in {w where w is Element of E: (w + (-1)*B) /\ A <> {}};
            then
            consider w be Element of E such that
            A10: w=x & (w + (-1)*B) /\  A  <> {};
            (w + (-1)*B) misses (the carrier of E) \ ((the carrier of E) \ A)
            by A9,A10,XBOOLE_1:85;
            then (w + (-1)*B) misses (the carrier of E) /\ A by XBOOLE_1:48;
            then (w + (-1)*B) misses A by XBOOLE_1:28;
            hence contradiction by A10;
          end;
        end;

        assume
        A11: x in (the carrier of E)
        & not x in ({v where v is Element of E: (v + (-1)*B) /\ A <> {}});
        then reconsider w = x as Element of E;
        reconsider w = x as Element of E by A11;
        (w + (-1)*B) \ ((the carrier of E) \ A)
        = ((w + (-1)*B) \ (the carrier of E)) \/ ((w + (-1)*B) /\ A)
        by XBOOLE_1:52
        .= {} \/ ((w + (-1)*B) /\ A) by XBOOLE_1:37
        .= {} by A11;
        then w + (-1)*B c= ((the carrier of E) \ A) by XBOOLE_1:37;
        hence
        x in ({v where v is Element of E: v + (-1)*B
        c= ((the carrier of E) \ A)});
      end;
      thus ((the carrier of E) \ A)(+)B = {v where v is Element of E:

      (v + (-1)*B) /\ ((the carrier of E) \ A) <> {}} by Th7,A3
      .= (the carrier of E) \ ({v where v is Element of E: v + (-1)*B c= A})
      by A4,XBOOLE_0:def 5
      .= (the carrier of E) \ (A(-)B ) by Th8;
      thus ((the carrier of E) \ A)(-)B
      = {v where v is Element of E: v + (-1)*B c= ((the carrier of E) \ A)}
      by Th8,A3
      .= (the carrier of E)
      \ {v where v is Element of E: (v + (-1)*B) /\ A <> {}}
      by A8,XBOOLE_0:def 5
      .= (the carrier of E) \ (A(+)B) by Th7;
    end;
  end;
