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

theorem
  for G being irreflexive RelStr st G in fin_RelStr_sp holds ComplRelStr
  G in fin_RelStr_sp
proof
  defpred P[Nat] means for G being irreflexive RelStr st card the carrier of G
  = $1 & G in fin_RelStr_sp holds ComplRelStr G in fin_RelStr_sp;
  let G be irreflexive RelStr;
A1: for k being Nat st for n being Nat st n < k holds P[n] holds P[k]
  proof
    let k be Nat such that
A2: for n being Nat st n < k holds P[n];
    let G be irreflexive RelStr;
    assume that
A3: card the carrier of G = k and
A4: G in fin_RelStr_sp;
    per cases by A4,NECKLA_2:6;
    suppose
      G is strict 1-element RelStr;
      hence thesis by A4,Th15;
    end;
    suppose
      ex G1,G2 being strict RelStr st (the carrier of G1) misses (the
carrier of G2) & G1 in fin_RelStr_sp & G2 in fin_RelStr_sp & (G = union_of(G1,
      G2) or G = sum_of(G1,G2) );
      then consider G1,G2 being strict RelStr such that
A5:   (the carrier of G1) misses the carrier of G2 and
A6:   G1 in fin_RelStr_sp and
A7:   G2 in fin_RelStr_sp and
A8:   G = union_of(G1,G2) or G = sum_of(G1,G2);
A9:   G2 is non empty finite by A7,NECKLA_2:4;
      then reconsider n2 = card the carrier of G2 as Nat;
A10:  G1 is non empty finite by A6,NECKLA_2:4;
      then reconsider n1 = card the carrier of G1 as Nat;
      thus thesis
      proof
        per cases by A8;
        suppose
A11:      G = union_of(G1,G2);
          then reconsider G2 as irreflexive RelStr by Th9;
          reconsider G1 as irreflexive RelStr by A11,Th9;
          reconsider cG1 = the carrier of G1 as non empty finite set by A10;
          reconsider cG2 = the carrier of G2 as non empty finite set by A9;
          the carrier of G = (the carrier of G1) \/ the carrier of G2 by A11,
NECKLA_2:def 2;
          then
A12:      card the carrier of G = card cG1 + card cG2 by A5,CARD_2:40;
A13:      card cG1 = n1;
          n2 < k
          proof
            assume not thesis;
            then k+0 < n1 + n2 by A13,XREAL_1:8;
            hence thesis by A3,A12;
          end;
          then
A14:      ComplRelStr G2 in fin_RelStr_sp by A2,A7;
A15:      the carrier of ComplRelStr G1 = the carrier of G1 & the carrier
          of ComplRelStr G2 = the carrier of G2 by NECKLACE:def 8;
A16:      card cG2 = n2;
          n1 < k
          proof
            assume not thesis;
            then k+0 < n2 + n1 by A16,XREAL_1:8;
            hence thesis by A3,A12;
          end;
          then
A17:      ComplRelStr G1 in fin_RelStr_sp by A2,A6;
          ComplRelStr G = sum_of(ComplRelStr G1,ComplRelStr G2) by A5,A11,Th17;
          hence thesis by A5,A17,A14,A15,NECKLA_2:def 5;
        end;
        suppose
A18:      G = sum_of(G1,G2);
          then reconsider G2 as irreflexive RelStr by Th9;
          reconsider G1 as irreflexive RelStr by A18,Th9;
          reconsider cG1 = the carrier of G1 as non empty finite set by A10;
          reconsider cG2 = the carrier of G2 as non empty finite set by A9;
          the carrier of G = (the carrier of G1) \/ the carrier of G2 by A18,
NECKLA_2:def 3;
          then
A19:      card the carrier of G = card cG1 + card cG2 by A5,CARD_2:40;
A20:      card cG1 = n1;
          n2 < k
          proof
            assume not thesis;
            then k+0 < n1 + n2 by A20,XREAL_1:8;
            hence thesis by A3,A19;
          end;
          then
A21:      ComplRelStr G2 in fin_RelStr_sp by A2,A7;
A22:      the carrier of ComplRelStr G1 = the carrier of G1 & the carrier
          of ComplRelStr G2 = the carrier of G2 by NECKLACE:def 8;
A23:      card cG2 = n2;
          n1 < k
          proof
            assume not thesis;
            then k+0 < n2 + n1 by A23,XREAL_1:8;
            hence thesis by A3,A19;
          end;
          then
A24:      ComplRelStr G1 in fin_RelStr_sp by A2,A6;
          ComplRelStr G = union_of(ComplRelStr G1,ComplRelStr G2) by A5,A18
,Th18;
          hence thesis by A5,A24,A21,A22,NECKLA_2:def 5;
        end;
      end;
    end;
  end;
A25: for k being Nat holds P[k] from NAT_1:sch 4(A1);
  assume
A26: G in fin_RelStr_sp;
  then G is finite by NECKLA_2:4;
  then card the carrier of G is Nat;
  hence thesis by A26,A25;
end;
