reserve X for set,
        n,m,k for Nat,
        K for Field,
        f for n-element real-valued FinSequence,
        M for Matrix of n,m,F_Real;

theorem Th11:
  for x be Element of REAL n,
      xMAX be Real
   st xMAX in rng (abs x)
    & for i be Nat st i in dom x
      holds abs(x).i <= xMAX
  holds
    Sum(abs x) <= n * xMAX
  & xMAX <= |.x.|
  & |.x.| <= Sum(abs x)
  proof
    let x be Element of REAL n,
        xMAX be Real;
    assume
    A1: xMAX in rng (abs x)
      & for i be Nat st i in dom x
        holds abs(x).i <= xMAX;

    len x = n by CARD_1:def 7;
    then
    A2: dom x = Seg n by FINSEQ_1:def 3;
    A3: dom(abs x) = dom x by VALUED_1:def 11;
    set F = n |-> xMAX;

    for j be Nat st j in Seg n
    holds (abs x) . j <= F . j
    proof
      let j be Nat;
      assume
      A4: j in Seg n;
      then (abs x) . j <= xMAX by A1,A2;
      hence thesis by A4,FINSEQ_2:57;
    end;
    then
    A5: Sum(abs x) <= Sum(F) by RVSUM_1:82;
    consider i be object such that
    A6: i in dom(abs x) & xMAX = (abs x).i by A1,FUNCT_1:def 3;
    reconsider i as Element of NAT by A6;

    A7: (abs x).i
     = absreal.(x.i) by A3,A6,FUNCT_1:13
    .= |.x.i.| by EUCLID:def 2;

    reconsider y = x as Point of TOP-REAL n by EUCLID:22;
    reconsider y as FinSequence of REAL;

    defpred P[Nat] means
    for x be Element of REAL $1
    holds |.x.|^2 <= (Sum(abs x))^2;

    A8: P[0] by RVSUM_1:72;
    A9: for n be Nat st P[n] holds P[n+1]
    proof
      let n be Nat;
      assume
      A10: P[n];
      let x be Element of REAL(n+1);

      set y = x | n;

      A11: len x = n+1 by CARD_1:def 7;
      A12: y is Element of (len y) -tuples_on REAL by FINSEQ_2:92;
      reconsider y = x|n as Element of REAL n
        by A11,A12,NAT_1:11,FINSEQ_1:59;

      n+1 in Seg(n+1) by FINSEQ_1:4;
      then n+1 in dom x by A11,FINSEQ_1:def 3;
      then x.(n+1) in rng x by FUNCT_1:3;
      then reconsider w = x.(n+1) as Element of REAL;

      A13: x = y ^ <*w*> by A11,FINSEQ_3:55;
      A14: 0 <= Sum(sqr y) by RVSUM_1:86;
      A15: 0 <= Sum(sqr x) by RVSUM_1:86;

      sqr x = (sqr y) ^ <* sqrreal.w *> by A13,FINSEQOP:8;
      then
      A16: Sum(sqr x)
       = Sum(sqr y) + sqrreal.w by RVSUM_1:74
      .= Sum(sqr y) + w^2 by RVSUM_1:def 2
      .= |.y.| ^2 + w^2 by A14,SQUARE_1:def 2;

      A17: |.x.| ^2 = Sum(sqr x) by A15,SQUARE_1:def 2;

      abs x
       = (abs y) ^ abs(<*w*>) by A13,FINSEQOP:9
      .= (abs y) ^ <*|.w.|*> by JORDAN2B:19;
      then
      (Sum(abs x))^2
       = (Sum(abs y) + |.w.|)^2 by RVSUM_1:74
      .= (Sum(abs y))^2 + 2 * Sum(abs y) * |.w.| + |.w.| ^2
      .= (Sum(abs y))^2 + 2 * Sum(abs y) * |.w.| + w^2 by COMPLEX1:75;

      then
      A18: (Sum(abs x)) ^2 - |.x.| ^2
      = (Sum(abs y)) ^2- |.y.| ^2 + 2 * Sum(abs y) * |.w.| by A16,A17;

      A19: 0 <= (Sum(abs y))^2 - |.y.| ^2 by A10,XREAL_1:48;

      0 <= |.w.| & 0 <= Sum(abs y) by Th9;
      hence |.x.|^2 <= (Sum(abs x))^2 by A18,A19,XREAL_1:49;
    end;

    for n be Nat holds P[n] from NAT_1:sch 2(A8,A9);
    then
    A20: |.x.|^2 <= (Sum(abs x))^2;

    n is Element of NAT by ORDINAL1:def 12;
    then |. y /. i.| <= |.x.| by A2,A3,A6,PDIFF_8:1;
    hence thesis by A3,A5,A6,A7,A20,Th9,
                    PARTFUN1:def 6,RVSUM_1:80,SQUARE_1:16;
  end;
