reserve A,B,X,X1,Y,Y1,Y2,Z for set, a,x,y,z for object;
reserve P,R for Relation of X,Y;

theorem
  dom (R~) = rng R & rng (R~) = dom R
proof
  now
    let x be object;
A1: now
      assume x in rng R;
      then consider y being object such that
A2:   [y,x] in R by XTUPLE_0:def 13;
      [x,y] in R~ by A2,RELAT_1:def 7;
      hence x in dom (R~) by XTUPLE_0:def 12;
    end;
    now
      assume x in dom (R~);
      then consider y being object such that
A3:   [x,y] in R~ by XTUPLE_0:def 12;
      [y,x] in R by A3,RELAT_1:def 7;
      hence x in rng R by XTUPLE_0:def 13;
    end;
    hence x in dom (R~) iff x in rng R by A1;
  end;
  hence dom (R~) = rng R by TARSKI:2;
  now
    let x be object;
A4: now
      assume x in dom R;
      then consider y being object such that
A5:   [x,y] in R by XTUPLE_0:def 12;
      [y,x] in R~ by A5,RELAT_1:def 7;
      hence x in rng (R~) by XTUPLE_0:def 13;
    end;
    now
      assume x in rng (R~);
      then consider y being object such that
A6:   [y,x] in R~ by XTUPLE_0:def 13;
      [x,y] in R by A6,RELAT_1:def 7;
      hence x in dom R by XTUPLE_0:def 12;
    end;
    hence x in rng (R~) iff x in dom R by A4;
  end;
  hence thesis by TARSKI:2;
end;
