reserve a,b,c for positive Real,
  m,x,y,z for Real,
  n for Nat,
  s,s1,s2,s3,s4,s5 for Real_Sequence;

theorem :: Minkowski Inequality
  (s4=s1(#)s1 & s5=s2(#)s2 & for n holds s1.n>=0 & s2.n>=0 & s3.n=(s1.n+
s2.n)^2) implies for n holds sqrt((Partial_Sums s3).n) <= sqrt((Partial_Sums s4
  ).n) + sqrt((Partial_Sums s5).n)
proof
  assume that
A1: s4=s1(#)s1 and
A2: s5=s2(#)s2 and
A3: for n holds s1.n>=0 & s2.n>=0 & s3.n=(s1.n+s2.n)^2;
A4: s1.0>=0 by A3;
  defpred X[Nat] means sqrt((Partial_Sums(s3)).$1)<=sqrt((
  Partial_Sums(s4)) .$1)+sqrt((Partial_Sums(s5)).$1);
A5: for n st X[n] holds X[n+1]
  proof
    let n;
    assume
A6: sqrt((Partial_Sums s3).n)<=sqrt((Partial_Sums s4).n)+ sqrt((
    Partial_Sums s5).n);
    set j=s2.(n+1);
    set h=s1.(n+1);
    set w=(Partial_Sums s5).n;
    set v=(Partial_Sums s4).n;
    set u=(Partial_Sums s3).n;
A7: w>=0 by A2,Th36;
A8: j^2>=0 by XREAL_1:63;
    then
A9: sqrt(w+j^2)>=0 by A7,SQUARE_1:def 2;
A10: v>=0 by A1,Th36;
    then
A11: sqrt(v*w)>=0 by A7,SQUARE_1:def 2;
A12: u>=0 by A3,Lm10;
    then sqrt(u)>=0 by SQUARE_1:def 2;
    then (sqrt u)^2<=(sqrt(v)+sqrt(w))^2 by A6,SQUARE_1:15;
    then u<=(sqrt(v))^2+2*sqrt(v)*sqrt(w)+(sqrt(w))^2 by A12,SQUARE_1:def 2;
    then u<=v+2*sqrt(v)*sqrt(w)+(sqrt(w))^2 by A10,SQUARE_1:def 2;
    then u<=v+2*sqrt(v)*sqrt(w)+w by A7,SQUARE_1:def 2;
    then u+2*h*j<=v+w+2*(sqrt(v)*sqrt(w))+2*h*j by XREAL_1:6;
    then
A13: u+2*h*j<=v+w+2*sqrt(v*w)+2*h*j by A10,A7,SQUARE_1:29;
A14: h>=0 by A3;
A15: j>=0 by A3;
A16: h^2>=0 by XREAL_1:63;
    then
A17: sqrt(v+h^2)>=0 by A10,SQUARE_1:def 2;
    h^2*w+j^2*v>=2*sqrt((h^2*w)*(j^2*v)) by A10,A7,A16,A8,SIN_COS2:1;
    then h^2*w+j^2*v>=2*sqrt((h^2*j^2)*(w*v));
    then h^2*w+j^2*v>=2*(sqrt(h^2*j^2)*sqrt(w*v)) by A10,A7,A16,A8,SQUARE_1:29;
    then h^2*w+j^2*v>=2*sqrt(h^2*j^2)*sqrt(w*v);
    then h^2*w+j^2*v>=2*(sqrt(h^2)*sqrt(j^2))*sqrt(w*v) by A16,A8,SQUARE_1:29;
    then h^2*w+j^2*v>=2*sqrt(h^2)*sqrt(j^2)*sqrt(w*v);
    then h^2*w+j^2*v>=2*h*sqrt(j^2)*sqrt(w*v) by A14,SQUARE_1:22;
    then h^2*w+j^2*v>=2*h*j*sqrt(w*v) by A15,SQUARE_1:22;
    then (h^2*w+j^2*v)+(v*w+h^2*j^2)>=2*h*j*sqrt(w*v)+(v*w+h^2*j^2) by
XREAL_1:6;
    then v*w+j^2*v+h^2*w+h^2*j^2>=v*w+2*(sqrt(w*v))*(h*j)+h^2*j^2;
    then
    ((sqrt(v*w))+h*j)^2>=0 & (v+h^2)*(w+j^2)>=(sqrt(v*w))^2+2*(sqrt(w*v))
    *(h*j)+ (h*j)^2 by A10,A7,SQUARE_1:def 2,XREAL_1:63;
    then sqrt(((sqrt(v*w))+h*j)^2)<=sqrt((v+h^2)*(w+j^2)) by SQUARE_1:26;
    then (sqrt(v*w))+h*j<=sqrt((v+h^2)*(w+j^2)) by A14,A15,A11,SQUARE_1:22;
    then 2*((sqrt(v*w))+h*j)<=2*(sqrt((v+h^2)*(w+j^2))) by XREAL_1:64;
    then
(v+w)+(2*(sqrt(v*w))+2*h*j)<=(v+w)+(2*(sqrt((v+h^2)*(w+j^2)))) by XREAL_1:6;
    then u+2*h*j<=v+w+2*(sqrt((v+h^2)*(w+j^2))) by A13,XXREAL_0:2;
    then
(u+2*h*j)+(h^2+j^2)<=(v+w+2*(sqrt((v+h^2)*(w+j^2))))+(h^2+j^2) by XREAL_1:6;
    then u+(h^2+2*h*j+j^2)<=(v+h^2)+2*sqrt((v+h^2)*(w+j^2))+(w+j^2);
    then
    u+(h+j)^2<=(sqrt(v+h^2))^2+2*sqrt((v+h^2)*(w+j^2))+(w+j^2) by A10,A16,
SQUARE_1:def 2;
    then
    u+(h+j)^2<=(sqrt(v+h^2))^2+2*sqrt((v+h^2)*(w+j^2))+(sqrt(w+j^2))^2 by A7,A8
,SQUARE_1:def 2;
    then
    (h+j)^2>=0 & u+(h+j)^2<=(sqrt(v+h^2))^2+2*(sqrt(v+h^2)*sqrt(w+j^2))+(
    sqrt(w+ j^2)) ^2 by A10,A7,A16,A8,SQUARE_1:29,XREAL_1:63;
    then
A18: sqrt(u+(h+j)^2)<=sqrt((sqrt(v+h^2)+sqrt(w+j^2))^2) by A12,SQUARE_1:26;
A19: sqrt((Partial_Sums s3).(n+1)) =sqrt((Partial_Sums s3).n+s3.(n+1)) by
SERIES_1:def 1
      .=sqrt(u+(h+j)^2) by A3;
    sqrt((Partial_Sums s4).(n+1))+sqrt((Partial_Sums(s5)).(n+1)) =sqrt((
Partial_Sums s4).n+s4.(n+1))+sqrt((Partial_Sums(s5)).(n+1)) by SERIES_1:def 1
      .=sqrt(v+s4.(n+1))+sqrt(w+s5.(n+1)) by SERIES_1:def 1
      .=sqrt(v+s1.(n+1)*s1.(n+1))+sqrt(w+s5.(n+1)) by A1,SEQ_1:8
      .=sqrt(v+h^2)+sqrt(w+j^2) by A2,SEQ_1:8;
    hence thesis by A19,A17,A9,A18,SQUARE_1:22;
  end;
A20: s2.0>=0 by A3;
  sqrt((Partial_Sums(s4)).0)+sqrt((Partial_Sums(s5)).0) =sqrt(s4.0)+sqrt((
  Partial_Sums(s5)).0) by SERIES_1:def 1
    .=sqrt(s4.0)+sqrt(s5.0) by SERIES_1:def 1
    .=sqrt(s1.0*s1.0)+sqrt(s5.0) by A1,SEQ_1:8
    .=sqrt((s1.0)^2)+sqrt(s2.0*s2.0) by A2,SEQ_1:8
    .=s1.0+sqrt((s2.0)^2) by A4,SQUARE_1:22
    .=s1.0+s2.0 by A20,SQUARE_1:22
    .=sqrt((s1.0+s2.0)^2) by A4,A20,SQUARE_1:22
    .=sqrt(s3.0) by A3
    .=sqrt((Partial_Sums s3).0) by SERIES_1:def 1;
  then
A21: X[0];
  for n holds X[n] from NAT_1:sch 2(A21,A5);
  hence thesis;
end;
