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

theorem Th30:
  for R be non empty irreflexive symmetric RelStr holds R is not
  path-connected implies ex G1,G2 being non empty strict irreflexive symmetric
  RelStr st the carrier of G1 misses the carrier of G2 & the RelStr of R =
  union_of(G1,G2)
proof
  let R be non empty irreflexive symmetric RelStr;
  set cR = the carrier of R, IR = the InternalRel of R;
  assume R is not path-connected;
  then consider x,y being set such that
A1: x in cR & y in cR and
  x <> y and
A2: not IR reduces x,y;
  reconsider x,y as Element of R by A1;
  set A1 = component x, A2 = (the carrier of R) \ A1;
  reconsider A2 as Subset of R;
  set G1 = subrelstr A1, G2 = subrelstr A2;
A3: the carrier of G2 = A2 by YELLOW_0:def 15;
  cR c= A1 \/ A2
  proof
    let a be object;
    assume
A4: a in cR;
    assume not thesis;
    then ( not a in A1)& not a in A2 by XBOOLE_0:def 3;
    hence contradiction by A4,XBOOLE_0:def 5;
  end;
  then
A5: cR = A1 \/ A2;
A6: the carrier of G1 = A1 by YELLOW_0:def 15;
  then
A7: (the carrier of G1) misses (the carrier of G2) by A3,XBOOLE_1:79;
A8: the InternalRel of G1 misses the InternalRel of G2
  proof
    set IG1 = the InternalRel of G1, IG2 = the InternalRel of G2;
    assume not thesis;
    then IG1 /\ IG2 <> {};
    then consider a be object such that
A9: a in IG1 /\ IG2 by XBOOLE_0:def 1;
    a in IG1 by A9,XBOOLE_0:def 4;
    then consider c1,c2 be object such that
A10: a = [c1,c2] and
A11: c1 in A1 and
    c2 in A1 by A6,RELSET_1:2;
    ex g1,g2 be object st a = [g1,g2] & g1 in A2 & g2 in A2
by A3,A9,RELSET_1:2;
    then c1 in A2 by A10,XTUPLE_0:1;
    then c1 in A1 /\ A2 by A11,XBOOLE_0:def 4;
    hence contradiction by A6,A3,A7;
  end;
A12: the InternalRel of G2 = IR \ (the InternalRel of G1)
  proof
    set IG1 = the InternalRel of G1, IG2 = the InternalRel of G2;
    thus IG2 c= IR \ IG1
    proof
      let a be object;
      assume
A13:  a in IG2;
      then consider g1,g2 be object such that
A14:  a = [g1,g2] and
A15:  g1 in A2 & g2 in A2 by A3,RELSET_1:2;
      reconsider g1,g2 as Element of G2 by A15,YELLOW_0:def 15;
      reconsider u1 = g1, u2 = g2 as Element of R by A15;
A16:  not a in IG1
      by A13,XBOOLE_0:def 4,A8;
      g1 <= g2 by A13,A14,ORDERS_2:def 5;
      then u1 <= u2 by YELLOW_0:59;
      then a in IR by A14,ORDERS_2:def 5;
      hence thesis by A16,XBOOLE_0:def 5;
    end;
    let a be object;
    assume
A17: a in IR \ IG1;
    then
A18: a in IR by XBOOLE_0:def 5;
A19: not a in IG1 by A17,XBOOLE_0:def 5;
    consider c1,c2 be object such that
A20: a = [c1,c2] and
A21: c1 in cR & c2 in cR by A17,RELSET_1:2;
    reconsider c1,c2 as Element of R by A21;
A22: c1 <= c2 by A18,A20,ORDERS_2:def 5;
    per cases by A5,XBOOLE_0:def 3;
    suppose
A23:  c1 in A1 & c2 in A1;
      then reconsider d2 = c2 as Element of G1 by YELLOW_0:def 15;
      reconsider d1 = c1 as Element of G1 by A23,YELLOW_0:def 15;
      d1 <= d2 by A6,A22,YELLOW_0:60;
      hence thesis by A19,A20,ORDERS_2:def 5;
    end;
    suppose
A24:  c1 in A1 & c2 in A2;
A25:  [:A1,A2:] misses IR
      proof
        assume not thesis;
        then [:A1,A2:] /\ IR <> {};
        then consider b be object such that
A26:    b in [:A1,A2:] /\ IR by XBOOLE_0:def 1;
A27:    b in IR by A26,XBOOLE_0:def 4;
        b in [:A1,A2:] by A26,XBOOLE_0:def 4;
        then consider b1,b2 be object such that
A28:    b1 in A1 and
A29:    b2 in A2 and
A30:    b = [b1,b2] by ZFMISC_1:def 2;
        reconsider b2 as Element of R by A29;
        reconsider b1 as Element of R by A28;
        IR c= EqCl IR & [x,b1] in EqCl IR by A28,Th29,MSUALG_5:def 1;
        then [x,b2] in EqCl IR by A27,A30,EQREL_1:7;
        then b2 in A1 by Th29;
        then b2 in A1 /\ A2 by A29,XBOOLE_0:def 4;
        hence thesis by A6,A3,A7;
      end;
      a in [:A1,A2:] by A20,A24,ZFMISC_1:def 2;
      then a in [:A1,A2:] /\ IR by A18,XBOOLE_0:def 4;
      hence thesis by A25;
    end;
    suppose
A31:  c1 in A2 & c2 in A1;
A32:  [:A2,A1:] misses IR
      proof
        assume not thesis;
        then [:A2,A1:] /\ IR <> {};
        then consider b be object such that
A33:    b in [:A2,A1:] /\ IR by XBOOLE_0:def 1;
        b in [:A2,A1:] by A33,XBOOLE_0:def 4;
        then consider b1,b2 be object such that
A34:    b1 in A2 and
A35:    b2 in A1 and
A36:    b = [b1,b2] by ZFMISC_1:def 2;
        reconsider b1 as Element of R by A34;
        reconsider b2 as Element of R by A35;
A37:    [x,b2] in EqCl IR by A35,Th29;
A38:    IR c= EqCl IR by MSUALG_5:def 1;
        b in IR by A33,XBOOLE_0:def 4;
        then [b2,b1] in EqCl IR by A36,A38,EQREL_1:6;
        then [x,b1] in EqCl IR by A37,EQREL_1:7;
        then b1 in A1 by Th29;
        then b1 in A1 /\ A2 by A34,XBOOLE_0:def 4;
        hence thesis by A6,A3,A7;
      end;
      a in [:A2,A1:] by A20,A31,ZFMISC_1:def 2;
      then a in [:A2,A1:] /\ IR by A18,XBOOLE_0:def 4;
      hence thesis by A32;
    end;
    suppose
A39:  c1 in A2 & c2 in A2;
      then reconsider d2 = c2 as Element of G2 by YELLOW_0:def 15;
      reconsider d1 = c1 as Element of G2 by A39,YELLOW_0:def 15;
      d1 <= d2 by A3,A22,A39,YELLOW_0:60;
      hence thesis by A20,ORDERS_2:def 5;
    end;
  end;
  IR = (the InternalRel of G1) \/ (the InternalRel of G2)
  proof
    set IG1 = the InternalRel of G1, IG2 = the InternalRel of G2;
    thus IR c= IG1 \/ IG2
    proof
      let a be object;
      assume
A40:  a in IR;
      assume not thesis;
      then ( not a in IG1)& not a in IG2 by XBOOLE_0:def 3;
      hence contradiction by A12,A40,XBOOLE_0:def 5;
    end;
    let a be object;
    assume
A41: a in IG1 \/ IG2;
    per cases by A41,XBOOLE_0:def 3;
    suppose
A42:  a in IG1;
      then consider v,w be object such that
A43:  a = [v,w] and
A44:  v in A1 & w in A1 by A6,RELSET_1:2;
      reconsider v,w as Element of G1 by A44,YELLOW_0:def 15;
      reconsider u1 = v, u2 = w as Element of R by A44;
      v <= w by A42,A43,ORDERS_2:def 5;
      then u1 <= u2 by YELLOW_0:59;
      hence thesis by A43,ORDERS_2:def 5;
    end;
    suppose
A45:  a in IG2;
      then consider v,w be object such that
A46:  a = [v,w] and
A47:  v in A2 & w in A2 by A3,RELSET_1:2;
      reconsider v,w as Element of G2 by A47,YELLOW_0:def 15;
      reconsider u1 = v, u2 = w as Element of R by A47;
      v <= w by A45,A46,ORDERS_2:def 5;
      then u1 <= u2 by YELLOW_0:59;
      hence thesis by A46,ORDERS_2:def 5;
    end;
  end;
  then
A48: IR = the InternalRel of union_of(G1,G2) by NECKLA_2:def 2;
  IR = IR~ by RELAT_2:13;
  then not IR \/ IR~ reduces x,y by A2;
  then not x,y are_convertible_wrt IR by REWRITE1:def 4;
  then not [x,y] in EqCl IR by MSUALG_6:41;
  then not y in A1 by Th29;
  then
A49: G2 is non empty strict RelStr by A3,XBOOLE_0:def 5;
  cR = the carrier of union_of(G1,G2) by A6,A3,A5,NECKLA_2:def 2;
  hence thesis by A6,A7,A49,A48;
end;
