 reserve A for non empty Subset of REAL;

theorem Th19:
  for a,b,c be Real, f be Function of REAL,REAL st b > 0 & c > 0 &
  ( for x be Real holds f.x = max(0,b-|. b*(x-a)/c .|) ) holds
  centroid (f,['a-c,a+c']) = a
proof
 let a,b,c be Real, f be Function of REAL,REAL;
 assume that
 A1: b > 0 and
 A2: c > 0 and
 A3: for x be Real holds f.x = max(0, b - |. b*(x-a)/c .|);
 f | ['a-c,a+c'] = ( AffineMap ( b/c,b-a*b/c) |
[. lower_bound ['a-c,a+c'], (b+a*b/c - (b-a*b/c))/((b/c)-(-b/c)) .] )
+* ( AffineMap (-b/c,b+a*b/c) |
[. (b+a*b/c - (b-a*b/c))/((b/c)-(-b/c)), upper_bound ['a-c,a+c'] .] )
 by Th16,A1,A2,A3;
 hence thesis by Th15,A1,A2;
end;
