reserve X for set, a,b,c,x,y,z for object;
reserve P,R for Relation;

theorem
  R is connected iff [:field R,field R:] \ id (field R) c= R \/ R~
proof
  hereby
    assume R is connected;
    then
A1: R is_connected_in field R;
    now
      let x be object;
      now
        assume
A2:     x in [:field R, field R:] \ id (field R);
        then x in [:field R, field R:] by XBOOLE_0:def 5;
        then consider y,z being object such that
A3:     y in field R and
A4:     z in field R and
A5:     x = [y,z] by ZFMISC_1:def 2;
        not x in id (field R) by A2,XBOOLE_0:def 5;
        then y <> z by A3,A5,RELAT_1:def 10;
        then [y,z] in R or [z,y] in R by A1,A3,A4;
        then [y,z] in R or [y,z] in R~ by RELAT_1:def 7;
        hence x in R \/ R~ by A5,XBOOLE_0:def 3;
      end;
      hence x in [:field R, field R:] \ id (field R) implies x in R \/ R~;
    end;
    hence [:field R, field R:] \ id (field R) c= R \/ R~;
  end;
  assume
A6: [:field R, field R:] \ id (field R) c= R \/ R~;
  let a,b;
  [a,b] in [:field R, field R:] \ id (field R) implies [a,b] in R \/ R~ by A6;
  then
  [a,b] in [:field R, field R:] & not [a,b] in id (field R) implies
  [a,b] in R \/ R~ by XBOOLE_0:def 5;
  then a in field R & b in field R & a <> b implies
  [a,b] in R or [a,b] in R~ by RELAT_1:def 10,XBOOLE_0:def 3,ZFMISC_1:87;
  hence thesis by RELAT_1:def 7;
end;
