reserve x,y,X,Y for set;
reserve C for non empty set;
reserve c for Element of C;
reserve f,f1,f2,f3,g,g1 for PartFunc of C,COMPLEX;
reserve r1,r2,p1 for Real;
reserve r,q,cr1,cr2 for Complex;

theorem
  (r(#)f)|X = r(#)(f|X)
proof
A1: now
    let c;
    assume
A2: c in dom ((r(#)f)|X);
    then
A3: c in dom (r(#)f) /\ X by RELAT_1:61;
    then
A4: c in X by XBOOLE_0:def 4;
A5: c in dom (r(#)f) by A3,XBOOLE_0:def 4;
    then c in dom f by Th4;
    then c in dom f /\ X by A4,XBOOLE_0:def 4;
    then
A6: c in dom (f|X) by RELAT_1:61;
    then
A7: c in dom (r(#)(f|X)) by Th4;
    thus ((r(#)f)|X)/.c = (r(#)f)/.c by A2,PARTFUN2:15
      .= r*((f/.c)) by A5,Th4
      .= r*((f|X)/.c) by A6,PARTFUN2:15
      .= (r(#)(f|X))/.c by A7,Th4;
  end;
  dom ((r(#)f)|X) = dom (r(#)f) /\ X by RELAT_1:61
    .= dom f /\ X by Th4
    .= dom (f|X) by RELAT_1:61
    .= dom (r(#)(f|X)) by Th4;
  hence thesis by A1,PARTFUN2:1;
end;
