reserve a,b,c,d,e for Real;
reserve X,Y for set,
          Z for non empty set,
          r for Real,
          s for ExtReal,
          A for Subset of REAL,
          f for real-valued Function;
reserve I for non empty closed_interval Subset of REAL,
       TD for tagged_division of I,
        D for Division of I,
        T for Element of set_of_tagged_Division(D),
        f for PartFunc of I,REAL;

theorem Th19:
  f is upper_integrable implies upper_integral(f) <= upper_sum(f,D)
  proof
    assume f is upper_integrable;
    then
A1: rng upper_sum_set(f) is bounded_below by INTEGRA1:def 12;
    set r = upper_integral(f);
    r = lower_bound rng upper_sum_set(f) by INTEGRA1:def 14;
    then
A2: for s be Real st s in rng upper_sum_set(f) holds r <= s by A1,SEQ_4:def 2;
A3: dom upper_sum_set(f) = divs I by PARTFUN1:def 2;
    D in divs I by INTEGRA1:def 3;
    then r <= (upper_sum_set(f)).D by A3,A2,FUNCT_1:3;
    hence thesis by INTEGRA1:def 10;
  end;
