
theorem
  for f being Function
  holds f is non empty constant iff ex y being object st rng f = {y}
proof
  let f be Function;
  hereby
    assume A1: f is non empty constant;
    set Y = the Element of rng f;
    reconsider y = Y as object;
    consider x being object such that
      A2: x in dom f & f.x = y by A1, FUNCT_1:def 3;
    take y;
    now
      let y2 be object;
      assume y2 in rng f;
      then consider x2 being object such that
        A3: x2 in dom f & f.x2 = y2 by FUNCT_1:def 3;
      f.x = f.x2 by A1, A2, A3, FUNCT_1:def 10;
      hence y2 in {y} by A2, A3, TARSKI:def 1;
    end;
    hence rng f = {y} by A1, TARSKI:def 3, ZFMISC_1:33;
  end;
  given y being object such that
    A4: rng f = {y};
  thus f is non empty by A4;
  now
    let x1, x2 be object;
    assume x1 in dom f & x2 in dom f;
    then f.x1 in rng f & f.x2 in rng f by FUNCT_1:3;
    then f.x1 = y & f.x2 = y by A4, TARSKI:def 1;
    hence f.x1 = f.x2;
  end;
  hence f is constant by FUNCT_1:def 10;
end;
