reserve A for non empty closed_interval Subset of REAL;

theorem
for f being Function of REAL,REAL holds
max+ f = max(AffineMap(0,0),f)
proof
 let f be Function of REAL,REAL;
 dom f = REAL by FUNCT_2:def 1; then
 B7: dom (max+ f ) = REAL by RFUNCT_3:def 10;then
 A2: dom (max+ f) = dom max(AffineMap(0,0),f) by FUNCT_2:def 1;
 set F = max(AffineMap(0,0),f);
 for x being object st x in dom F holds
 F . x = (max+ f) . x
 proof
  let x be object;
  assume x in dom F; then
  reconsider x as Element of REAL;
  (max+ f).x = max+ (f.x) by RFUNCT_3:def 10,B7
  .= max(f.x, 0*x+0) by RFUNCT_3:def 1
  .= max(f.x,AffineMap(0,0).x) by FCONT_1:def 4
  .= (max(f,AffineMap(0,0))).x by COUSIN2:def 2;
  hence thesis;
 end;
 hence F = (max+ f) by FUNCT_1:2,A2;
end;
