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

theorem Th33:
  for R be irreflexive symmetric RelStr st card (the carrier of R)
  = 2 & the carrier of R in FinSETS holds the RelStr of R in fin_RelStr_sp
proof
  let R be irreflexive symmetric RelStr;
  assume that
A1: card (the carrier of R) = 2 and
A2: the carrier of R in FinSETS;
  consider a,b being object such that
A3: the carrier of R = {a,b} and
A4: the InternalRel of R = {[a,b],[b,a]} or the InternalRel of R = {}
   by A1,Th6;
  set A = {a}, B = {b};
A5: A c= the carrier of R
  proof
    let x be object;
    assume x in A;
    then x = a by TARSKI:def 1;
    hence thesis by A3,TARSKI:def 2;
  end;
A6: B c= the carrier of R
  proof
    let x be object;
    assume x in B;
    then x = b by TARSKI:def 1;
    hence thesis by A3,TARSKI:def 2;
  end;
  then reconsider B as Subset of R;
  reconsider A as Subset of R by A5;
  set H1 = subrelstr A, H2 = subrelstr B;
  reconsider H2 as non empty strict irreflexive symmetric RelStr by
YELLOW_0:def 15;
A7: the carrier of H2 = B by YELLOW_0:def 15;
  then the InternalRel of H2 c= [:{b},{b}:];
  then the InternalRel of H2 c= {[b,b]} by ZFMISC_1:29;
  then
A8: the InternalRel of H2 = {} or the InternalRel of H2 = {[b,b]} by
ZFMISC_1:33;
A9: the InternalRel of H2 = {}
  proof
    b in B by TARSKI:def 1;
    then b in the carrier of H2 by YELLOW_0:def 15;
    then
A10: not [b,b] in the InternalRel of H2 by NECKLACE:def 5;
    assume not thesis;
    hence thesis by A8,A10,TARSKI:def 1;
  end;
  the carrier of H2 c= the carrier of R by A6,YELLOW_0:def 15;
  then the carrier of H2 in FinSETS by A2,CLASSES1:3,CLASSES2:def 2;
  then
A11: H2 in fin_RelStr_sp by A7,NECKLA_2:def 5;
  reconsider H1 as non empty strict irreflexive symmetric RelStr by
YELLOW_0:def 15;
A12: the carrier of H1 = A by YELLOW_0:def 15;
  then
A13: the carrier of R = (the carrier of H1) \/ (the carrier of H2) by A3,A7,
ENUMSET1:1;
  a <> b
  proof
    assume not thesis;
    then the carrier of R = {a} by A3,ENUMSET1:29;
    hence thesis by A1,CARD_1:30;
  end;
  then
A14: A misses B by ZFMISC_1:11;
  then
A15: (the carrier of H1) misses (the carrier of H2) by A7,YELLOW_0:def 15;
  the InternalRel of H1 c= [:{a},{a}:] by A12;
  then the InternalRel of H1 c= {[a,a]} by ZFMISC_1:29;
  then
A16: the InternalRel of H1 = {} or the InternalRel of H1 = {[a,a]} by
ZFMISC_1:33;
A17: the InternalRel of H1 = {}
  proof
    a in A by TARSKI:def 1;
    then a in the carrier of H1 by YELLOW_0:def 15;
    then
A18: not [a,a] in the InternalRel of H1 by NECKLACE:def 5;
    assume not thesis;
    hence thesis by A16,A18,TARSKI:def 1;
  end;
  the carrier of H1 c= the carrier of R by A5,YELLOW_0:def 15;
  then the carrier of H1 in FinSETS by A2,CLASSES1:3,CLASSES2:def 2;
  then
A19: H1 in fin_RelStr_sp by A12,NECKLA_2:def 5;
  per cases by A4;
  suppose
A20: the InternalRel of R = {[a,b],[b,a]};
    set S = sum_of(H1,H2);
    the InternalRel of S = (the InternalRel of H1) \/ (the InternalRel of
    H2) \/ [:A,B:] \/ [:B,A:] by A12,A7,NECKLA_2:def 3;
    then the InternalRel of S = {[a,b]} \/ [:{b},{a}:] by A17,A9,ZFMISC_1:29;
    then the InternalRel of S = {[a,b]} \/ {[b,a]} by ZFMISC_1:29;
    then
A21: the InternalRel of S = the InternalRel of R by A20,ENUMSET1:1;
    the carrier of S = the carrier of R by A13,NECKLA_2:def 3;
    hence thesis by A12,A19,A7,A11,A14,A21,NECKLA_2:def 5;
  end;
  suppose
A22: the InternalRel of R = {};
    set U = union_of(H1,H2);
    the InternalRel of U = (the InternalRel of H1) \/ (the InternalRel of
    H2 ) & the carrier of U = the carrier of R by A13,NECKLA_2:def 2;
    hence thesis by A19,A11,A15,A17,A9,A22,NECKLA_2:def 5;
  end;
end;
