reserve A,B,a,b,c,d,e,f,g,h for set;

theorem Th17:
  for G1,G2 being RelStr st the carrier of G1 misses the carrier
of G2 holds ComplRelStr union_of(G1,G2) = sum_of(ComplRelStr G1, ComplRelStr G2
  )
proof
  let G1,G2 be RelStr;
A1: the carrier of sum_of(ComplRelStr G1, ComplRelStr G2) = (the carrier of
  ComplRelStr G1) \/ (the carrier of ComplRelStr G2) by NECKLA_2:def 3
    .= (the carrier of G1) \/ the carrier of ComplRelStr G2 by NECKLACE:def 8
    .= (the carrier of G1) \/ the carrier of G2 by NECKLACE:def 8;
  set P = the InternalRel of ComplRelStr union_of(G1,G2), R = the InternalRel
  of sum_of(ComplRelStr G1,ComplRelStr G2), X1 = the InternalRel of ComplRelStr
  G1, X2 = the InternalRel of ComplRelStr G2, X3 = [:the carrier of ComplRelStr
  G1,the carrier of ComplRelStr G2:], X4 = [:the carrier of ComplRelStr G2,the
carrier of ComplRelStr G1:], X5 = [:the carrier of G1, the carrier of G1:], X6
  = [:the carrier of G2, the carrier of G2:], X7 = [:the carrier of G1, the
  carrier of G2:], X8 = [:the carrier of G2, the carrier of G1:];
  assume
A2: the carrier of G1 misses the carrier of G2;
A3: for a,b being object holds [a,b] in P iff [a,b] in R
  proof
    let a,b be object;
    set x = [a,b];
    thus x in P implies x in R
    proof
      assume x in P;
      then
A4:   x in (the InternalRel of union_of(G1,G2))` \ id the carrier of
      union_of(G1,G2) by NECKLACE:def 8;
      then x in [:the carrier of union_of(G1,G2),the carrier of union_of( G1,
      G2) :];
      then x in [:(the carrier of G1) \/ the carrier of G2, the carrier of
      union_of(G1,G2):] by NECKLA_2:def 2;
      then
A5:   x in [:(the carrier of G1) \/ the carrier of G2, (the carrier of G1
      ) \/ the carrier of G2:] by NECKLA_2:def 2;
      not x in id the carrier of union_of(G1,G2) by A4,XBOOLE_0:def 5;
      then
A6:   not x in id ((the carrier of G1) \/ the carrier of G2) by NECKLA_2:def 2;
A7:   not x in id the carrier of G1 & not x in id the carrier of G2
      proof
        assume not thesis;
        then x in id (the carrier of G1) \/ id (the carrier of G2) by
XBOOLE_0:def 3;
        hence contradiction by A6,SYSREL:14;
      end;
      the carrier of G1 = the carrier of ComplRelStr G1 & the carrier of
      G2 = the carrier of ComplRelStr G2 by NECKLACE:def 8;
      then x in X5 \/ X3 \/ X4 \/ X6 by A5,ZFMISC_1:98;
      then x in X5 \/ (X3 \/ X4 \/ X6) by XBOOLE_1:113;
      then x in X5 or x in (X3 \/ X4 \/ X6) by XBOOLE_0:def 3;
      then x in X5 or x in X3 \/ (X4 \/ X6) by XBOOLE_1:4;
      then
A8:   x in X5 or x in X3 or x in X4 \/ X6 by XBOOLE_0:def 3;
      x in (the InternalRel of union_of(G1,G2))` by A4,XBOOLE_0:def 5;
      then
      x in [:the carrier of union_of(G1,G2),the carrier of union_of(G1, G2
      ):] \ (the InternalRel of union_of(G1,G2)) by SUBSET_1:def 4;
      then not x in (the InternalRel of union_of(G1,G2)) by XBOOLE_0:def 5;
      then
A9:   not x in (the InternalRel of G1) \/ the InternalRel of G2 by
NECKLA_2:def 2;
      then
A10:  not x in the InternalRel of G1 by XBOOLE_0:def 3;
A11:  not x in the InternalRel of G2 by A9,XBOOLE_0:def 3;
      per cases by A8,XBOOLE_0:def 3;
      suppose
        x in [:the carrier of G1,the carrier of G1:];
        then
        x in [:the carrier of G1,the carrier of G1:] \ the InternalRel of
        G1 by A10,XBOOLE_0:def 5;
        then x in (the InternalRel of G1)` by SUBSET_1:def 4;
        then x in (the InternalRel of G1)` \ id the carrier of G1 by A7,
XBOOLE_0:def 5;
        then x in X1 by NECKLACE:def 8;
        then x in X1 \/ (X2 \/ X3 \/ X4) by XBOOLE_0:def 3;
        then x in X1 \/ X2 \/ X3 \/ X4 by XBOOLE_1:113;
        hence thesis by NECKLA_2:def 3;
      end;
      suppose
        x in X3;
        then x in X2 \/ X3 by XBOOLE_0:def 3;
        then x in X2 \/ X3 \/ X4 by XBOOLE_0:def 3;
        then x in X1 \/ (X2 \/ X3 \/ X4) by XBOOLE_0:def 3;
        then x in X1 \/ X2 \/ X3 \/ X4 by XBOOLE_1:113;
        hence thesis by NECKLA_2:def 3;
      end;
      suppose
        x in X4;
        then x in X3 \/ X4 by XBOOLE_0:def 3;
        then x in X2 \/ (X3 \/ X4) by XBOOLE_0:def 3;
        then x in X2 \/ X3 \/ X4 by XBOOLE_1:4;
        then x in X1 \/ (X2 \/ X3 \/ X4) by XBOOLE_0:def 3;
        then x in X1 \/ X2 \/ X3 \/ X4 by XBOOLE_1:113;
        hence thesis by NECKLA_2:def 3;
      end;
      suppose
        x in [:the carrier of G2,the carrier of G2:];
        then
        x in [:the carrier of G2,the carrier of G2:] \ the InternalRel of
        G2 by A11,XBOOLE_0:def 5;
        then x in (the InternalRel of G2)` by SUBSET_1:def 4;
        then x in (the InternalRel of G2)` \ id the carrier of G2 by A7,
XBOOLE_0:def 5;
        then x in the InternalRel of ComplRelStr G2 by NECKLACE:def 8;
        then x in (the InternalRel of ComplRelStr G1) \/ (the InternalRel of
        ComplRelStr G2) by XBOOLE_0:def 3;
        then x in (the InternalRel of ComplRelStr G1) \/ (the InternalRel of
ComplRelStr G2) \/ [:the carrier of ComplRelStr G1, the carrier of ComplRelStr
        G2:] by XBOOLE_0:def 3;
        then x in (the InternalRel of ComplRelStr G1) \/ (the InternalRel of
ComplRelStr G2) \/ [:the carrier of ComplRelStr G1, the carrier of ComplRelStr
G2:] \/ [:the carrier of ComplRelStr G2, the carrier of ComplRelStr G1:] by
XBOOLE_0:def 3;
        hence thesis by NECKLA_2:def 3;
      end;
    end;
    assume x in R;
    then x in X1 \/ X2 \/ X3 \/ X4 by NECKLA_2:def 3;
    then x in X1 \/ X2 \/ X3 or x in X4 by XBOOLE_0:def 3;
    then
A12: x in X1 \/ X2 or x in X3 or x in X4 by XBOOLE_0:def 3;
    per cases by A12,XBOOLE_0:def 3;
    suppose
      x in X1;
      then
A13:  x in (the InternalRel of G1)` \ id the carrier of G1 by NECKLACE:def 8;
      then x in (the InternalRel of G1)` by XBOOLE_0:def 5;
      then x in [:the carrier of G1,the carrier of G1:] \ the InternalRel of
      G1 by SUBSET_1:def 4;
      then
A14:  not x in the InternalRel of G1 by XBOOLE_0:def 5;
A15:  not x in the InternalRel of union_of(G1,G2)
      proof
        assume not thesis;
        then x in (the InternalRel of G1) \/ the InternalRel of G2 by
NECKLA_2:def 2;
        then x in the InternalRel of G2 by A14,XBOOLE_0:def 3;
        then [:the carrier of G1,the carrier of G1:] /\ [:the carrier of G2,
        the carrier of G2:] is non empty by A13,XBOOLE_0:def 4;
        then
        [:the carrier of G1,the carrier of G1:] meets [:the carrier of G2
        ,the carrier of G2:];
        hence contradiction by A2,ZFMISC_1:104;
      end;
A16:  not x in id the carrier of union_of(G1,G2)
      proof
        assume not thesis;
        then x in id ((the carrier of G1) \/ the carrier of G2) by
NECKLA_2:def 2;
        then
A17:    x in (id the carrier of G1) \/ id the carrier of G2 by SYSREL:14;
        thus thesis
        proof
          per cases by A17,XBOOLE_0:def 3;
          suppose
            x in id the carrier of G1;
            hence contradiction by A13,XBOOLE_0:def 5;
          end;
          suppose
            x in id the carrier of G2;
            then [:the carrier of G1,the carrier of G1:] /\ [:the carrier of
            G2,the carrier of G2:] is non empty by A13,XBOOLE_0:def 4;
            then [:the carrier of G1,the carrier of G1:] meets [:the carrier
            of G2,the carrier of G2:];
            hence contradiction by A2,ZFMISC_1:104;
          end;
        end;
      end;
      x in X5 \/ X7 by A13,XBOOLE_0:def 3;
      then x in X5 \/ X7 \/ X8 by XBOOLE_0:def 3;
      then x in X5 \/ X7 \/ X8 \/ X6 by XBOOLE_0:def 3;
      then
      x in [:(the carrier of G1) \/ the carrier of G2, (the carrier of G1
      ) \/ the carrier of G2:] by ZFMISC_1:98;
      then x in [:(the carrier of G1) \/ the carrier of G2, the carrier of
      union_of(G1,G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2), the carrier of union_of(G1,
      G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2),the carrier of union_of(G1,
      G2):] \ (the InternalRel of union_of(G1,G2)) by A15,XBOOLE_0:def 5;
      then x in (the InternalRel of union_of(G1,G2))` by SUBSET_1:def 4;
      then x in (the InternalRel of union_of(G1,G2))` \ id the carrier of
      union_of(G1,G2) by A16,XBOOLE_0:def 5;
      hence thesis by NECKLACE:def 8;
    end;
    suppose
      x in X2;
      then
A18:  x in (the InternalRel of G2)` \ id the carrier of G2 by NECKLACE:def 8;
      then x in (the InternalRel of G2)` by XBOOLE_0:def 5;
      then x in [:the carrier of G2,the carrier of G2:] \ the InternalRel of
      G2 by SUBSET_1:def 4;
      then
A19:  not x in the InternalRel of G2 by XBOOLE_0:def 5;
A20:  not x in the InternalRel of union_of(G1,G2)
      proof
        assume not thesis;
        then x in (the InternalRel of G1) \/ the InternalRel of G2 by
NECKLA_2:def 2;
        then x in the InternalRel of G1 by A19,XBOOLE_0:def 3;
        then [:the carrier of G1,the carrier of G1:] /\ [:the carrier of G2,
        the carrier of G2:] is non empty by A18,XBOOLE_0:def 4;
        then [:the carrier of G1,the carrier of G1:] meets [:the carrier of
        G2,the carrier of G2:];
        hence contradiction by A2,ZFMISC_1:104;
      end;
A21:  not x in id the carrier of union_of(G1,G2)
      proof
        assume not thesis;
        then x in id ((the carrier of G1) \/ the carrier of G2) by
NECKLA_2:def 2;
        then
A22:    x in (id the carrier of G1) \/ id the carrier of G2 by SYSREL:14;
        per cases by A22,XBOOLE_0:def 3;
        suppose
          x in id the carrier of G2;
          hence contradiction by A18,XBOOLE_0:def 5;
        end;
        suppose
          x in id the carrier of G1;
          then [:the carrier of G1,the carrier of G1:] /\ [:the carrier of G2
          ,the carrier of G2:] is non empty by A18,XBOOLE_0:def 4;
          then [:the carrier of G1,the carrier of G1:] meets [:the carrier of
          G2,the carrier of G2:];
          hence contradiction by A2,ZFMISC_1:104;
        end;
      end;
      x in X8 \/ X6 by A18,XBOOLE_0:def 3;
      then x in X7 \/ (X8 \/ X6) by XBOOLE_0:def 3;
      then x in X7 \/ X8 \/ X6 by XBOOLE_1:4;
      then x in X5 \/ (X7 \/ X8 \/ X6) by XBOOLE_0:def 3;
      then x in X5 \/ X7 \/ X8 \/ X6 by XBOOLE_1:113;
      then
      x in [:(the carrier of G1) \/ the carrier of G2, (the carrier of G1
      ) \/ the carrier of G2:] by ZFMISC_1:98;
      then x in [:(the carrier of G1) \/ the carrier of G2, the carrier of
      union_of(G1,G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2), the carrier of union_of(G1,
      G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2),the carrier of union_of(G1,
      G2):] \ (the InternalRel of union_of(G1,G2)) by A20,XBOOLE_0:def 5;
      then x in (the InternalRel of union_of(G1,G2))` by SUBSET_1:def 4;
      then x in (the InternalRel of union_of(G1,G2))` \ id the carrier of
      union_of(G1,G2) by A21,XBOOLE_0:def 5;
      hence thesis by NECKLACE:def 8;
    end;
    suppose
      x in X3;
      then
A23:  x in [:the carrier of G1,the carrier of ComplRelStr G2:] by
NECKLACE:def 8;
      then
A24:  x in [:the carrier of G1,the carrier of G2:] by NECKLACE:def 8;
A25:  not x in the InternalRel of union_of(G1,G2)
      proof
        assume not thesis;
        then
A26:    x in (the InternalRel of G1) \/ the InternalRel of G2 by NECKLA_2:def 2
;
        per cases by A26,XBOOLE_0:def 3;
        suppose
A27:      x in the InternalRel of G1;
A28:      b in the carrier of G2 by A24,ZFMISC_1:87;
          b in the carrier of G1 by A27,ZFMISC_1:87;
          then b in (the carrier of G1) /\ the carrier of G2 by A28,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
        suppose
A29:      x in the InternalRel of G2;
A30:      a in the carrier of G1 by A23,ZFMISC_1:87;
          a in the carrier of G2 by A29,ZFMISC_1:87;
          then a in (the carrier of G1) /\ the carrier of G2 by A30,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
      end;
A31:  not x in id the carrier of union_of(G1,G2)
      proof
        assume not thesis;
        then x in id ((the carrier of G1) \/ the carrier of G2) by
NECKLA_2:def 2;
        then
A32:    x in (id the carrier of G1) \/ id the carrier of G2 by SYSREL:14;
        per cases by A32,XBOOLE_0:def 3;
        suppose
A33:      x in id the carrier of G1;
A34:      b in the carrier of G2 by A24,ZFMISC_1:87;
          b in the carrier of G1 by A33,ZFMISC_1:87;
          then b in (the carrier of G1) /\ the carrier of G2 by A34,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
        suppose
A35:      x in id the carrier of G2;
A36:      a in the carrier of G1 by A23,ZFMISC_1:87;
          a in the carrier of G2 by A35,ZFMISC_1:87;
          then a in (the carrier of G1) /\ the carrier of G2 by A36,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
      end;
      x in X7 \/ X8 by A24,XBOOLE_0:def 3;
      then x in X5 \/ (X7 \/ X8) by XBOOLE_0:def 3;
      then x in X5 \/ X7 \/ X8 by XBOOLE_1:4;
      then x in X5 \/ X7 \/ X8 \/ X6 by XBOOLE_0:def 3;
      then x in [:(the carrier of G1) \/ the carrier of G2, (the carrier of
      G1) \/ the carrier of G2:] by ZFMISC_1:98;
      then x in [:(the carrier of G1) \/ the carrier of G2, the carrier of
      union_of(G1,G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2), the carrier of union_of(G1,
      G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2),the carrier of union_of(G1,
      G2):] \ (the InternalRel of union_of(G1,G2)) by A25,XBOOLE_0:def 5;
      then x in (the InternalRel of union_of(G1,G2))` by SUBSET_1:def 4;
      then x in (the InternalRel of union_of(G1,G2))` \ id the carrier of
      union_of(G1,G2) by A31,XBOOLE_0:def 5;
      hence thesis by NECKLACE:def 8;
    end;
    suppose
      x in X4;
      then
A37:  x in [:the carrier of G2,the carrier of ComplRelStr G1:] by
NECKLACE:def 8;
      then
A38:  x in [:the carrier of G2,the carrier of G1:] by NECKLACE:def 8;
A39:  not x in the InternalRel of union_of(G1,G2)
      proof
        assume not thesis;
        then
A40:    x in (the InternalRel of G1) \/ the InternalRel of G2 by NECKLA_2:def 2
;
        per cases by A40,XBOOLE_0:def 3;
        suppose
A41:      x in the InternalRel of G1;
A42:      a in the carrier of G2 by A37,ZFMISC_1:87;
          a in the carrier of G1 by A41,ZFMISC_1:87;
          then a in (the carrier of G1) /\ the carrier of G2 by A42,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
        suppose
A43:      x in the InternalRel of G2;
A44:      b in the carrier of G1 by A38,ZFMISC_1:87;
          b in the carrier of G2 by A43,ZFMISC_1:87;
          then b in (the carrier of G1) /\ the carrier of G2 by A44,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
      end;
A45:  not x in id the carrier of union_of(G1,G2)
      proof
        assume not thesis;
        then x in id ((the carrier of G1) \/ the carrier of G2) by
NECKLA_2:def 2;
        then
A46:    x in (id the carrier of G1) \/ id the carrier of G2 by SYSREL:14;
        per cases by A46,XBOOLE_0:def 3;
        suppose
A47:      x in id the carrier of G1;
A48:      a in the carrier of G2 by A37,ZFMISC_1:87;
          a in the carrier of G1 by A47,ZFMISC_1:87;
          then a in (the carrier of G1) /\ the carrier of G2 by A48,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
        suppose
A49:      x in id the carrier of G2;
A50:      b in the carrier of G1 by A38,ZFMISC_1:87;
          b in the carrier of G2 by A49,ZFMISC_1:87;
          then b in (the carrier of G1) /\ the carrier of G2 by A50,
XBOOLE_0:def 4;
          hence contradiction by A2;
        end;
      end;
      x in X7 \/ X8 by A38,XBOOLE_0:def 3;
      then x in X5 \/ (X7 \/ X8) by XBOOLE_0:def 3;
      then x in X5 \/ X7 \/ X8 by XBOOLE_1:4;
      then x in X5 \/ X7 \/ X8 \/ X6 by XBOOLE_0:def 3;
      then x in [:(the carrier of G1) \/ the carrier of G2, (the carrier of
      G1) \/ the carrier of G2:] by ZFMISC_1:98;
      then x in [:(the carrier of G1) \/ the carrier of G2, the carrier of
      union_of(G1,G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2), the carrier of union_of(G1,
      G2):] by NECKLA_2:def 2;
      then x in [:the carrier of union_of(G1,G2),the carrier of union_of(G1,
      G2):] \ (the InternalRel of union_of(G1,G2)) by A39,XBOOLE_0:def 5;
      then x in (the InternalRel of union_of(G1,G2))` by SUBSET_1:def 4;
      then x in (the InternalRel of union_of(G1,G2))` \ id the carrier of
      union_of(G1,G2) by A45,XBOOLE_0:def 5;
      hence thesis by NECKLACE:def 8;
    end;
  end;
  the carrier of ComplRelStr union_of(G1,G2) = the carrier of union_of(G1,
  G2) by NECKLACE:def 8
    .= (the carrier of G1) \/ the carrier of G2 by NECKLA_2:def 2;
  hence thesis by A1,A3,RELAT_1:def 2;
end;
