
theorem Th40:
for f be PartFunc of REAL,REAL, a,b be Real st
  ex Intf be PartFunc of REAL,REAL st dom Intf = [.a,b.[ &
   (for x be Real st x in dom Intf holds Intf.x = integral(f,a,x)) &
    (Intf is_left_divergent_to+infty_in b or
     Intf is_left_divergent_to-infty_in b)
 holds not f is_right_ext_Riemann_integrable_on a,b
proof
    let f be PartFunc of REAL,REAL, a,b be Real;
    assume ex Intf be PartFunc of REAL,REAL st dom Intf = [.a,b.[ &
     (for x be Real st x in dom Intf holds Intf.x = integral(f,a,x)) &
     (Intf is_left_divergent_to+infty_in b or
       Intf is_left_divergent_to-infty_in b); then
    consider Intf be PartFunc of REAL,REAL such that
A1:     dom Intf = [.a,b.[ and
A2:  for x be Real st x in dom Intf holds Intf.x = integral(f,a,x) and
A3:  Intf is_left_divergent_to+infty_in b
    or Intf is_left_divergent_to-infty_in b;

    hereby assume f is_right_ext_Riemann_integrable_on a,b; then
     consider I be PartFunc of REAL,REAL such that
A4:   dom I = [.a,b.[ and
A5:   for x be Real st x in dom I holds I.x = integral(f,a,x) and
A6:   I is_left_convergent_in b by INTEGR10:def 1;
     now let x be Element of REAL;
      assume A7: x in dom I; then
      I.x = integral(f,a,x) by A5;
      hence I.x = Intf.x by A1,A4,A7,A2;
     end; then
     I = Intf by A1,A4,PARTFUN1:5;
     hence contradiction by A3,A6,Th6,Th7;
    end;
end;
