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

theorem Th39:
  for G being non empty irreflexive symmetric RelStr, x being
  Element of G, R1,R2 being non empty RelStr st the carrier of R1 misses the
carrier of R2 & subrelstr ([#]G \ {x}) = union_of(R1,R2) & G is non trivial & G
  is path-connected & ComplRelStr G is path-connected holds G embeds Necklace 4
proof
  let G be non empty irreflexive symmetric RelStr, x be Element of G, R1,R2 be
  non empty RelStr;
  assume that
A1: the carrier of R1 misses the carrier of R2 and
A2: subrelstr ([#]G \ {x}) = union_of(R1,R2) and
A3: G is non trivial and
A4: G is path-connected and
A5: ComplRelStr G is path-connected;
  consider a being Element of R1 such that
A6: [a,x] in the InternalRel of G by A1,A2,A4,Th37;
  set A = (the carrier of G) \ {x}, X = {x};
  reconsider A as Subset of G;
  set R = subrelstr A;
  reconsider R as non empty irreflexive symmetric RelStr by A3,YELLOW_0:def 15;
  R = subrelstr ([#]G \ {x}) & R = union_of(R2,R1) by A2,Th8;
  then consider b being Element of R2 such that
A7: [b,x] in the InternalRel of G by A1,A4,Th37;
  reconsider X1 = {y where y is Element of R1: [y,x] in (the InternalRel of G)
}, Y1 = {y where y is Element of R1: not [y,x] in the InternalRel of G}, X2 = {
  y where y is Element of R2: [y,x] in (the InternalRel of G)}, Y2 = {y where y
  is Element of R2: not [y,x] in the InternalRel of G} as set;
  reconsider X as Subset of G;
  set H = subrelstr X;
A8: X1 misses Y1
  proof
    assume not thesis;
    then consider a being object such that
A9: a in X1 & a in Y1 by XBOOLE_0:3;
    (ex y1 being Element of R1 st y1 = a & [y1,x] in the InternalRel of G
)& ex y2 being Element of R1 st y2 = a & not [y2,x] in the InternalRel of G by
A9;
    hence contradiction;
  end;
A10: a in X1 by A6;
A11: the carrier of R1 = X1 \/ Y1
  proof
    thus the carrier of R1 c= X1 \/ Y1
    proof
      let a be object;
      assume
A12:  a in the carrier of R1;
      per cases;
      suppose
        [a,x] in the InternalRel of G;
        then a in X1 by A12;
        hence thesis by XBOOLE_0:def 3;
      end;
      suppose
        not [a,x] in the InternalRel of G;
        then a in Y1 by A12;
        hence thesis by XBOOLE_0:def 3;
      end;
    end;
    let a be object such that
A13: a in X1 \/ Y1;
    per cases by A13,XBOOLE_0:def 3;
    suppose
      a in X1;
      then ex y being Element of R1 st a = y & [y,x] in (the InternalRel of G);
      hence thesis;
    end;
    suppose
      a in Y1;
      then ex y being Element of R1 st a = y & not [y,x] in the InternalRel of
      G;
      hence thesis;
    end;
  end;
A14: X2 misses Y2
  proof
    assume not thesis;
    then consider a being object such that
A15: a in X2 & a in Y2 by XBOOLE_0:3;
    (ex y1 being Element of R2 st y1 = a & [y1,x] in the InternalRel of G
)& ex y2 being Element of R2 st y2 = a & not [y2,x] in the InternalRel of G by
A15;
    hence contradiction;
  end;
A16: (the carrier of H) misses the carrier of R
  proof
    assume not thesis;
    then (the carrier of H) /\ (the carrier of R) <> {};
    then X /\ (the carrier of R) <> {} by YELLOW_0:def 15;
    then X /\ A <> {} by YELLOW_0:def 15;
    then consider a being object such that
A17: a in X /\ A by XBOOLE_0:def 1;
    a in X & a in A by A17,XBOOLE_0:def 4;
    hence contradiction by XBOOLE_0:def 5;
  end;
  reconsider H as non empty irreflexive symmetric RelStr by YELLOW_0:def 15;
A18: b in X2 by A7;
A19: the carrier of G = (the carrier of R) \/ {x}
  proof
    thus the carrier of G c= (the carrier of R) \/ {x}
    proof
      let a be object;
      assume
A20:  a in the carrier of G;
      per cases;
      suppose
        a = x;
        then a in {x} by TARSKI:def 1;
        hence thesis by XBOOLE_0:def 3;
      end;
      suppose
        a <> x;
        then not a in {x} by TARSKI:def 1;
        then a in (the carrier of G) \ {x} by A20,XBOOLE_0:def 5;
        then a in the carrier of R by YELLOW_0:def 15;
        hence thesis by XBOOLE_0:def 3;
      end;
    end;
    let a be object;
    assume
A21: a in (the carrier of R) \/ {x};
    per cases by A21,XBOOLE_0:def 3;
    suppose
      a in the carrier of R;
      then a in (the carrier of G) \ {x} by YELLOW_0:def 15;
      hence thesis;
    end;
    suppose
      a in {x};
      hence thesis;
    end;
  end;
A22: the carrier of R2 = X2 \/ Y2
  proof
    thus the carrier of R2 c= X2 \/ Y2
    proof
      let a be object;
      assume
A23:  a in the carrier of R2;
      per cases;
      suppose
        [a,x] in the InternalRel of G;
        then a in X2 by A23;
        hence thesis by XBOOLE_0:def 3;
      end;
      suppose
        not [a,x] in the InternalRel of G;
        then a in Y2 by A23;
        hence thesis by XBOOLE_0:def 3;
      end;
    end;
    let a be object such that
A24: a in X2 \/ Y2;
    per cases by A24,XBOOLE_0:def 3;
    suppose
      a in X2;
      then ex y being Element of R2 st a = y & [y,x] in (the InternalRel of G);
      hence thesis;
    end;
    suppose
      a in Y2;
      then ex y being Element of R2 st a = y & not [y,x] in the InternalRel of
      G;
      hence thesis;
    end;
  end;
A25: Y1 \/ Y2 is non empty
  proof
    assume
A26: not thesis;
    then
A27: Y2 is empty;
A28: Y1 is empty by A26;
A29: for a being Element of R holds [a,x] in the InternalRel of G
    proof
      let a be Element of R;
A30:  the carrier of R = (the carrier of R1) \/ the carrier of R2 by A2,
NECKLA_2:def 2;
      per cases by A30,XBOOLE_0:def 3;
      suppose
        a in the carrier of R1;
        then ex y being Element of R1 st a = y & [y,x] in the InternalRel of G
        by A11,A28;
        hence thesis;
      end;
      suppose
        a in the carrier of R2;
        then ex y being Element of R2 st a = y & [y,x] in the InternalRel of G
        by A22,A27;
        hence thesis;
      end;
    end;
    not ComplRelStr G is path-connected
    proof
A31:  a <> x
      proof
        assume not thesis;
        then x in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A32:    x in the carrier of R by A2,NECKLA_2:def 2;
        x in {x} by TARSKI:def 1;
        then x in the carrier of H by YELLOW_0:def 15;
        then x in (the carrier of R) /\ the carrier of H by A32,XBOOLE_0:def 4;
        hence contradiction by A16;
      end;
      a in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
      then
A33:  a in the carrier of R by A2,NECKLA_2:def 2;
      the carrier of R c= the carrier of G by A19,XBOOLE_1:7;
      then
A34:  a is Element of ComplRelStr G by A33,NECKLACE:def 8;
A35:  x is Element of ComplRelStr G by NECKLACE:def 8;
      assume not thesis;
      then (the InternalRel of ComplRelStr G) reduces x,a by A31,A34,A35;
      then consider p being FinSequence such that
A36:  len p > 0 and
A37:  p.1 = x and
A38:  p.len p = a and
A39:  for i being Nat st i in dom p & i+1 in dom p holds [
      p.i, p.(i+1)] in (the InternalRel of ComplRelStr G) by REWRITE1:11;
A40:  0 + 1 <= len p by A36,NAT_1:13;
      then len p > 1 by A31,A37,A38,XXREAL_0:1;
      then 1+1 <= len p by NAT_1:13;
      then
A41:  2 in dom p by FINSEQ_3:25;
      1 in dom p by A40,FINSEQ_3:25;
      then
A42:  [p.1,p.(1+1)] in (the InternalRel of ComplRelStr G) by A39,A41;
A43:  p.2 <> x
      proof
A44:    [x,x] in id the carrier of G by RELAT_1:def 10;
        assume not thesis;
        then [x,x] in (the InternalRel of ComplRelStr G) /\ id the carrier of
        G by A37,A42,A44,XBOOLE_0:def 4;
        then (the InternalRel of ComplRelStr G) meets id the carrier of G;
        hence contradiction by Th13;
      end;
      p.2 in the carrier of ComplRelStr G by A42,ZFMISC_1:87;
      then
A45:  p.2 in the carrier of G by NECKLACE:def 8;
      p.2 in the carrier of R
      proof
        assume not thesis;
        then p.2 in {x} by A19,A45,XBOOLE_0:def 3;
        hence thesis by A43,TARSKI:def 1;
      end;
      then
A46:  [p.2,x] in the InternalRel of G by A29;
A47:  the InternalRel of ComplRelStr G is_symmetric_in the carrier of
      ComplRelStr G by NECKLACE:def 3;
      p.1 in the carrier of ComplRelStr G & p.(1+1) in the carrier of
      ComplRelStr G by A42,ZFMISC_1:87;
      then [p.(1+1),p.1] in the InternalRel of ComplRelStr G by A42,A47;
      then [p.2,x] in (the InternalRel of ComplRelStr G) /\ the InternalRel
      of G by A37,A46,XBOOLE_0:def 4;
      then (the InternalRel of ComplRelStr G) meets the InternalRel of G;
      hence thesis by Th12;
    end;
    hence thesis by A5;
  end;
  thus thesis
  proof
    per cases by A25;
    suppose
A48:  Y1 is non empty;
      ex b being Element of Y1, c being Element of X1 st [b,c] in the
      InternalRel of G
      proof
        set b = the Element of Y1;
        a in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A49:    a in the carrier of R by A2,NECKLA_2:def 2;
        b in Y1 by A48;
        then ex y being Element of R1 st y = b & not [y,x] in the InternalRel
        of G;
        then b in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A50:    b in the carrier of R by A2,NECKLA_2:def 2;
A51:    the carrier of R c= the carrier of G by A19,XBOOLE_1:7;
        then reconsider a as Element of G by A49;
        reconsider b as Element of G by A51,A50;
        a <> b
        proof
          assume
A52:      not thesis;
          a in X1 by A6;
          then a in X1 /\ Y1 by A48,A52,XBOOLE_0:def 4;
          hence contradiction by A8;
        end;
        then (the InternalRel of G) reduces a,b by A4;
        then consider p being FinSequence such that
A53:    len p > 0 and
A54:    p.1 = a and
A55:    p.len p = b and
A56:    for i being Nat st i in dom p & i+1 in dom p
        holds [p.i, p.(i+1)] in (the InternalRel of G) by REWRITE1:11;
        defpred P[Nat] means p.$1 in Y1 & $1 in dom p & for k being Nat st k >
        $1 holds k in dom p implies p.k in Y1;
        for k being Nat st k > len p holds k in dom p implies p.k in Y1
        proof
          let k be Nat such that
A57:      k > len p;
          assume k in dom p;
          then k in Seg (len p) by FINSEQ_1:def 3;
          hence thesis by A57,FINSEQ_1:1;
        end;
        then P[len p] by A48,A53,A55,CARD_1:27,FINSEQ_5:6;
        then
A58:    ex k being Nat st P[k];
        ex n0 being Nat st P[n0] & for n being Nat st P[n] holds n >= n0
        from NAT_1:sch 5(A58);
        then consider n0 being Nat such that
A59:    P[n0] and
A60:    for n being Nat st P[n] holds n >= n0;
        n0 <> 0
        proof
          assume not thesis;
          then 0 in Seg (len p) by A59,FINSEQ_1:def 3;
          hence contradiction by FINSEQ_1:1;
        end;
        then consider k0 being Nat such that
A61:    n0 = k0 + 1 by NAT_1:6;
A62:    n0 <> 1
        proof
          assume
A63:      not thesis;
          a in X1 by A6;
          then X1 /\ Y1 is non empty by A54,A59,A63,XBOOLE_0:def 4;
          hence contradiction by A8;
        end;
A64:    k0 >= 1
        proof
          assume not thesis;
          then k0 = 0 by NAT_1:25;
          hence contradiction by A61,A62;
        end;
        n0 in Seg (len p) by A59,FINSEQ_1:def 3;
        then k0 <= k0 + 1 & n0 <= len p by FINSEQ_1:1,XREAL_1:29;
        then
A65:    k0 <= len p by A61,XXREAL_0:2;
        then
A66:    k0 in dom p by A64,FINSEQ_3:25;
        then
A67:    [p.k0,p.(k0+1)] in the InternalRel of G by A56,A59,A61;
        then
A68:    the InternalRel of G is_symmetric_in the carrier of G & p.k0 in
        the carrier of G by NECKLACE:def 3,ZFMISC_1:87;
        p.n0 in the carrier of G by A61,A67,ZFMISC_1:87;
        then
A69:    [p.n0,p.k0] in the InternalRel of G by A61,A67,A68;
A70:    for k being Nat st k > k0 holds k in dom p implies p.k in Y1
        proof
          assume not thesis;
          then consider k being Nat such that
A71:      k > k0 and
A72:      k in dom p and
A73:      not p.k in Y1;
          k > n0
          proof
            per cases by XXREAL_0:1;
            suppose
              k < n0;
              hence thesis by A61,A71,NAT_1:13;
            end;
            suppose
              n0 < k;
              hence thesis;
            end;
            suppose
              n0 = k;
              hence thesis by A59,A73;
            end;
          end;
          hence contradiction by A59,A72,A73;
        end;
        k0 < n0 by A61,NAT_1:13;
        then
A74:    not P[k0] by A60;
        p.k0 in the carrier of G by A67,ZFMISC_1:87;
        then p.k0 in the carrier of R or p.k0 in {x} by A19,XBOOLE_0:def 3;
        then
A75:    p.k0 in (the carrier of R1) \/ the carrier of R2 or p.k0 in {x}
        by A2,NECKLA_2:def 2;
        thus thesis
        proof
          per cases by A61,A67,A75,XBOOLE_0:def 3,ZFMISC_1:87;
          suppose
A76:        p.k0 in the carrier of R1 & p.n0 in the carrier of G;
            then reconsider
            m=p.k0 as Element of X1 by A11,A64,A65,A74,A70,FINSEQ_3:25
,XBOOLE_0:def 3;
            m in (the carrier of R1) \/ the carrier of R2 by A76,XBOOLE_0:def 3
;
            then
A77:        m in the carrier of R by A2,NECKLA_2:def 2;
            reconsider l=p.n0 as Element of Y1 by A59;
A78:        the carrier of R c= the carrier of G by A19,XBOOLE_1:7;
            l in the carrier of R1 by A11,A59,XBOOLE_0:def 3;
            then l in (the carrier of R1) \/ the carrier of R2 by
XBOOLE_0:def 3;
            then
A79:        l in the carrier of R by A2,NECKLA_2:def 2;
            [m,l] in the InternalRel of G & the InternalRel of G
            is_symmetric_in the carrier of G by A56,A59,A61,A66,NECKLACE:def 3;
            then [l,m] in the InternalRel of G by A79,A77,A78;
            hence thesis;
          end;
          suppose
            p.k0 in the carrier of R2 & p.n0 in the carrier of G;
            then reconsider m=p.k0 as Element of R2;
            reconsider l=p.n0 as Element of R1 by A11,A59,XBOOLE_0:def 3;
            m in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
            then
A80:        m in the carrier of R by A2,NECKLA_2:def 2;
            l in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
            then l in the carrier of R by A2,NECKLA_2:def 2;
            then [l,m] in [:the carrier of R,the carrier of R:] by A80,
ZFMISC_1:87;
            then [l,m] in (the InternalRel of G)|_2 the carrier of R by A69,
XBOOLE_0:def 4;
            then [l,m] in the InternalRel of R by YELLOW_0:def 14;
            hence thesis by A1,A2,Th35;
          end;
          suppose
A81:        p.k0 in {x} & p.n0 in the carrier of G;
            ex y1 being Element of R1 st p.n0 = y1 & not [y1,x] in the
            InternalRel of G by A59;
            hence thesis by A69,A81,TARSKI:def 1;
          end;
        end;
      end;
      then consider u being Element of Y1, v being Element of X1 such that
A82:  [u,v] in the InternalRel of G;
      set w = the Element of X2;
      w in X2 by A18;
      then
A83:  ex y being Element of R2 st y = w & [y,x] in the InternalRel of G;
      set Z = {u,v,x,w};
      Z c= the carrier of G
      proof
        w in X2 by A18;
        then ex y2 being Element of R2 st y2 = w & [y2,x] in the InternalRel
        of G;
        then w in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A84:    w in the carrier of R by A2,NECKLA_2:def 2;
        v in X1 by A10;
        then ex y1 being Element of R1 st y1 = v & [y1,x] in the InternalRel
        of G;
        then v in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A85:    v in the carrier of R by A2,NECKLA_2:def 2;
        u in the carrier of R1 by A11,A48,XBOOLE_0:def 3;
        then u in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A86:    u in the carrier of R by A2,NECKLA_2:def 2;
        let q be object;
        assume q in Z;
        then
A87:    q = u or q = v or q = x or q = w by ENUMSET1:def 2;
        the carrier of R c= the carrier of G by A19,XBOOLE_1:7;
        hence thesis by A87,A86,A85,A84;
      end;
      then reconsider Z as Subset of G;
      reconsider H = subrelstr Z as non empty full SubRelStr of G by
YELLOW_0:def 15;
A88:  w in X2 by A18;
      reconsider w as Element of G by A83,ZFMISC_1:87;
A89:  v in X1 by A10;
A90:  [x,w] in the InternalRel of G
      proof
        (ex y1 being Element of R2 st w = y1 & [y1,x] in the InternalRel
of G )& the InternalRel of G is_symmetric_in the carrier of G by A88,
NECKLACE:def 3;
        hence thesis;
      end;
A91:  u in Y1 by A48;
      reconsider u,v as Element of G by A82,ZFMISC_1:87;
A92:  [v,x] in the InternalRel of G
      proof
        ex y1 being Element of R1 st v = y1 & [y1,x] in the InternalRel
        of G by A89;
        hence thesis;
      end;
A93:  w <> u
      proof
        assume
A94:    not thesis;
        (ex y1 being Element of R2 st w = y1 & [y1,x] in the InternalRel
of G )& ex y2 being Element of R1 st u = y2 & not [y2,x] in the InternalRel of
        G by A91,A88;
        hence contradiction by A94;
      end;
A95:  not [u,x] in the InternalRel of G
      proof
        ex y1 being Element of R1 st u = y1 & not [y1,x] in the
        InternalRel of G by A91;
        hence thesis;
      end;
A96:  not [v,w] in the InternalRel of G
      proof
A97:    ex y2 being Element of R2 st w = y2 & [y2,x] in the InternalRel
        of G by A88;
        then w in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider w as Element of R by A2,NECKLA_2:def 2;
A98:    ex y1 being Element of R1 st v = y1 & [y1,x] in the InternalRel
        of G by A89;
        then v in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider v as Element of R by A2,NECKLA_2:def 2;
        assume not thesis;
        then [v,w] in (the InternalRel of G)|_2 the carrier of R by
XBOOLE_0:def 4;
        then [v,w] in the InternalRel of R by YELLOW_0:def 14;
        then
A99:    [v,w] in (the InternalRel of R1) \/ (the InternalRel of R2 ) by A2,
NECKLA_2:def 2;
        per cases by A99,XBOOLE_0:def 3;
        suppose
          [v,w] in the InternalRel of R1;
          then w in the carrier of R1 by ZFMISC_1:87;
          then w in (the carrier of R1) /\ the carrier of R2 by A97,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
        suppose
          [v,w] in the InternalRel of R2;
          then v in the carrier of R2 by ZFMISC_1:87;
          then v in (the carrier of R1) /\ the carrier of R2 by A98,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
      end;
A100: w <> x
      proof
        assume
A101:   not thesis;
        ex y1 being Element of R2 st w = y1 & [y1,x] in the InternalRel
        of G by A88;
        then x in (the carrier of R1) \/ the carrier of R2 by A101,
XBOOLE_0:def 3;
        then x in the carrier of R by A2,NECKLA_2:def 2;
        then x in (the carrier of G) \ {x} by YELLOW_0:def 15;
        then not x in {x} by XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
A102: not [u,w] in the InternalRel of G
      proof
A103:   ex y2 being Element of R2 st w = y2 & [y2,x] in the InternalRel
        of G by A88;
        then w in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider w as Element of R by A2,NECKLA_2:def 2;
A104:   ex y1 being Element of R1 st u = y1 & not [y1,x] in the
        InternalRel of G by A91;
        then u in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider u as Element of R by A2,NECKLA_2:def 2;
        assume not thesis;
        then [u,w] in (the InternalRel of G)|_2 the carrier of R by
XBOOLE_0:def 4;
        then [u,w] in the InternalRel of R by YELLOW_0:def 14;
        then
A105:   [u,w] in (the InternalRel of R1) \/ (the InternalRel of R2 ) by A2,
NECKLA_2:def 2;
        per cases by A105,XBOOLE_0:def 3;
        suppose
          [u,w] in the InternalRel of R1;
          then w in the carrier of R1 by ZFMISC_1:87;
          then w in (the carrier of R1) /\ the carrier of R2 by A103,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
        suppose
          [u,w] in the InternalRel of R2;
          then u in the carrier of R2 by ZFMISC_1:87;
          then u in (the carrier of R1) /\ the carrier of R2 by A104,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
      end;
A106: x <> u
      proof
        assume
A107:   not thesis;
        ex y1 being Element of R1 st u = y1 & not [y1,x] in the
        InternalRel of G by A91;
        then x in (the carrier of R1) \/ (the carrier of R2) by A107,
XBOOLE_0:def 3;
        then x in the carrier of R by A2,NECKLA_2:def 2;
        then x in (the carrier of G) \ {x} by YELLOW_0:def 15;
        then not x in {x} by XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
A108: w <> v
      proof
        consider y1 being Element of R2 such that
A109:   w = y1 and
        [y1,x] in the InternalRel of G by A88;
        assume
A110:   not thesis;
        ex y2 being Element of R1 st v = y2 & [y2,x] in the InternalRel
        of G by A89;
        then y1 in (the carrier of R1) /\ (the carrier of R2) by A110,A109,
XBOOLE_0:def 4;
        hence contradiction by A1;
      end;
A111: v <> x
      proof
        assume
A112:   not thesis;
        ex y1 being Element of R1 st v = y1 & [y1,x] in the InternalRel
        of G by A89;
        then x in (the carrier of R1) \/ the carrier of R2 by A112,
XBOOLE_0:def 3;
        then x in the carrier of R by A2,NECKLA_2:def 2;
        then x in (the carrier of G) \ {x} by YELLOW_0:def 15;
        then not x in {x} by XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
      u <> v
      proof
        assume
A113:   not thesis;
        (ex y1 being Element of R1 st u = y1 & not [y1,x] in the
        InternalRel of G )& ex y2 being Element of R1 st v = y2 & [y2,x] in the
        InternalRel of G by A91,A89;
        hence contradiction by A113;
      end;
      then u,v,x,w are_mutually_distinct by A111,A106,A93,A108,A100,
ZFMISC_1:def 6;
      then
A114: subrelstr Z embeds Necklace 4 by A82,A92,A90,A95,A102,A96,Th38;
      G embeds Necklace 4
      proof
        assume not thesis;
        then G is N-free by NECKLA_2:def 1;
        then H is N-free by Th23;
        hence thesis by A114,NECKLA_2:def 1;
      end;
      hence thesis;
    end;
    suppose
A115: Y2 is non empty;
      ex c being Element of Y2, d being Element of X2 st [c,d] in the
      InternalRel of G
      proof
        set c = the Element of Y2;
        b in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A116:   b in the carrier of R by A2,NECKLA_2:def 2;
        c in Y2 by A115;
        then ex y being Element of R2 st y = c & not [y,x] in the InternalRel
        of G;
        then c in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A117:   c in the carrier of R by A2,NECKLA_2:def 2;
A118:   the carrier of R c= the carrier of G by A19,XBOOLE_1:7;
        then reconsider b as Element of G by A116;
        reconsider c as Element of G by A118,A117;
        b <> c
        proof
          assume not thesis;
          then c in X2 by A7;
          then c in X2 /\ Y2 by A115,XBOOLE_0:def 4;
          hence contradiction by A14;
        end;
        then (the InternalRel of G) reduces b,c by A4;
        then consider p being FinSequence such that
A119:   len p > 0 and
A120:   p.1 = b and
A121:   p.len p = c and
A122:   for i being Nat st i in dom p & i+1 in dom p
        holds [p.i, p.(i+1)] in (the InternalRel of G) by REWRITE1:11;
        defpred P[Nat] means p.$1 in Y2 & $1 in dom p & for k being Nat st k >
        $1 holds k in dom p implies p.k in Y2;
        for k being Nat st k > len p holds k in dom p implies p.k in Y2
        proof
          let k be Nat such that
A123:     k > len p;
          assume k in dom p;
          then k in Seg (len p) by FINSEQ_1:def 3;
          hence thesis by A123,FINSEQ_1:1;
        end;
        then P[len p] by A115,A119,A121,CARD_1:27,FINSEQ_5:6;
        then
A124:   ex k being Nat st P[k];
        ex n0 being Nat st P[n0] & for n being Nat st P[n] holds n >= n0
        from NAT_1:sch 5(A124);
        then consider n0 being Nat such that
A125:   P[n0] and
A126:   for n being Nat st P[n] holds n >= n0;
        n0 <> 0
        proof
          assume not thesis;
          then 0 in Seg (len p) by A125,FINSEQ_1:def 3;
          hence contradiction by FINSEQ_1:1;
        end;
        then consider k0 being Nat such that
A127:   n0 = k0 + 1 by NAT_1:6;
A128:   n0 <> 1
        proof
          assume
A129:     not thesis;
          b in X2 by A7;
          then X2 /\ Y2 is non empty by A120,A125,A129,XBOOLE_0:def 4;
          hence contradiction by A14;
        end;
A130:   k0 >= 1
        proof
          assume not thesis;
          then k0 = 0 by NAT_1:25;
          hence contradiction by A127,A128;
        end;
        n0 in Seg (len p) by A125,FINSEQ_1:def 3;
        then k0 <= k0 + 1 & n0 <= len p by FINSEQ_1:1,XREAL_1:29;
        then k0 <= len p by A127,XXREAL_0:2;
        then
A131:   k0 in Seg (len p) by A130,FINSEQ_1:1;
        then
A132:   k0 in dom p by FINSEQ_1:def 3;
        then
A133:   [p.k0,p.(k0+1)] in the InternalRel of G by A122,A125,A127;
        then
A134:   the InternalRel of G is_symmetric_in the carrier of G & p.k0 in
        the carrier of G by NECKLACE:def 3,ZFMISC_1:87;
        p.n0 in the carrier of G by A127,A133,ZFMISC_1:87;
        then
A135:   [p.n0,p.k0] in the InternalRel of G by A127,A133,A134;
A136:   for k being Nat st k > k0 holds k in dom p implies p.k in Y2
        proof
          assume not thesis;
          then consider k being Nat such that
A137:     k > k0 and
A138:     k in dom p and
A139:     not p.k in Y2;
          k > n0
          proof
            per cases by XXREAL_0:1;
            suppose
              k < n0;
              hence thesis by A127,A137,NAT_1:13;
            end;
            suppose
              n0 < k;
              hence thesis;
            end;
            suppose
              n0 = k;
              hence thesis by A125,A139;
            end;
          end;
          hence contradiction by A125,A138,A139;
        end;
        k0 < n0 by A127,NAT_1:13;
        then
A140:   not P[k0] by A126;
        p.k0 in the carrier of G by A133,ZFMISC_1:87;
        then p.k0 in the carrier of R or p.k0 in {x} by A19,XBOOLE_0:def 3;
        then
A141:   p.k0 in (the carrier of R1) \/ the carrier of R2 or p.k0 in {x}
        by A2,NECKLA_2:def 2;
        thus thesis
        proof
          per cases by A127,A133,A141,XBOOLE_0:def 3,ZFMISC_1:87;
          suppose
            p.k0 in the carrier of R2 & p.n0 in the carrier of G;
            then reconsider m=p.k0 as Element of X2 by A22,A131,A140,A136,
FINSEQ_1:def 3,XBOOLE_0:def 3;
            reconsider l=p.n0 as Element of Y2 by A125;
            [m,l] in the InternalRel of G by A122,A125,A127,A132;
            hence thesis by A135;
          end;
          suppose
            p.k0 in the carrier of R1 & p.n0 in the carrier of G;
            then reconsider m=p.k0 as Element of R1;
            reconsider l=p.n0 as Element of R2 by A22,A125,XBOOLE_0:def 3;
A142:       the InternalRel of R is_symmetric_in the carrier of R by
NECKLACE:def 3;
            m in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
            then
A143:       m in the carrier of R by A2,NECKLA_2:def 2;
            l in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
            then
A144:       l in the carrier of R by A2,NECKLA_2:def 2;
            then [l,m] in [:the carrier of R,the carrier of R:] by A143,
ZFMISC_1:87;
            then [l,m] in (the InternalRel of G)|_2 the carrier of R by A135,
XBOOLE_0:def 4;
            then [l,m] in the InternalRel of R by YELLOW_0:def 14;
            then [m,l] in the InternalRel of R by A144,A143,A142;
            hence thesis by A1,A2,Th35;
          end;
          suppose
A145:       p.k0 in {x} & p.n0 in the carrier of G;
            ex y1 being Element of R2 st p.n0 = y1 & not [y1,x] in the
            InternalRel of G by A125;
            hence thesis by A135,A145,TARSKI:def 1;
          end;
        end;
      end;
      then consider u being Element of Y2, v being Element of X2 such that
A146: [u,v] in the InternalRel of G;
      set w = the Element of X1;
      w in X1 by A10;
      then
A147: ex y being Element of R1 st y = w & [y,x] in the InternalRel of G;
      set Z = {u,v,x,w};
      Z c= the carrier of G
      proof
        w in X1 by A10;
        then ex y2 being Element of R1 st y2 = w & [y2,x] in the InternalRel
        of G;
        then w in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A148:   w in the carrier of R by A2,NECKLA_2:def 2;
        v in X2 by A18;
        then ex y1 being Element of R2 st y1 = v & [y1,x] in the InternalRel
        of G;
        then v in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A149:   v in the carrier of R by A2,NECKLA_2:def 2;
        u in the carrier of R2 by A22,A115,XBOOLE_0:def 3;
        then u in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then
A150:   u in the carrier of R by A2,NECKLA_2:def 2;
        let q be object;
        assume q in Z;
        then
A151:   q = u or q = v or q = x or q = w by ENUMSET1:def 2;
        the carrier of R c= the carrier of G by A19,XBOOLE_1:7;
        hence thesis by A151,A150,A149,A148;
      end;
      then reconsider Z as Subset of G;
      reconsider H = subrelstr Z as non empty full SubRelStr of G by
YELLOW_0:def 15;
A152: w in X1 by A10;
      reconsider w as Element of G by A147,ZFMISC_1:87;
A153: v in X2 by A18;
A154: [x,w] in the InternalRel of G
      proof
        (ex y1 being Element of R1 st w = y1 & [y1,x] in the InternalRel
of G )& the InternalRel of G is_symmetric_in the carrier of G by A152,
NECKLACE:def 3;
        hence thesis;
      end;
A155: u in Y2 by A115;
      reconsider u,v as Element of G by A146,ZFMISC_1:87;
A156: [v,x] in the InternalRel of G
      proof
        ex y1 being Element of R2 st v = y1 & [y1,x] in the InternalRel
        of G by A153;
        hence thesis;
      end;
A157: w <> u
      proof
        assume
A158:   not thesis;
        (ex y1 being Element of R1 st w = y1 & [y1,x] in the InternalRel
of G )& ex y2 being Element of R2 st u = y2 & not [y2,x] in the InternalRel of
        G by A155,A152;
        hence contradiction by A158;
      end;
A159: not [u,x] in the InternalRel of G
      proof
        ex y1 being Element of R2 st u = y1 & not [y1,x] in the
        InternalRel of G by A155;
        hence thesis;
      end;
A160: not [v,w] in the InternalRel of G
      proof
A161:   ex y2 being Element of R1 st w = y2 & [y2,x] in the InternalRel
        of G by A152;
        then w in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider w as Element of R by A2,NECKLA_2:def 2;
A162:   ex y1 being Element of R2 st v = y1 & [y1,x] in the InternalRel
        of G by A153;
        then v in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider v as Element of R by A2,NECKLA_2:def 2;
        assume not thesis;
        then [v,w] in (the InternalRel of G)|_2 the carrier of R by
XBOOLE_0:def 4;
        then [v,w] in the InternalRel of R by YELLOW_0:def 14;
        then
A163:   [v,w] in (the InternalRel of R1) \/ (the InternalRel of R2 ) by A2,
NECKLA_2:def 2;
        per cases by A163,XBOOLE_0:def 3;
        suppose
          [v,w] in the InternalRel of R1;
          then v in the carrier of R1 by ZFMISC_1:87;
          then v in (the carrier of R1) /\ the carrier of R2 by A162,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
        suppose
          [v,w] in the InternalRel of R2;
          then w in the carrier of R2 by ZFMISC_1:87;
          then w in (the carrier of R1) /\ the carrier of R2 by A161,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
      end;
A164: w <> x
      proof
        assume
A165:   not thesis;
        ex y1 being Element of R1 st w = y1 & [y1,x] in the InternalRel
        of G by A152;
        then x in (the carrier of R1) \/ the carrier of R2 by A165,
XBOOLE_0:def 3;
        then x in the carrier of R by A2,NECKLA_2:def 2;
        then x in (the carrier of G) \ {x} by YELLOW_0:def 15;
        then not x in {x} by XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
A166: not [u,w] in the InternalRel of G
      proof
A167:   ex y2 being Element of R1 st w = y2 & [y2,x] in the InternalRel
        of G by A152;
        then w in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider w as Element of R by A2,NECKLA_2:def 2;
A168:   ex y1 being Element of R2 st u = y1 & not [y1,x] in the
        InternalRel of G by A155;
        then u in (the carrier of R1) \/ the carrier of R2 by XBOOLE_0:def 3;
        then reconsider u as Element of R by A2,NECKLA_2:def 2;
        assume not thesis;
        then [u,w] in (the InternalRel of G)|_2 the carrier of R by
XBOOLE_0:def 4;
        then [u,w] in the InternalRel of R by YELLOW_0:def 14;
        then
A169:   [u,w] in (the InternalRel of R1) \/ (the InternalRel of R2 ) by A2,
NECKLA_2:def 2;
        per cases by A169,XBOOLE_0:def 3;
        suppose
          [u,w] in the InternalRel of R1;
          then u in the carrier of R1 by ZFMISC_1:87;
          then u in (the carrier of R1) /\ the carrier of R2 by A168,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
        suppose
          [u,w] in the InternalRel of R2;
          then w in the carrier of R2 by ZFMISC_1:87;
          then w in (the carrier of R1) /\ the carrier of R2 by A167,
XBOOLE_0:def 4;
          hence contradiction by A1;
        end;
      end;
A170: x <> u
      proof
        assume
A171:   not thesis;
        ex y1 being Element of R2 st u = y1 & not [y1,x] in the
        InternalRel of G by A155;
        then x in (the carrier of R1) \/ (the carrier of R2) by A171,
XBOOLE_0:def 3;
        then x in the carrier of R by A2,NECKLA_2:def 2;
        then x in (the carrier of G) \ {x} by YELLOW_0:def 15;
        then not x in {x} by XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
A172: w <> v
      proof
        consider y1 being Element of R1 such that
A173:   w = y1 and
        [y1,x] in the InternalRel of G by A152;
        assume
A174:   not thesis;
        ex y2 being Element of R2 st v = y2 & [y2,x] in the InternalRel
        of G by A153;
        then y1 in (the carrier of R1) /\ (the carrier of R2) by A174,A173,
XBOOLE_0:def 4;
        hence contradiction by A1;
      end;
A175: v <> x
      proof
        assume
A176:   not thesis;
        ex y1 being Element of R2 st v = y1 & [y1,x] in the InternalRel
        of G by A153;
        then x in (the carrier of R1) \/ the carrier of R2 by A176,
XBOOLE_0:def 3;
        then x in the carrier of R by A2,NECKLA_2:def 2;
        then x in (the carrier of G) \ {x} by YELLOW_0:def 15;
        then not x in {x} by XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
      u <> v
      proof
        assume
A177:   not thesis;
        (ex y1 being Element of R2 st u = y1 & not [y1,x] in the
        InternalRel of G )& ex y2 being Element of R2 st v = y2 & [y2,x] in the
        InternalRel of G by A155,A153;
        hence contradiction by A177;
      end;
      then u,v,x,w are_mutually_distinct by A175,A170,A157,A172,A164,
ZFMISC_1:def 6;
      then
A178: subrelstr Z embeds Necklace 4 by A146,A156,A154,A159,A166,A160,Th38;
      G embeds Necklace 4
      proof
        assume not thesis;
        then G is N-free by NECKLA_2:def 1;
        then H is N-free by Th23;
        hence thesis by A178,NECKLA_2:def 1;
      end;
      hence thesis;
    end;
  end;
end;
