reserve x,y for object,X,Y,A,B,C,M for set;
reserve P,Q,R,R1,R2 for Relation;
reserve X,X1,X2 for Subset of A;
reserve Y for Subset of B;
reserve R,R1,R2 for Subset of [:A,B:];
reserve FR for Subset-Family of [:A,B:];

theorem Th24:
  y in R.:^X implies for x being set st x in X holds y in Im(R,x)
proof
  assume
A1: y in R.:^X;
  per cases;
  suppose .:R.:{_{X}_} = {};
    hence thesis by Th23;
  end;
  suppose .:R.:{_{X}_} <> {};
    then
A2: y in meet (.:R.:{_{X}_}) by A1,SETFAM_1:def 9;
    for x being set st x in X holds y in R.:{x}
    proof
      let x be set;
      assume
A3:   x in X;
      then
A4:   {x} in {_{X}_} by Th1;
A5:   {x} c= A
      proof
        let a be object;
        assume a in {x};
        then a = x by TARSKI:def 1;
        hence thesis by A3;
      end;
      then
A6:   .:R.{x} = R.:{x} by Def1;
      dom .:R = bool A by Def1;
      then [{x},R.:{x}] in .:R by A5,A6,FUNCT_1:1;
      then R.:{x} in .:R.:{_{X}_} by A4,RELAT_1:def 13;
      hence thesis by A2,SETFAM_1:def 1;
    end;
    hence thesis;
  end;
end;
