reserve x, y, z, v for set,
  n, m, k for Nat;
reserve G, G1, G2, G3 for Graph;
reserve x, y for Element of (the carrier of G);

theorem
  (the Source of G1) tolerates (the Source of G2) &
  (the Target of G1) tolerates (the Target of G2) implies
  (the Source of (G1 \/ G2)) = (the Source of G1) \/ (the Source of G2) &
  (the Target of (G1 \/ G2)) = (the Target of G1) \/ (the Target of G2)
proof
  assume
  A1: (the Source of G1) tolerates (the Source of G2) & (the Target of G1)
  tolerates (the Target of G2);
  set S12 = the Source of (G1 \/ G2);
  set S1 = the Source of G1;
  set S2 = the Source of G2;
  set T12 = the Target of (G1 \/ G2);
  set T1 = the Target of G1;
  set T2 = the Target of G2;
 for v being object holds v in S12 iff v in S1 \/ S2
  proof
    let v be object;
    thus v in S12 implies v in S1 \/ S2
    proof
      assume
A2:   v in S12;
      then consider x,y being object such that
A3:   [x,y] = v by RELAT_1:def 1;
   x in dom S12 by A2,A3,FUNCT_1:1;
then    x in the carrier' of (G1 \/ G2);
then A4:   x in (the carrier' of G1) \/ (the carrier' of G2) by A1,Def5;
A5:   now
        assume
A6:     x in the carrier' of G1;
then A7:    x in dom S1 by FUNCT_2:def 1;
    S1.x = S12.x by A1,A6,Def5
          .= y by A2,A3,FUNCT_1:1;
then     [x,y] in S1 or [x,y] in S2 by A7,FUNCT_1:def 2;
        hence [x,y] in S1 \/ S2 by XBOOLE_0:def 3;
      end;
  now
        assume
A8:    x in the carrier' of G2;
then A9:    x in dom S2 by FUNCT_2:def 1;
    S2.x = S12.x by A1,A8,Def5
          .= y by A2,A3,FUNCT_1:1;
then     [x,y] in S1 or [x,y] in S2 by A9,FUNCT_1:def 2;
        hence [x,y] in S1 \/ S2 by XBOOLE_0:def 3;
      end;
      hence thesis by A3,A4,A5,XBOOLE_0:def 3;
    end;
    assume
A10: v in S1 \/ S2;
A11: now
      assume
A12:  v in S1;
      then consider x,y being object such that
A13:  [x,y] = v by RELAT_1:def 1;
A14:  x in dom S1 by A12,A13,FUNCT_1:1;
A15:  y = S1.x by A12,A13,FUNCT_1:1;
  x in (the carrier' of G1) \/ (the carrier' of G2) by A14,XBOOLE_0:def 3;
then   x in the carrier' of (G1 \/ G2) by A1,Def5;
then A16:  x in dom S12 by FUNCT_2:def 1;
  S12.x = y by A1,A14,A15,Def5;
      hence thesis by A13,A16,FUNCT_1:def 2;
    end;
 now
      assume
A17:  v in S2;
      then consider x,y being object such that
A18:  [x,y] = v by RELAT_1:def 1;
A19:  x in dom S2 by A17,A18,FUNCT_1:1;
A20:  y = S2.x by A17,A18,FUNCT_1:1;
  x in (the carrier' of G1) \/ (the carrier' of G2) by A19,XBOOLE_0:def 3;
then   x in the carrier' of (G1 \/ G2) by A1,Def5;
then A21:  x in dom S12 by FUNCT_2:def 1;
  S12.x = y by A1,A19,A20,Def5;
      hence thesis by A18,A21,FUNCT_1:def 2;
    end;
    hence thesis by A10,A11,XBOOLE_0:def 3;
  end;
  hence S12 = S1 \/ S2 by TARSKI:2;
 for v being object holds v in T12 iff v in T1 \/ T2
  proof
    let v be object;
    thus v in T12 implies v in T1 \/ T2
    proof
      assume
A22:  v in T12;
      then consider x,y being object such that
A23:  [x,y] = v by RELAT_1:def 1;
  x in dom T12 by A22,A23,FUNCT_1:1;
then   x in the carrier' of (G1 \/ G2);
then A24:  x in (the carrier' of G1) \/ (the carrier' of G2) by A1,Def5;
A25:  now
        assume
A26:    x in the carrier' of G1;
then A27:    x in dom T1 by FUNCT_2:def 1;
    T1.x = T12.x by A1,A26,Def5
          .= y by A22,A23,FUNCT_1:1;
then     [x,y] in T1 or [x,y] in T2 by A27,FUNCT_1:def 2;
        hence [x,y] in T1 \/ T2 by XBOOLE_0:def 3;
      end;
  now
        assume
A28:    x in the carrier' of G2;
then A29:    x in dom T2 by FUNCT_2:def 1;
    T2.x = T12.x by A1,A28,Def5
          .= y by A22,A23,FUNCT_1:1;
then     [x,y] in T1 or [x,y] in T2 by A29,FUNCT_1:def 2;
        hence [x,y] in T1 \/ T2 by XBOOLE_0:def 3;
      end;
      hence thesis by A23,A24,A25,XBOOLE_0:def 3;
    end;
    assume
A30: v in T1 \/ T2;
A31: now
      assume
A32:  v in T1;
      then consider x,y being object such that
A33:  [x,y] = v by RELAT_1:def 1;
A34:  x in dom T1 by A32,A33,FUNCT_1:1;
A35:  y = T1.x by A32,A33,FUNCT_1:1;
  x in (the carrier' of G1) \/ (the carrier' of G2) by A34,XBOOLE_0:def 3;
then   x in the carrier' of (G1 \/ G2) by A1,Def5;
then A36:  x in dom T12 by FUNCT_2:def 1;
  T12.x = y by A1,A34,A35,Def5;
      hence thesis by A33,A36,FUNCT_1:def 2;
    end;
 now
      assume
A37:  v in T2;
      then consider x,y being object such that
A38:  [x,y] = v by RELAT_1:def 1;
A39:  x in dom T2 by A37,A38,FUNCT_1:1;
A40:  y = T2.x by A37,A38,FUNCT_1:1;
  x in (the carrier' of G1) \/ (the carrier' of G2) by A39,XBOOLE_0:def 3;
then   x in the carrier' of (G1 \/ G2) by A1,Def5;
then A41:  x in dom T12 by FUNCT_2:def 1;
  T12.x = y by A1,A39,A40,Def5;
      hence thesis by A38,A41,FUNCT_1:def 2;
    end;
    hence thesis by A30,A31,XBOOLE_0:def 3;
  end;
  hence thesis by TARSKI:2;
end;
