reserve A for non empty closed_interval Subset of REAL;

theorem
for f being Function of REAL,REAL st
f is_integrable_on A & f | A is bounded & integral(f,A) > 0
holds
ex c being Real st c in A & f.c > 0
proof
 let f be Function of REAL,REAL;
 assume B1: f is_integrable_on A & f | A is bounded;
 assume A1: integral(f,A) > 0;
  assume A2: not ex c being Real st c in A & f.c > 0;
  set g = (-1)(#)f;
  ex r being Real st for y being set st y in dom (g | A) holds
  |.(g | A).y.| < r
  proof
   consider r being Real such that
   C1: for y being set st y in dom (f | A) holds |.(f | A).y.| < r
     by COMSEQ_2:def 3,B1;
   take r;
   for y being set st y in dom (g | A) holds |.(g | A).y.| < r
   proof
    let y be set;
    assume C4: y in dom (g|A);
    C7: dom (f|A) = A & dom (g|A) = A by FUNCT_2:def 1;
    |.(g | A).y.| = |.((-1)(#)f).y.| by FUNCT_1:49,C4
    .= |.(-1)*(f.y).| by VALUED_1:6
    .= |.-(f.y).|
    .= |. f.y .| by COMPLEX1:52
    .= |.(f | A).y.| by FUNCT_1:49,C4;
    hence thesis by C1,C4,C7;
   end;
   hence thesis;
  end; then
  A4: (g | A) | A is bounded by COMSEQ_2:def 3;
  for x be Real st x in A holds 0 <= g|A.x
  proof
   let x be Real;
   assume C2: x in A;
   C3: f.x <= 0 by A2,C2;
   g|A.x = ((-1)(#)f).x by FUNCT_1:49,C2
   .=(-1)*(f.x) by VALUED_1:6;
   hence thesis by C3;
  end; then
  A6:  0 <= integral(g|A) by A4,INTEGRA2:32;
  reconsider f as PartFunc of REAL,REAL;
  dom f = REAL by FUNCT_2:def 1; then
  A c= dom f & f is_integrable_on A & f | A is bounded by B1;
  then
  integral (((-1)(#)f),A) = (-1) * (integral (f,A)) by INTEGRA6:9;
  hence contradiction by A1,A6,INTEGRA5:def 2;
end;
