reserve a, b, p, q for Real;

theorem Th6:
  for p, q be Real st 1 < p & 1/p + 1/q = 1
  for a,b,ap,bq,ab be
Real_Sequence st ( for n be Nat holds ap.n=|.a.n.| to_power p & bq.
n=|.b.n.| to_power q & ab.n=|.a.n* b.n.|) holds for n be Nat holds
Partial_Sums(ab).n <= ( (Partial_Sums(ap).n) to_power (1/p) ) * ( (Partial_Sums
  (bq).n) to_power (1/q) )
proof
  let p,q be Real such that
A1: 1 < p and
A2: 1/p + 1/q = 1;
  reconsider pp=1/p as Real;
  let a,b,ap,bq,ab be Real_Sequence such that
A3: for n be Nat holds ap.n=|.a.n.| to_power p & bq.n=|.b.
  n.| to_power q & ab.n=|.a.n* b.n.|;
  let n be Nat;
  set B=Partial_Sums(bq).n;
  1/p < 1 by A1,XREAL_1:189;
  then
A4: 1-1 < 1-pp by XREAL_1:15;
  then
A5: 0 < q by A2;
A6: for n be Nat holds 0 <= bq.n
  proof
    let n be Nat;
A7: bq.n=|.b.n.| to_power q by A3;
    now
      per cases by COMPLEX1:46;
      case
        |.b.n.| = 0;
        hence thesis by A5,A7,POWER:def 2;
      end;
      case
        |.b.n.| > 0;
        hence thesis by A7,POWER:34;
      end;
    end;
    hence thesis;
  end;
  then
A8: 0 <= B by Lm2;
  set A=Partial_Sums(ap).n;
A9: for n be Nat holds 0 <= ap.n
  proof
    let n be Nat;
A10: ap.n=|.a.n.| to_power p by A3;
    now
      per cases by COMPLEX1:46;
      case
        |.a.n.| = 0;
        hence thesis by A1,A10,POWER:def 2;
      end;
      case
        |.a.n.| > 0;
        hence thesis by A10,POWER:34;
      end;
    end;
    hence thesis;
  end;
  then
A11: 0 <= A by Lm2;
  set Bq=B to_power (1/q);
  set Ap=A to_power (1/p);
A12: 1/p > 0 by A1,XREAL_1:139;
  now
    per cases;
    case
A13:  A*B = 0;
A14:  0 <= Ap
      proof
        now
          per cases by A9,Lm2;
          case
            0 < A;
            hence thesis by POWER:34;
          end;
          case
            0 = A;
            hence thesis by A12,POWER:def 2;
          end;
        end;
        hence thesis;
      end;
      0 <= Bq
      proof
        now
          per cases by A6,Lm2;
          case
            0 < B;
            hence thesis by POWER:34;
          end;
          case
            0 = B;
            hence thesis by A2,A4,POWER:def 2;
          end;
        end;
        hence thesis;
      end;
      then
A15:  0 <=Ap*Bq by A14;
      now
        per cases by A13,XCMPLX_1:6;
        case
A16:      A=0;
A17:      for k be Nat st k <=n holds a.k=0
          proof
            let k be Nat;
            assume k <=n;
            then ap.k=0 by A9,A16,Lm3;
            then
A18:        |.a.k.| to_power p = 0 by A3;
            |.a.k.| =0
            proof
              assume |.a.k.| <> 0;
              then |.a.k.| > 0 by COMPLEX1:46;
              hence contradiction by A18,POWER:34;
            end;
            hence thesis by ABSVALUE:2;
          end;
          for k be Nat st k <=n holds ab.k=0
          proof
            let k be Nat such that
A19:        k <=n;
            thus ab.k=|.a.k * b.k.| by A3
              .=|.0 * b.k.| by A17,A19
              .=0 by ABSVALUE:2;
          end;
          hence thesis by A15,Lm4;
        end;
        case
A20:      B=0;
A21:      for k be Nat st k <=n holds b.k=0
          proof
            let k be Nat;
            assume k <=n;
            then bq.k=0 by A6,A20,Lm3;
            then
A22:        |.b.k.| to_power q = 0 by A3;
            |.b.k.| =0
            proof
              assume |.b.k.| <> 0;
              then |.b.k.| > 0 by COMPLEX1:46;
              hence contradiction by A22,POWER:34;
            end;
            hence thesis by ABSVALUE:2;
          end;
          for k be Nat st k <=n holds ab.k=0
          proof
            let k be Nat such that
A23:        k <=n;
            thus ab.k=|.a.k * b.k.| by A3
              .=|.a.k * 0.| by A21,A23
              .=0 by ABSVALUE:2;
          end;
          hence thesis by A15,Lm4;
        end;
      end;
      hence thesis;
    end;
    case
A24:  A*B <> 0;
      deffunc G(Nat) =|.b.$1.|/Bq;
      consider y be Real_Sequence such that
A25:  for n be Nat holds y.n=G(n) from SEQ_1:sch 1;
A26:  B <> 0 by A24;
      then
A27:  Bq > 0 by A8,POWER:34;
A28:  for n be Nat holds 0 <=y.n
      proof
        let n be Nat;
        0 <= |.b.n.| by COMPLEX1:46;
        then 0 <= |.b.n.|/Bq by A27;
        hence thesis by A25;
      end;
      deffunc F(Nat) =|.a.$1.|/Ap;
      consider x be Real_Sequence such that
A29:  for n be Nat holds x.n=F(n) from SEQ_1:sch 1;
A30:  for n be Nat holds ((1/(Ap*Bq)) (#) ab).n = x.n * y.n
      proof
        let n be Nat;
        x.n= |.a.n.|/Ap & y.n= |.b.n.|/Bq by A29,A25;
        hence x.n*y.n= (|.a.n.|*|.b.n.|)/(Ap*Bq) by XCMPLX_1:76
          .=|.a.n*b.n.|/(Ap*Bq) by COMPLEX1:65
          .=ab.n/(Ap*Bq) by A3
          .=(1/(Ap*Bq))*ab.n by XCMPLX_1:99
          .=((1/(Ap*Bq)) (#) ab).n by SEQ_1:9;
      end;
A31:  Partial_Sums( (1/(Ap*Bq)) (#) ab).n = ((1/(Ap*Bq)) (#) Partial_Sums
      (ab)).n by SERIES_1:9
        .= (1/(Ap*Bq)) * Partial_Sums(ab).n by SEQ_1:9;
A32:  A <> 0 by A24;
      then
A33:  Ap > 0 by A11,POWER:34;
      then
A34:  Ap*Bq > 0 by A27,XREAL_1:129;
A35:  for n be Nat holds (((1/p)(#)((1/A)(#)ap)) + ((1/q)(#)((
      1/B)(#)bq))).n = (x.n) to_power p / p + (y.n) to_power q / q
      proof
        let n be Nat;
A36:    (|.a.n.|/Ap) to_power p =|.a.n.| to_power p/Ap to_power p
        proof
          now
            per cases;
            case
A37:          |.a.n.| =0;
              hence (|.a.n.|/Ap) to_power p =0 /Ap to_power p by A1,
POWER:def 2
                .=|.a.n.| to_power p/Ap to_power p by A1,A37,POWER:def 2;
            end;
            case
              |.a.n.| <> 0;
              then |.a.n.| > 0 by COMPLEX1:46;
              hence thesis by A33,POWER:31;
            end;
          end;
          hence thesis;
        end;
A38:    (|.b.n.|/Bq) to_power q =|.b.n.| to_power q/Bq to_power q
        proof
          now
            per cases;
            case
A39:          |.b.n.| =0;
              hence (|.b.n.|/Bq) to_power q =0 /Bq to_power q by A5,
POWER:def 2
                .=|.b.n.| to_power q/Bq to_power q by A5,A39,POWER:def 2;
            end;
            case
              |.b.n.| <> 0;
              then |.b.n.| > 0 by COMPLEX1:46;
              hence thesis by A27,POWER:31;
            end;
          end;
          hence thesis;
        end;
        y.n= |.b.n.|/Bq by A25;
        then
A40:    (y.n) to_power q / q =( bq.n / Bq to_power q) /q by A3,A38
          .=( bq.n / (B to_power ((1/q)*q))) /q by A8,A26,POWER:33
          .= ( bq.n / (B to_power 1 )) /q by A5,XCMPLX_1:87
          .= ( bq.n / B ) /q by POWER:25
          .= (1/q)*(bq.n / B) by XCMPLX_1:99
          .= (1/q)*((1/B)*bq.n) by XCMPLX_1:99
          .= (1/q)*(((1/B)(#)bq).n) by SEQ_1:9
          .=((1/q)(#)((1/B)(#)bq)).n by SEQ_1:9;
        x.n= |.a.n.|/Ap by A29;
        then (x.n) to_power p / p =( ap.n / Ap to_power p) /p by A3,A36
          .=( ap.n / (A to_power ((1/p)*p))) /p by A11,A32,POWER:33
          .= ( ap.n / (A to_power 1 )) /p by A1,XCMPLX_1:87
          .= ( ap.n / A ) /p by POWER:25
          .= (1/p)*(ap.n / A) by XCMPLX_1:99
          .= (1/p)*((1/A)*ap.n) by XCMPLX_1:99
          .= (1/p)*(((1/A)(#)ap).n) by SEQ_1:9
          .=((1/p)(#)((1/A)(#)ap)).n by SEQ_1:9;
        hence thesis by A40,SEQ_1:7;
      end;
A41:  for n be Nat holds 0 <=x.n
      proof
        let n be Nat;
        0 <= |.a.n.| by COMPLEX1:46;
        then 0 <= |.a.n.|/Ap by A33;
        hence thesis by A29;
      end;
A42:  for n be Nat holds x.n * y.n <= (x.n) to_power p / p + (
y.n) to_power q / q & (x.n * y.n = (x.n) to_power p / p + (y.n) to_power q / q
      iff (x.n) to_power p = (y.n) to_power q)
      proof
        let n be Nat;
        0 <= x.n & 0 <= y.n by A41,A28;
        hence thesis by A1,A2,Th5;
      end;
      for n be Nat holds ((1/(Ap*Bq)) (#) ab).n <= (((1/p)(#)(
      (1/A)(#)ap)) + ((1/q)(#)((1/B)(#)bq))).n
      proof
        let n be Nat;
        x.n * y.n <= (x.n) to_power p / p + (y.n) to_power q / q & (((1/p
)(#)((1/A) (#)ap)) + ((1/q)(#)((1/B)(#)bq))).n = (x.n) to_power p / p + (y.n)
        to_power q / q by A42,A35;
        hence thesis by A30;
      end;
      then
A43:  Partial_Sums( (1/(Ap*Bq)) (#) ab).n <=Partial_Sums(((1/p)(#)((1/A)
      (#)ap)) + ((1/q)(#)((1/B)(#)bq))).n by SERIES_1:14;
      Partial_Sums(((1/p)(#)((1/A)(#)ap)) + ((1/q)(#)((1/B)(#)bq))).n = (
Partial_Sums(((1/p)(#)((1/A)(#)ap))) + Partial_Sums(((1/q)(#)((1/B)(#)bq)))).n
      by SERIES_1:5
        .=Partial_Sums((1/p)(#)((1/A)(#)ap)).n + Partial_Sums((1/q)(#)((1/B)
      (#)bq)).n by SEQ_1:7
        .=((1/p)(#)Partial_Sums((1/A)(#)ap)).n + Partial_Sums((1/q)(#)((1/B)
      (#)bq)).n by SERIES_1:9
        .=(1/p)*(Partial_Sums((1/A)(#)ap).n) + Partial_Sums((1/q)(#)((1/B)
      (#)bq)).n by SEQ_1:9
        .=(1/p)*(((1/A)(#)Partial_Sums(ap)).n) + Partial_Sums((1/q)(#)((1/B)
      (#)bq)).n by SERIES_1:9
        .=(1/p)*((1/A)*Partial_Sums(ap).n) + Partial_Sums((1/q)(#)((1/B)(#)
      bq)).n by SEQ_1:9
        .=(1/p)*((1/A)*Partial_Sums(ap).n) + ((1/q)(#)Partial_Sums((1/B)(#)
      bq)).n by SERIES_1:9
        .=(1/p)*((1/A)*Partial_Sums(ap).n) + (1/q)*(Partial_Sums((1/B)(#)bq)
      .n) by SEQ_1:9
        .=(1/p)*((1/A)*Partial_Sums(ap).n) + (1/q)*(((1/B)(#)Partial_Sums(bq
      )).n) by SERIES_1:9
        .=(1/p)*((1/A)*Partial_Sums(ap).n) +(1/q)*((1/B)*Partial_Sums(bq).n)
      by SEQ_1:9
        .=(1/p)*1 +(1/q)*((1/B)*B) by A32,XCMPLX_1:87
        .=(1/p)*1 +(1/q)*(1) by A26,XCMPLX_1:87
        .=1 by A2;
      then Partial_Sums(ab).n/(Ap*Bq) <= 1 by A43,A31,XCMPLX_1:99;
      hence thesis by A34,XREAL_1:187;
    end;
  end;
  hence thesis;
end;
