reserve X for set;
reserve n,i for Element of NAT;
reserve a,b,c,d,e,r,x0 for Real;
reserve A for non empty closed_interval Subset of REAL;
reserve f,g,h for PartFunc of REAL,REAL n;
reserve E for Element of REAL n;

theorem Th51:
  for E be Point of REAL-NS n, f be PartFunc of REAL,REAL-NS n
  st (a <= b & ['a,b'] c= dom f &
  for x be Real st x in ['a,b'] holds f.x = E)
  holds f is_integrable_on ['a,b'] & f| ['a,b'] is bounded &
  integral(f,a,b) = (b-a)*E
  proof
    let e be Point of REAL-NS n,
    f be PartFunc of REAL,REAL-NS n;
    assume
A1: a <= b & ['a,b'] c= dom f &
    for x be Real st x in ['a,b'] holds f.x = e;
    reconsider f1=f as PartFunc of REAL,REAL n by REAL_NS1:def 4;
    reconsider e1=e as Element of REAL n by REAL_NS1:def 4;
A2: for x be Real st x in ['a,b'] holds f1.x = e1 by A1;
A3: f1 is_integrable_on ['a,b'] & f1| ['a,b'] is bounded &
    integral(f1,a,b) = (b-a)*e1 by Th29,A1,A2;
    integral(f1,a,b) = integral(f,a,b) by A3,A1,Th45;
    hence thesis by A3,Th43,A1,Th34,REAL_NS1:3;
  end;
