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;
reserve f for Function of I,REAL;
reserve f,g for HK-integrable Function of I,REAL,
          r for Real;
reserve f for bounded integrable Function of I,REAL;
reserve jauge for positive-yielding Function of I,REAL;
reserve D for tagged_division of I;
reserve r1,r2,s for Real,
           D,D1 for Division of I,
             fc for Function of I,REAL;

theorem Th46:
   fc = chi(I,I) implies 0 <= min rng upper_volume(fc,D) &
   (0 = min rng upper_volume(fc,D) iff divset(D,1) = [.D.1,D.1.])
   proof
     assume
A1:  fc = chi(I,I);
     consider i0 be Nat such that
A2:  i0 in dom D and
A3:  min rng upper_volume(fc,D) = (upper_volume(fc,D)).i0 by Th43;
     min rng upper_volume(fc,D) = vol(divset(D,i0)) by A1,A2,A3,INTEGRA1:20;
     hence 0 <= min rng upper_volume(fc,D) by INTEGRA1:9;
     thus 0 = min rng upper_volume(fc,D) iff divset(D,1) = [.D.1,D.1.]
     proof
       hereby
         assume 0 = min rng upper_volume(fc,D);
         then
A4:      vol(divset(D,i0)) = 0 by A3,A1,A2,INTEGRA1:20;
         rng D <> {};
         then 1 in dom D by FINSEQ_3:32;
         then D.1 in I by INTEGRA1:6;
         then D.1 in [. lower_bound I, upper_bound I.] by INTEGRA1:4;
         then
A5:      lower_bound I <= D.1 by XXREAL_1:1;
         now
           1 <= i0 <= len D by A2,FINSEQ_3:25;
           then per cases by XXREAL_0:1;
           suppose i0 = 1;
             then divset(D,i0) = [.lower_bound I,D.1.] by COUSIN:50;
             then lower_bound divset(D,i0) = lower_bound I &
               upper_bound divset(D,i0) = D.1 by A5,JORDAN5A:19;
             then vol divset(D,i0) = D.1 - lower_bound I by INTEGRA1:def 5;
             hence divset(D,1) = [.D.1,D.1.] by A4,COUSIN:50;
           end;
           suppose
A6:          1 < i0;
A7:          now
               thus i0 in dom D by A2;
               thus i0 - 1 in dom D by A6,A2,CGAMES_1:20;
               i0 - 1 < i0 - 0 by XREAL_1:15;
               hence i0 - 1 < i0;
             end;
             then
A8:          D.(i0 - 1) < D.i0 by VALUED_0:def 13;
             divset(D,i0) = [.D.(i0-1),D.i0.] by A6,A2,COUSIN:50;
             then lower_bound divset(D,i0) = D.(i0 - 1) &
               upper_bound divset(D,i0) = D.i0 by A8,JORDAN5A:19;
             then vol divset(D,i0) = D.i0 - D.(i0 - 1) by INTEGRA1:def 5;
             hence divset(D,1) = [.D.1,D.1.] by A4,A7,VALUED_0:def 13;
           end;
         end;
         hence divset(D,1) = [.D.1,D.1.];
       end;
       assume
A9:    divset(D,1) = [.D.1,D.1.];
A10:   vol divset(D,1)
         = upper_bound divset(D,1) - lower_bound divset(D,1) by INTEGRA1:def 5
        .= D.1 - lower_bound divset(D,1) by A9,JORDAN5A:19
        .= D.1 - D.1 by A9,JORDAN5A:19
        .= 0;
       rng D <> {}; then
A11:   1 in dom D by FINSEQ_3:32; then
A12:   upper_volume(fc,D).1 = 0 by A1,A10,INTEGRA1:20;
       1 in Seg len D by A11,FINSEQ_1:def 3;
       then 1 in Seg len upper_volume(fc,D) by INTEGRA1:def 6; then
A13:   1 in dom upper_volume(fc,D) by FINSEQ_1:def 3;
       now
         let i be Nat;
         assume i in dom upper_volume(fc,D);
         then i in Seg len upper_volume(fc,D) by FINSEQ_1:def 3;
         then i in Seg len D by INTEGRA1:def 6;
         then i in dom D by FINSEQ_1:def 3;
         then upper_volume(fc,D).i = vol divset(D,i) by A1,INTEGRA1:20;
         hence 0 <= upper_volume(fc,D).i by INTEGRA1:9;
       end;
       hence 0 = min rng upper_volume(fc,D) by A13,A12,Th45;
     end;
   end;
