reserve a,a1,b,b1,x,y for Real,
  F,G,H for FinSequence of REAL,
  i,j,k,n,m for Element of NAT,
  I for Subset of REAL,
  X for non empty set,
  x1,R,s for set;
reserve A for non empty closed_interval Subset of REAL;
reserve A, B for non empty closed_interval Subset of REAL;
reserve r for Real;
reserve D, D1, D2 for Division of A;
reserve f, g for Function of A,REAL;

theorem Th28:
  f|A is bounded_above & len D1 = 1 implies
    upper_sum(f,D1) >= upper_sum(f,D2)
proof
  assume that
A1: f|A is bounded_above and
A2: len D1=1;
  1 in Seg(len D1) by A2,FINSEQ_1:3; then
A3: 1 in dom D1 by FINSEQ_1:def 3; then
A4: lower_bound divset(D1,1)=lower_bound A by Def3;
A5: divset(D1,1)=[.lower_bound divset(D1,1),upper_bound divset(D1,1).] by Th2;
  upper_bound divset(D1,1)=D1.1 by A3,Def3
    .=upper_bound A by A2,Def1; then
A6: divset(D1,1)=A by A4,A5,Th2;
A7: upper_volume(f,D1).1=(upper_bound (rng(f|divset(D1,1))))*vol(divset(D1,
  1)) by A3,Def5;
  reconsider ubv =
    (upper_bound (rng (f|divset(D1,1))))*vol(divset(D1,1)) as Element of REAL
      by XREAL_0:def 1;
  len upper_volume(f,D1) = 1 by A2,Def5;
  then upper_sum(f,D1)=Sum <*ubv*> by A7,FINSEQ_1:40
    .=(upper_bound (rng(f|A)))*vol(A) by A6,FINSOP_1:11
    .=(upper_bound (rng f))*vol(A);
  hence thesis by A1,Th25;
end;
