theorem Th57:
  f|X is constant iff ex d st for c st c in X /\ dom f holds f.c = d
proof
  hereby
    assume f|X is constant;
    then consider d such that
A1: for c st c in X /\ dom f holds f/.c = d by Th35;
    take d;
    let c;
    assume
A2: c in X /\ dom f;
    then c in dom f by XBOOLE_0:def 4;
    hence f.c = f/.c by PARTFUN1:def 6
      .= d by A1,A2;
  end;
  given d such that
A3: for c st c in X /\ dom f holds f.c = d;
  take d;
  let c;
  assume
A4: c in dom(f|X);
  then
A5: c in X /\ dom f by RELAT_1:61;
  then
A6: c in dom f by XBOOLE_0:def 4;
  thus (f|X).c = (f|X)/.c by A4,PARTFUN1:def 6
    .= f/.c by A5,Th16
    .= f.c by A6,PARTFUN1:def 6
    .= d by A3,A5;
end;
