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

theorem Th14:
  for G being RelStr holds [:the carrier of G,the carrier of G:] =
  id (the carrier of G) \/ (the InternalRel of G) \/ (the InternalRel of
  ComplRelStr G)
proof
  let G be RelStr;
  set idcG = id the carrier of G, IG = the InternalRel of G, ICmpG = the
  InternalRel of ComplRelStr G, cG = the carrier of G;
  thus [:cG,cG:] c= idcG \/ IG \/ ICmpG
  proof
    let a be object;
    assume
A1: a in [:cG,cG:];
    then consider x,y being object such that
A2: x in cG and
    y in cG and
A3: a = [x,y] by ZFMISC_1:def 2;
    per cases;
    suppose
A4:   x = y;
      [x,x] in id cG by A2,RELAT_1:def 10;
      then a in id cG \/ IG by A3,A4,XBOOLE_0:def 3;
      hence thesis by XBOOLE_0:def 3;
    end;
    suppose
      x <> y;
      then
A5:   not a in id cG by A3,RELAT_1:def 10;
      thus thesis
      proof
        per cases;
        suppose
          a in IG;
          then a in id cG \/ IG by XBOOLE_0:def 3;
          hence thesis by XBOOLE_0:def 3;
        end;
        suppose
          not a in IG;
          then a in [:cG,cG:] \ IG by A1,XBOOLE_0:def 5;
          then a in IG` by SUBSET_1:def 4;
          then a in IG` \ id cG by A5,XBOOLE_0:def 5;
          then a in ICmpG by NECKLACE:def 8;
          then a in IG \/ ICmpG by XBOOLE_0:def 3;
          then a in id cG \/ (IG \/ ICmpG) by XBOOLE_0:def 3;
          hence thesis by XBOOLE_1:4;
        end;
      end;
    end;
  end;
  let a be object;
  assume a in idcG \/ IG \/ ICmpG;
  then
A6: a in id cG \/ IG or a in ICmpG by XBOOLE_0:def 3;
  per cases by A6,XBOOLE_0:def 3;
  suppose
    a in id cG;
    hence thesis;
  end;
  suppose
    a in IG;
    hence thesis;
  end;
  suppose
    a in ICmpG;
    then a in IG` \ id cG by NECKLACE:def 8;
    hence thesis;
  end;
end;
