
theorem Th27:
  for n, b be Nat st b > 1 & n >= 1 holds
  Sum( (b-1)(#)((powerfact b)^\(n+1)) ) < 1/((b to_power(n!)) to_power n)
  proof
    let n, b be Nat;
    assume
A0: b > 1 & n >= 1; then
    (powerfact b)^\(n + 1) is summable by Th26,SERIES_1:12; then
A2: Sum ((b-1)(#)((powerfact b)^\(n+1))) = (b-1)*Sum(((powerfact b)^\(n+1)))
    by SERIES_1:10;
    1 < b - 0 by A0; then
A3: b - 1 > 0 by XREAL_1:12;
    set s1 = (powerfact b) ^\ (n+1);
    set s2 = ((1/b) GeoSeq) ^\ ((n+1)!);
A4: |. 1/b .| < 1/1 by A0,XREAL_1:76; then
A5: (1 / b) GeoSeq is summable by SERIES_1:24;
A6: for k be Nat holds 0 <= s1.k & s1.k <= s2.k
    proof
      let k be Nat;
A7:   s1.k = (powerfact b).(k+(n+1)) by NAT_1:def 3
          .= 1/(b to_power((k+(n+1))!)) by DefPower;
      k = 0 or k >= 1 + 0 by NAT_1:13; then
      per cases;
      suppose
A8:     k >= 1;
A9:     s2.k = ((1/b) GeoSeq).(k+(n+1)!) by NAT_1:def 3
            .= (1/b)|^(k+(n+1)!) by PREPOWER:def 1
            .= 1/(b|^(k+(n+1)!)) by PREPOWER:7;
        n+1 >= 1 by A0,NAT_1:16; then
        b to_power (k+(n+1)!) <= b to_power((k+(n+1))!) by PRE_FF:8,A0,Th8,A8;
        then
        (b|^(k+(n+1)!))" >= (b|^((k+(n+1))!))" by A0,XREAL_1:85; then
        1/(b|^(k+(n+1)!)) >= (b|^((k+(n+1))!))" by XCMPLX_1:215;
        hence thesis by A7,A9,XCMPLX_1:215;
      end;
      suppose
A10:     k = 0; then
A11:     s1.k = (powerfact b).(0+(n+1)) by NAT_1:def 3
             .= 1/(b to_power((n+1)!)) by DefPower;
        hence s1.k >= 0;
        s2.k = ((1/b) GeoSeq).(0+(n+1)!) by NAT_1:def 3,A10
            .= (1/b)|^(0+(n+1)!) by PREPOWER:def 1
            .= 1/(b|^(0+(n+1)!)) by PREPOWER:7;
        hence thesis by A11;
      end;
    end;
A12: s2 is summable by A4,SERIES_1:12,SERIES_1:24;
    ex k be Nat st 1 <= k & s1.k < s2.k
    proof
      take k = 2;
A13:   s1.k = (powerfact b).(k+(n+1)) by NAT_1:def 3
           .= 1/(b to_power ((k+(n+1))!)) by DefPower;
A14:   s2.k = ((1/b) GeoSeq).(k+(n+1)!) by NAT_1:def 3
           .= (1/b)|^(k+(n+1)!) by PREPOWER:def 1
           .= 1/(b|^(k+(n+1)!)) by PREPOWER:7;
      n + 1 > 0 + 1 by A0,XREAL_1:8; then
      b to_power (k+(n+1)!) < b to_power ((k+(n+1))!)
      by POWER:39,A0,Th6; then
     (b|^(k+(n+1)!))" > (b|^((k+(n+1))!))" by A0,XREAL_1:88; then
      1/(b|^(k+(n+1)!)) > (b|^((k+(n+1))!))" by XCMPLX_1:215;
     hence thesis by A13,A14,XCMPLX_1:215;
    end; then
    Sum s1 < Sum s2 by A6,A12,Th11; then
A15: (b-1)*Sum(((powerfact b)^\(n+1))) <
     (b-1)*Sum(((1/b) GeoSeq)^\((n+1)!)) by XREAL_1:68,A3;
     reconsider bn = b |^ ((n + 1)!) as Nat;
A16: ((1/b) GeoSeq)^\((n+1)!) = (1/bn)(#)((1/b) GeoSeq)
    proof
      now let i be Element of NAT;
      thus
      (((1/b) GeoSeq)^\((n+1)!)).i=(((1/b) GeoSeq).(i+(n+1)!)) by NAT_1:def 3
   .= ((1/b)|^(i+(n+1)!)) by PREPOWER:def 1
   .= ((1/b)|^i * (1/b)|^((n+1)!)) by NEWTON:8
   .= (1/b)|^i * (1/(b|^((n+1)!))) by PREPOWER:7
   .= (1/(b|^((n+1)!))) * (((1/b) GeoSeq).i) by PREPOWER:def 1
   .= (1/((b|^((n + 1)!))) (#) ((1/b) GeoSeq)).i by VALUED_1:6;
      end;
      hence thesis by FUNCT_2:63;
    end;
    Sum(((1/b) GeoSeq)^\((n+1)!)) = (1/(b|^((n+1)!)))*Sum ((1/b) GeoSeq)
    by A16,A5,SERIES_1:10
   .= (1/(b|^((n+1)!)))*(b/(b-1)) by Th13,A0
   .= (1 * b)/((b|^((n+1)!))*(b-1)) by XCMPLX_1:76
   .= b/((b|^((n+1)!))*(b-1)); then
A17: (b-1)*Sum(((1/b) GeoSeq)^\((n+1)!))
   = (b-1)*((b/bn)/(b-1)) by XCMPLX_1:78
  .= (b-1)*(b/bn)/(b-1) by XCMPLX_1:74
  .=  b/(b|^((n+1)!)) by A3,XCMPLX_1:89;
    n! >= 1 by Th2; then
A18: b/(b|^((n+1)!)) <= (b|^(n!))/(b|^((n+1)!)) by XREAL_1:72,A0,PREPOWER:12;
    (b|^(n!))/(b|^((n+1)!))
     = (b to_power (n!))/(b to_power ((n + 1)!))
    .= b to_power (n! - (n+1)!) by POWER:29,A0
    .= b to_power (- ((n+1)! - n!))
    .= b to_power (-(n * (n!))) by Th3
    .= 1/(b to_power (n * (n!))) by POWER:28,A0
    .= 1/((b to_power (n!)) to_power n) by POWER:33,A0;
    hence thesis by A2,A15,XXREAL_0:2,A17,A18;
  end;
