reserve A,X,X1,X2,Y,Y1,Y2 for set, a,b,c,d,x,y,z for object;
reserve P,P1,P2,Q,R,S for Relation;

theorem
  R|X = {} iff dom R misses X
proof
  thus R|X = {} implies dom R misses X
  proof
    assume
A1: R|X = {};
    thus dom R /\ X = {}
    proof
      thus dom R /\ X c= {}
      proof
        let x be object;
        assume
A2:     x in (dom R) /\ X;
        then x in dom R by XBOOLE_0:def 4;
        then
A3:     ex y being object st [x,y] in R by XTUPLE_0:def 12;
        x in X by A2,XBOOLE_0:def 4;
        hence thesis by A1,A3,Def9;
      end;
      thus thesis;
    end;
  end;
  assume
A4: (dom R) /\ X = {};
  let x,y;
  hereby
    assume
A5: [x,y] in R|X;
    then x in X by Def9;
    then
A6: not x in dom R by A4,XBOOLE_0:def 4;
    [x,y] in R by A5,Def9;
    hence [x,y] in {} by A6,XTUPLE_0:def 12;
  end;
  thus thesis;
end;
