 reserve A for non empty Subset of REAL;
 reserve A for non empty closed_interval Subset of REAL;

theorem
  for a,b,c be Real, f be Function of REAL,REAL st
  b > 0 & c > 0 & ['a-c,a+c'] c= A &
  (for x be Real holds f.x = max(0,b-|. b*(x-a)/c .|))
    holds
  centroid (f,A) = a
proof
 let a,b,c be Real, f be Function of REAL,REAL;
 assume that
 A1: b > 0 and
 A2: c > 0 and
 A4: ['a-c,a+c'] c= A and
 A3: for x be Real holds f.x = max(0, b - |. b*(x-a)/c .|);
 A5: a < a+c & a-c < a by XREAL_1:44, XREAL_1:29,A2;
 [.(lower_bound ['a-c,a+c']),(upper_bound ['a-c,a+c']).] = ['a-c,a+c']
  & ['a-c,a+c'] = [.a-c,a+c.] by XXREAL_0:2,A5,INTEGRA5:def 3,INTEGRA1:4;
 then
 A8: lower_bound ['a-c,a+c'] = a-c &
    a+c = upper_bound ['a-c,a+c'] by INTEGRA1:5;
 A7: for x be Real st x in (A \ ['a-c,a+c']) holds f.x = 0
 proof
  let x be Real;
  assume A71: x in (A \ ['a-c,a+c']);
  not x in ['a-c,a+c'] by XBOOLE_0:def 5,A71;
  hence thesis by Lm20A,A1,A2,A3;
 end;
 A9: f.(lower_bound ['a-c,a+c']) = 0 &
 f.(upper_bound ['a-c,a+c']) = 0 by Lm20B,A1,A2,A3;
 f is_integrable_on A & f | A is bounded by Lm20,A1,A2,A3; then
 centroid (f,A) = centroid (f,['a-c,a+c']) by Th17,A4,A7,A9,A8,A5;
 hence thesis by A1,A2,A3,Th19;
end;
