reserve x,y,X,Y for set;
reserve C,D,E for non empty set;
reserve SC for Subset of C;
reserve SD for Subset of D;
reserve SE for Subset of E;
reserve c,c1,c2 for Element of C;
reserve d,d1,d2 for Element of D;
reserve e for Element of E;
reserve f,f1,g for PartFunc of C,D;
reserve t for PartFunc of D,C;
reserve s for PartFunc of D,E;
reserve h for PartFunc of C,E;
reserve F for PartFunc of D,D;

theorem
  f|X is constant iff for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f
  holds f/.c1=f/.c2
proof
  thus f|X is constant implies for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom
  f holds f/.c1=f/.c2
  proof
    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;
    let c1,c2;
    assume that
A2: c1 in X /\ dom f and
A3: c2 in X /\ dom f;
    f/.c1 = d by A1,A2;
    hence thesis by A1,A3;
  end;
  assume
A4: for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f holds f/.c1=f/.c2;
  now
    per cases;
    suppose
A5:   X /\ dom f = {};
      now
        set d = the Element of D;
        take d;
        let c;
        thus c in X /\ dom f implies f/.c = d by A5;
      end;
      hence thesis by Th35;
    end;
    suppose
A6:   X /\ dom f <> {};
      set x = the Element of X /\ dom f;
      x in dom f by A6,XBOOLE_0:def 4;
      then reconsider x as Element of C;
      for c holds c in X /\ dom f implies f/.c = f/.x by A4;
      hence thesis by Th35;
    end;
  end;
  hence thesis;
end;
