 reserve x,y,z,t for object,X,Y,Z,W for set;
 reserve R,S,T for Relation;

theorem Th29:
  (R * R = R & R * (R \ CL R) = {} & [x,y] in R & x <> y implies
    x in (dom R \ dom CL R) & y in dom CL R) &
  (R * R = R & (R \ CL R) * R = {} & [x,y] in R & x <> y implies
    y in (rng R \ dom CL R) & x in dom CL R)
proof
  thus R * R = R & R * (R \ CL R) = {} & [x,y] in R & x <> y implies
    x in (dom R \ dom CL R) & y in dom CL R
  proof
    assume that
A1: R * R = R and
A2: R * (R \ CL R) = {} and
A3: [x,y] in R and
A4: x <> y;
A5: y in rng R by A3,XTUPLE_0:def 13;
    consider z being object such that
A6: [x,z] in R and
A7: [z,y] in R by A1,A3,RELAT_1:def 8;
A8: z = y
    proof
      assume z <> y;
      then not [z,y] in id dom R by RELAT_1:def 10;
      then not [z,y] in R /\ id dom R by XBOOLE_0:def 4;
      then [z,y] in R \ CL R by A7,XBOOLE_0:def 5;
      hence thesis by A2,A6,RELAT_1:def 8;
    end;
    not [x,y] in id dom R by A4,RELAT_1:def 10;
    then not [x,y] in R /\ id dom R by XBOOLE_0:def 4; then
A9: [x,y] in R \ CL(R) by A3,XBOOLE_0:def 5;
A10: not x in dom CL R
    proof
      assume x in dom CL R;
      then [x,x] in R by Th27;
      hence thesis by A2,A9,RELAT_1:def 8;
    end;
    x in dom R by A6,XTUPLE_0:def 12;
    hence thesis by A7,A8,A5,A10,Th27,XBOOLE_0:def 5;
  end;
  thus R * R = R & (R \ CL R) * R = {} & [x,y] in R & x <> y implies
  y in (rng R \ dom CL R) & x in dom CL R
  proof
    assume that
A11: R * R = R and
A12: (R \ CL R) * R = {} and
A13: [x,y] in R and
A14: x <> y;
A15: x in dom R by A13,XTUPLE_0:def 12;
    consider z being object such that
A16: [x,z] in R and
A17: [z,y] in R by A11,A13,RELAT_1:def 8;
A18: z = x
    proof
      assume z <> x;
      then not [x,z] in id dom R by RELAT_1:def 10;
      then not [x,z] in R /\ id dom R by XBOOLE_0:def 4;
      then [x,z] in R \ CL R by A16,XBOOLE_0:def 5;
      hence thesis by A12,A17,RELAT_1:def 8;
    end;
    not [x,y] in id dom R by A14,RELAT_1:def 10;
    then not [x,y] in R /\ id dom R by XBOOLE_0:def 4;
    then
A19: [x,y] in R \ CL R by A13,XBOOLE_0:def 5;
A20: not y in dom CL R
    proof
      assume y in dom CL R;
      then [y,y] in R by Th27;
      hence thesis by A12,A19,RELAT_1:def 8;
    end;
    y in rng R by A17,XTUPLE_0:def 13;
    hence thesis by A16,A18,A15,A20,Th27,XBOOLE_0:def 5;
  end;
end;
