theorem Th6:
  dom RestrictSub(x,All(x,p),Sub) misses {x}
proof
  set finSub = RestrictSub(x,All(x,p),Sub);
  now
    set q = All(x,p);
    set X = {y1 : y1 in still_not-bound_in q & y1 is Element of dom Sub & y1
    <> x & y1 <> Sub.y1};
    assume dom finSub meets {x};
    then consider b being object such that
A1: b in dom finSub and
A2: b in {x} by XBOOLE_0:3;
    finSub = Sub|X by SUBSTUT1:def 6;
    then finSub = (@Sub)|X by SUBSTUT1:def 2;
    then @finSub = (@Sub)|X by SUBSTUT1:def 2;
    then dom @finSub = dom @Sub /\ X by RELAT_1:61;
    then
A3: dom @finSub c= X by XBOOLE_1:17;
    b in dom @finSub by A1,SUBSTUT1:def 2;
    then b in X by A3;
    then ex y st y = b & y in still_not-bound_in q & y is Element of dom Sub &
    y <> x & y <> Sub.y;
    hence contradiction by A2,TARSKI:def 1;
  end;
  hence thesis;
end;
