reserve a,x,y for object, A,B for set,
  l,m,n for Nat;

theorem
  for f being Function, X,y,z being set holds (f+*(X-->y))+*(X-->z) = f
  +*(X-->z)
proof
  let f be Function, X,y,z be set;
A1: dom (X-->z) = X;
A2: dom (X-->y) = X;
  then dom (f+*(X-->y)) = dom f \/ X by FUNCT_4:def 1;
  then
A3: dom ((f+*(X-->y))+*(X-->z)) = (dom f \/ X) \/ X by A1,FUNCT_4:def 1
    .= dom f \/ (X \/ X) by XBOOLE_1:4
    .= dom f \/ X;
A4: now
    let x be object;
    assume x in dom f \/ X;
    per cases;
    suppose
A5:   x in X;
      then ((f+*(X-->y))+*(X-->z)).x = (X-->z).x by A1,FUNCT_4:13;
      hence ((f+*(X-->y))+*(X-->z)).x = (f+*(X-->z)).x by A1,A5,FUNCT_4:13;
    end;
    suppose
A6:   not x in X;
      then ((f+*(X-->y))+*(X-->z)).x = (f+*(X-->y)).x by A1,FUNCT_4:11;
      then ((f+*(X-->y))+*(X-->z)).x = f.x by A2,A6,FUNCT_4:11;
      hence ((f+*(X-->y))+*(X-->z)).x = (f+*(X-->z)).x by A1,A6,FUNCT_4:11;
    end;
  end;
  dom (f+*(X-->z)) = dom f \/ X by A1,FUNCT_4:def 1;
  hence thesis by A3,A4;
end;
