 reserve A for non empty Subset of REAL;

theorem
  for a,b,c,d be Real, f be Function of REAL,REAL st
    a < b & b < c & c < d &
  f is_integrable_on ['a,d'] & f | ['a,d'] is bounded &
  for x be Real st x in ['a,b'] \/ ['c,d'] holds f.x = 0
    holds
  centroid(f,['a,d']) = centroid(f,['b,c'])
proof
 let a,b,c,d be Real;
 let f be Function of REAL,REAL;
 assume A1: a < b & b < c & c < d; then
 A4: a < c by XXREAL_0:2;
 assume A2: f is_integrable_on ['a,d'] & f | ['a,d'] is bounded;
 assume A3: for x be Real st x in ['a,b'] \/ ['c,d'] holds f.x = 0;
 A5: for x be Real st x in [' c, d '] holds f.x = 0
 proof
  let x be Real;
  assume x in [' c, d ']; then
  x in ['a,b'] \/ ['c,d'] by XBOOLE_0:def 3;
  hence thesis by A3;
 end;
 AA: a <= a & a <= c & c <= d by XXREAL_0:2,A1;
 AD: a <= d by XXREAL_0:2,A1,A4;
 reconsider F = f as PartFunc of REAL,REAL;
 B2: F is_integrable_on ['a,d'] & F | ['a,d'] is bounded by A2;
 A6:REAL = dom f by FUNCT_2:def 1;
 a <= c & c <= d by XXREAL_0:2,A1; then
 c in [. a,d .]; then
 A9: c in ['a,d'] by XXREAL_0:2,A1,A4,INTEGRA5:def 3;
 A8: for x be Real st x in [' a,b '] holds F.x = 0
 proof
  let x be Real;
  assume x in [' a,b ']; then
  x in ['a,b'] \/ ['c,d'] by XBOOLE_0:def 3;
  hence thesis by A3;
 end;
 reconsider F as Function of REAL,REAL;
 A7a: F is_integrable_on ['a,c'] by INTEGRA6:17,AD,A6,A9,B2;
 A77a: F | ['a,c'] is bounded by INTEGRA6:18,AA,A6,B2;
 thus centroid(f,['a,d'])
  = centroid(F,[' a,c']) by A4,A5,A1,A2,FUZZY_6:8
 .= centroid(f,['b,c']) by A8,A1,A7a,A77a,FUZZY_6:9;
end;
