 reserve a,b,r for Real;
 reserve A for non empty set;
 reserve X,x for set;
 reserve f,g,F,G for PartFunc of REAL,REAL;
 reserve n for Element of NAT;

theorem Th4:
  for a,b,c,d,e be Real,
      f be PartFunc of REAL,REAL
  st a <= b & c <= d & c in [.a,b.] & d in [.a,b.]
   & [.a,b.] c= dom f & f | ['a,b'] is continuous
   & for t be Real st t in [.c,d.] holds e <= f.t
  holds e*(d-c) <= integral(f,c,d)
proof
  let a,b,c,d,e be Real,
      f be PartFunc of REAL,REAL;
  assume
  A1: a <= b & c <= d & c in [.a,b.] & d in [.a,b.]
    & [.a,b.] c= dom f & f | ['a,b'] is continuous
    & for t be Real st t in [.c,d.] holds e <= f.t; then

  A2: ['a,b'] = [.a,b.] by INTEGRA5:def 3;
  set g = REAL--> e;
  A3: dom(g) = REAL & rng(g) = {e} by FUNCOP_1:8,FUNCT_2:def 1; then
  reconsider g as PartFunc of REAL,REAL by RELSET_1:4;
  g is continuous by A3,FCONT_1:39; then
  A5: g | ['a,b'] is continuous;

  for t be Real st t in [.c,d.] holds g.t <= f.t
  proof
    let t be Real;
    assume
    A6: t in [.c,d.];
    then e <= f.t by A1;
    hence g.t <= f.t by A6,FUNCOP_1:7;
  end; then
  A7: integral(g,c,d) <= integral(f,c,d) by A1,A3,A5,Th3;

  for x be Real st x in ['a,b'] holds g.x = e by FUNCOP_1:7;
  hence e*(d-c) <= integral(f,c,d) by A1,A2,A3,A7,INTEGRA6:27;
end;
