reserve f,g,h for Function,
  A for set;
reserve F for Function,
  B,x,y,y1,y2,z for set;

theorem Th3:
  (f|A)~ = f~|A
proof
A1: dom (f|A) = dom f /\ A by RELAT_1:61
    .= dom (f~) /\ A by Def1
    .= dom (f~|A) by RELAT_1:61;
A2: now
    let x be object such that
A3: x in dom(f~|A);
A4: dom (f|A) c= dom f by RELAT_1:60;
    now
      per cases;
      suppose
        ex y,z being object st (f|A).x = [y,z];
        then consider y,z being object such that
A5:     (f|A).x = [y,z];
A6:     f.x = [y,z] by A1,A3,A5,FUNCT_1:47;
        thus (f|A)~.x = [z,y] by A1,A3,A5,Def1
          .= f~.x by A1,A3,A4,A6,Def1
          .= (f~|A).x by A3,FUNCT_1:47;
      end;
      suppose
A7:     not ex y,z being object st (f|A).x = [y,z];
A8:     (f|A).x = f.x by A1,A3,FUNCT_1:47;
        (f|A)~.x = (f|A).x by A1,A3,A7,Def1;
        hence (f|A)~.x = f~.x by A1,A3,A4,A7,A8,Def1
          .= (f~|A).x by A3,FUNCT_1:47;
      end;
    end;
    hence (f|A)~.x = (f~|A).x;
  end;
  dom ((f|A)~) = dom (f|A) by Def1;
  hence thesis by A1,A2;
end;
