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

theorem
  for G being non empty strict finite irreflexive symmetric RelStr st G
is N-free & the carrier of G in FinSETS holds the RelStr of G in fin_RelStr_sp
proof
  let R be non empty strict finite irreflexive symmetric RelStr;
  defpred P[Nat] means for G be non empty strict finite irreflexive symmetric
  RelStr st G is N-free & card the carrier of G = $1 & the carrier of G in
  FinSETS holds (the RelStr of G) in fin_RelStr_sp;
A1: for n be Nat st for k be Nat st k < n holds P[k] holds P[n]
  proof
    let n be Nat such that
A2: for k be Nat st k < n holds P[k];
    let G be non empty strict finite irreflexive symmetric RelStr;
    set CG = ComplRelStr G;
    assume that
A3: G is N-free and
A4: card (the carrier of G) = n and
A5: (the carrier of G) in FinSETS;
    per cases;
    suppose
      G is trivial;
      then the carrier of G is 1-element;
      then reconsider G as 1-element RelStr by STRUCT_0:def 19;
      (the RelStr of G) in fin_RelStr_sp by A5,NECKLA_2:def 5;
      hence thesis;
    end;
    suppose
      G is not path-connected & G is non trivial;
      then consider
      G1,G2 being non empty strict irreflexive symmetric RelStr such
      that
A6:   (the carrier of G1) misses (the carrier of G2) and
A7:   the RelStr of G = union_of(G1,G2) by Th30;
      set cG1 = the carrier of G1, cG2 = the carrier of G2, R = the RelStr of
      G, cR = the carrier of R;
      reconsider cR as finite set;
A8:   cR = cG1 \/ cG2 by A7,NECKLA_2:def 2;
      then
A9:   card cG1 in Segm card cR by A6,Lm1;
      then reconsider
      G1 as non empty strict finite irreflexive symmetric RelStr;
      reconsider cR as finite set;
A10:  card cG2 in Segm card cR by A6,A8,Lm1;
      then reconsider
      G2 as non empty strict finite irreflexive symmetric RelStr;
      reconsider cG2 as finite set by A10;
A11:  card cG2 < card cR by A10,NAT_1:44;
      G2 is full SubRelStr of G by A6,A7,Th10;
      then
A12:  G2 is N-free by A3,Th23;
      the carrier of G2 in FinSETS by A5,A8,CLASSES1:3,CLASSES2:def 2
,XBOOLE_1:7;
      then
A13:  G2 in fin_RelStr_sp by A2,A4,A11,A12;
      G1 is full SubRelStr of G by A6,A7,Th10;
      then
A14:  G1 is N-free by A3,Th23;
      reconsider cG1 as finite set by A9;
A15:  card cG1 < card cR by A9,NAT_1:44;
      the carrier of G1 in FinSETS by A5,A8,CLASSES1:3,CLASSES2:def 2
,XBOOLE_1:7;
      then G1 in fin_RelStr_sp by A2,A4,A15,A14;
      hence thesis by A6,A7,A13,NECKLA_2:def 5;
    end;
    suppose
      CG is not path-connected & G is non trivial;
      then consider
      G1,G2 being non empty strict irreflexive symmetric RelStr such
      that
A16:  (the carrier of G1) misses (the carrier of G2) and
A17:  (the RelStr of G) = sum_of(G1,G2) by Th31;
      set cG1 = the carrier of G1, cG2 = the carrier of G2, R = the RelStr of
      G, cR = the carrier of R;
      reconsider cR as finite set;
A18:  cR = cG1 \/ cG2 by A17,NECKLA_2:def 3;
      then
A19:  card cG1 in Segm card cR by A16,Lm1;
      then reconsider
      G1 as non empty strict finite irreflexive symmetric RelStr;
A20:  card cG2 in Segm card cR by A16,A18,Lm1;
      then reconsider
      G2 as non empty strict finite irreflexive symmetric RelStr;
      reconsider cG2 as finite set by A20;
A21:  card cG2 < card cR by A20,NAT_1:44;
      G2 is full SubRelStr of G by A16,A17,Th10;
      then
A22:  G2 is N-free by A3,Th23;
      the carrier of G2 in FinSETS by A5,A18,CLASSES1:3,CLASSES2:def 2
,XBOOLE_1:7;
      then
A23:  G2 in fin_RelStr_sp by A2,A4,A21,A22;
      G1 is full SubRelStr of G by A16,A17,Th10;
      then
A24:  G1 is N-free by A3,Th23;
      reconsider cG1 as finite set by A19;
A25:  card cG1 < card cR by A19,NAT_1:44;
      the carrier of G1 in FinSETS by A5,A18,CLASSES1:3,CLASSES2:def 2
,XBOOLE_1:7;
      then G1 in fin_RelStr_sp by A2,A4,A25,A24;
      hence thesis by A16,A17,A23,NECKLA_2:def 5;
    end;
    suppose
A26:  G is non trivial & G is path-connected & CG is path-connected;
      consider x be object such that
A27:  x in the carrier of G by XBOOLE_0:def 1;
      reconsider x as Element of G by A27;
      set A = (the carrier of G) \ {x};
A28:  A c= the carrier of G;
      reconsider A as Subset of G;
      set R = subrelstr A;
      reconsider R as non empty finite irreflexive symmetric RelStr by A26,
YELLOW_0:def 15;
A29:  the carrier of R c= the carrier of G by A28,YELLOW_0:def 15;
      card A = card (the carrier of G) - card {x} by CARD_2:44;
      then
A30:  card A = n - 1 by A4,CARD_2:42;
      n - 1 < n - 1 + 1 by XREAL_1:29;
      then
A31:  card the carrier of R < n by A30,YELLOW_0:def 15;
      R is N-free by A3,Th23;
      then
A32:  R in fin_RelStr_sp by A2,A5,A31,A29,CLASSES1:3,CLASSES2:def 2;
      thus thesis
      proof
        per cases by A32,NECKLA_2:6;
        suppose
A33:      R is trivial RelStr;
          the carrier of R is non empty;
          then
A34:      A is non empty by YELLOW_0:def 15;
          A is trivial by A33,YELLOW_0:def 15;
          then consider a be object such that
A35:      A = {a} by A34,ZFMISC_1:131;
A36:      (the carrier of G) \/ {x} = the carrier of G
          proof
            thus (the carrier of G) \/ {x} c= the carrier of G
            proof
              let c be object;
              assume c in (the carrier of G) \/ {x};
              then c in the carrier of G or c in {x} by XBOOLE_0:def 3;
              hence thesis;
            end;
            let c be object;
            assume c in the carrier of G;
            hence thesis by XBOOLE_0:def 3;
          end;
          {a} \/ {x} = (the carrier of G) \/ {x} by A35,XBOOLE_1:39;
          then the carrier of G = {a,x} & a <> x by A26,A36,ENUMSET1:1;
          then card (the carrier of G) = 2 by CARD_2:57;
          hence thesis by A5,Th33;
        end;
        suppose
          ex R1,R2 being strict RelStr st (the carrier of R1) misses
(the carrier of R2) & R1 in fin_RelStr_sp & R2 in fin_RelStr_sp & (R = union_of
          (R1,R2) or R = sum_of(R1,R2) );
          then consider R1,R2 being strict RelStr such that
A37:      (the carrier of R1) misses (the carrier of R2) and
A38:      R1 in fin_RelStr_sp and
A39:      R2 in fin_RelStr_sp and
A40:      R = union_of(R1,R2) or R = sum_of(R1,R2);
          thus thesis
          proof
            per cases by A40;
            suppose
A41:          R = union_of(R1,R2);
              R2 is SubRelStr of R by A37,A40,Th10;
              then reconsider R2 as non empty SubRelStr of G by A39,NECKLA_2:4
,YELLOW_6:7;
              R1 is SubRelStr of R by A37,A40,Th10;
              then reconsider R1 as non empty SubRelStr of G by A38,NECKLA_2:4
,YELLOW_6:7;
              subrelstr ([#]G \ {x}) = union_of(R1,R2) by A41;
              then G embeds Necklace 4 by A26,A37,Th39;
              hence thesis by A3,NECKLA_2:def 1;
            end;
            suppose
A42:          R = sum_of(R1,R2);
              ComplRelStr R2 is non empty
              proof
                assume not thesis;
                then R2 is empty;
                hence contradiction by A39,NECKLA_2:4;
              end;
              then reconsider R22 = ComplRelStr R2 as non empty RelStr;
              ComplRelStr R1 is non empty
              proof
                assume not thesis;
                then R1 is empty;
                hence contradiction by A38,NECKLA_2:4;
              end;
              then reconsider R11 = ComplRelStr R1 as non empty RelStr;
              reconsider G9 = ComplRelStr G as non empty irreflexive symmetric
              RelStr;
              reconsider x9 = x as Element of G9 by NECKLACE:def 8;
A43:          the carrier of R11 = the carrier of R1 & the carrier of R22
              = the carrier of R2 by NECKLACE:def 8;
A44:          ComplRelStr R = ComplRelStr (subrelstr ([#]G \ {x}))
                .= subrelstr ([#](G9) \ {x9}) by Th20;
A45:          G9 is N-free by A3,Th25;
A46:          ComplRelStr G9 is path-connected & G9 is non trivial by A26,Th16,
NECKLACE:def 8;
              ComplRelStr R = union_of(ComplRelStr R1, ComplRelStr R2) by A37
,A42,Th18;
              then G9 embeds Necklace 4 by A26,A37,A43,A46,A44,Th39;
              hence thesis by A45,NECKLA_2:def 1;
            end;
          end;
        end;
      end;
    end;
  end;
A47: for k be Nat holds P[k] from NAT_1:sch 4(A1);
  card the carrier of R is Nat;
  hence thesis by A47;
end;
