reserve D for set;
reserve x,x0,x1,x2,y,y0,y1,y2,z,z0,z1,z2,r,s,t for Real;
reserve p,a,u,u0 for Element of REAL 3;
reserve n,m,k for Element of NAT;
reserve f,f1,f2,f3,g for PartFunc of REAL 3,REAL;
reserve R,R1,R2 for RestFunc;
reserve L,L1,L2 for LinearFunc;

theorem
  f1 is_partial_differentiable_in u0,1 &
  f2 is_partial_differentiable_in u0,1 implies
  f1(#)f2 is_partial_differentiable_in u0,1
proof
     assume that
A1:  f1 is_partial_differentiable_in u0,1 and
A2:  f2 is_partial_differentiable_in u0,1;
     consider x0,y0,z0 being Real such that
A3:  u0 = <*x0,y0,z0*> & ex N being Neighbourhood of x0
     st N c= dom SVF1(1,f1,u0) & ex L,R st for x st x in N holds
     SVF1(1,f1,u0).x - SVF1(1,f1,u0).x0 = L.(x-x0) + R.(x-x0)
     by A1,Th13;
     consider N1 be Neighbourhood of x0 such that
A4:  N1 c= dom SVF1(1,f1,u0) & ex L,R st for x st x in N1 holds
     SVF1(1,f1,u0).x - SVF1(1,f1,u0).x0 = L.(x-x0) + R.(x-x0) by A3;
     consider L1,R1 such that
A5:  for x st x in N1 holds
     SVF1(1,f1,u0).x - SVF1(1,f1,u0).x0 = L1.(x-x0) + R1.(x-x0) by A4;
     consider x1,y1,z1 being Real such that
A6:  u0 = <*x1,y1,z1*> & ex N being Neighbourhood of x1
     st N c= dom SVF1(1,f2,u0) & ex L,R st for x st x in N holds
     SVF1(1,f2,u0).x - SVF1(1,f2,u0).x1 = L.(x-x1) + R.(x-x1)
     by A2,Th13;
  x0 = x1 & y0 = y1 & z0 = z1 by A3,A6,FINSEQ_1:78;
     then consider N2 be Neighbourhood of x0 such that
A7:  N2 c= dom SVF1(1,f2,u0) & ex L,R st for x st x in N2 holds
     SVF1(1,f2,u0).x - SVF1(1,f2,u0).x0 = L.(x-x0) + R.(x-x0) by A6;
     consider L2,R2 such that
A8:  for x st x in N2 holds
     SVF1(1,f2,u0).x - SVF1(1,f2,u0).x0 = L2.(x-x0) + R2.(x-x0) by A7;
     consider N be Neighbourhood of x0 such that
A9: N c= N1 & N c= N2 by RCOMP_1:17;
     reconsider L11=(SVF1(1,f2,u0).x0)(#)L1, L12=(SVF1(1,f1,u0).x0)(#)L2
       as LinearFunc by FDIFF_1:3;
A10: L11 is total & L12 is total & L1 is total & L2 is total by FDIFF_1:def 3;
     reconsider L=L11+L12 as LinearFunc by FDIFF_1:2;
     reconsider R11=(SVF1(1,f2,u0).x0)(#)R1 as RestFunc by FDIFF_1:5;
     reconsider R12=(SVF1(1,f1,u0).x0)(#)R2 as RestFunc by FDIFF_1:5;
     reconsider R13=R11+R12 as RestFunc by FDIFF_1:4;
     reconsider R14=L1(#)L2 as RestFunc by FDIFF_1:6;
     reconsider R15=R13+R14 as RestFunc by FDIFF_1:4;
     reconsider R16=R1(#)L2, R18=R2(#)L1 as RestFunc by FDIFF_1:7;
     reconsider R17=R1(#)R2 as RestFunc by FDIFF_1:4;
     reconsider R19=R16+R17 as RestFunc by FDIFF_1:4;
     reconsider R20=R19+R18 as RestFunc by FDIFF_1:4;
     reconsider R=R15+R20 as RestFunc by FDIFF_1:4;
A11: R1 is total & R2 is total & R11 is total & R12 is total &
     R13 is total & R14 is total & R15 is total & R16 is total &
     R17 is total & R18 is total & R19 is total & R20 is total
     by FDIFF_1:def 2;
A12: N c= dom SVF1(1,f1,u0) by A4,A9;
A13: N c= dom SVF1(1,f2,u0) by A7,A9;
 A14: for y st y in N holds y in dom SVF1(1,f1(#)f2,u0)
     proof
       let y;
       assume
  A15: y in N;
  then
A16: y in dom reproj(1,u0) & reproj(1,u0).y in dom f1 by A12,FUNCT_1:11;
       y in dom reproj(1,u0) & reproj(1,u0).y in dom f2 by A13,A15,FUNCT_1:11;
       then y in dom reproj(1,u0) & reproj(1,u0).y in dom f1 /\ dom f2
       by A16,XBOOLE_0:def 4;then
       y in dom reproj(1,u0) & reproj(1,u0).y in dom (f1(#)f2)
         by VALUED_1:def 4;
       hence thesis by FUNCT_1:11;
     end;
     then for y be object st y in N holds y in dom SVF1(1,f1(#)f2,u0);then
A17: N c= dom SVF1(1,f1(#)f2,u0);
 now
       let x;
   reconsider xx=x, xx0=x0 as Element of REAL by XREAL_0:def 1;
       assume
  A18: x in N;then
  A19: SVF1(1,f1,u0).x - SVF1(1,f1,u0).x0 + SVF1(1,f1,u0).x0
       = L1.(x-x0) + R1.(x-x0) + SVF1(1,f1,u0).x0 by A5,A9;
       x in dom ((f1(#)f2)*reproj(1,u0)) by A14,A18;then
  A20: x in dom reproj(1,u0) & reproj(1,u0).x in dom (f1(#)f2) by FUNCT_1:11;
       then reproj(1,u0).x in dom f1 /\ dom f2 by VALUED_1:def 4;
       then reproj(1,u0).x in dom f1 & reproj(1,u0).x in dom f2
       by XBOOLE_0:def 4;then
  A21: x in dom (f1*reproj(1,u0)) & x in dom (f2*reproj(1,u0))
       by A20,FUNCT_1:11;
  A22: x0 in N by RCOMP_1:16;
       x0 in dom ((f1(#)f2)*reproj(1,u0)) by A14,RCOMP_1:16;then
  A23: x0 in dom reproj(1,u0) & reproj(1,u0).x0 in dom (f1(#)f2) by FUNCT_1:11;
       then reproj(1,u0).x0 in dom f1 /\ dom f2 by VALUED_1:def 4;
       then reproj(1,u0).x0 in dom f1 & reproj(1,u0).x0 in dom f2
       by XBOOLE_0:def 4;then
  A24: x0 in dom (f1*reproj(1,u0)) & x0 in dom (f2*reproj(1,u0))
       by A23,FUNCT_1:11;
       thus SVF1(1,f1(#)f2,u0).x - SVF1(1,f1(#)f2,u0).x0
       = (f1(#)f2).(reproj(1,u0).x) - SVF1(1,f1(#)f2,u0).x0
         by A17,A18,FUNCT_1:12
      .= (f1.(reproj(1,u0).x))*(f2.(reproj(1,u0).x)) - SVF1(1,f1(#)f2,u0).x0
         by VALUED_1:5
      .= (SVF1(1,f1,u0).x)*(f2.(reproj(1,u0).x)) - SVF1(1,f1(#)f2,u0).x0
         by A21,FUNCT_1:12
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x) - ((f1(#)f2)*reproj(1,u0)).x0
         by A21,FUNCT_1:12
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x) - (f1(#)f2).(reproj(1,u0).x0)
         by A17,A22,FUNCT_1:12
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x) -
         (f1.(reproj(1,u0).x0))*(f2.(reproj(1,u0).x0)) by VALUED_1:5
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x)
         - (SVF1(1,f1,u0).x0)*(f2.(reproj(1,u0).x0)) by A24,FUNCT_1:12
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x)+-(SVF1(1,f1,u0).x)*
         (SVF1(1,f2,u0).x0)+
         (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x0)-(SVF1(1,f1,u0).x0)*
         (SVF1(1,f2,u0).x0) by A24,FUNCT_1:12
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x-SVF1(1,f2,u0).x0)+
         (SVF1(1,f1,u0).x-SVF1(1,f1,u0).x0)*(SVF1(1,f2,u0).x0)
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x-SVF1(1,f2,u0).x0)+
         (L1.(x-x0)+R1.(x-x0))*(SVF1(1,f2,u0).x0) by A5,A9,A18
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x-SVF1(1,f2,u0).x0)+
         ((SVF1(1,f2,u0).x0)*L1.(x-x0)+(SVF1(1,f2,u0).x0)*R1.(x-x0))
      .= (SVF1(1,f1,u0).x)*(SVF1(1,f2,u0).x-SVF1(1,f2,u0).x0)+
         (L11.(xx-x0)+(SVF1(1,f2,u0).x0)*R1.(xx-xx0)) by A10,RFUNCT_1:57
      .= (L1.(x-x0)+R1.(xx-x0)+SVF1(1,f1,u0).x0)*
         (SVF1(1,f2,u0).xx-SVF1(1,f2,u0).x0)+
         (L11.(x-x0)+R11.(xx-x0)) by A11,A19,RFUNCT_1:57
      .= (L1.(x-x0)+R1.(x-x0)+SVF1(1,f1,u0).x0)*(L2.(x-x0)+R2.(x-x0))+
         (L11.(x-x0)+R11.(x-x0)) by A8,A9,A18
      .= (L1.(x-x0)+R1.(x-x0))*(L2.(x-x0)+R2.(x-x0))+
         ((SVF1(1,f1,u0).x0)*L2.(x-x0)+(SVF1(1,f1,u0).x0)*R2.(x-x0))+
         (L11.(x-x0)+R11.(x-x0))
      .= (L1.(xx-x0)+R1.(xx-x0))*(L2.(xx-x0)+R2.(xx-xx0))+
         (L12.(x-x0)+(SVF1(1,f1,u0).x0)*R2.(x-x0))+(L11.(x-x0)+R11.(x-x0))
         by A10,RFUNCT_1:57
      .= (L1.(x-x0)+R1.(xx-xx0))*(L2.(xx-x0)+R2.(x-x0))+
         (L12.(xx-x0)+R12.(x-x0))+(L11.(xx-x0)+R11.(x-x0)) by A11,RFUNCT_1:57
      .= (L1.(xx-x0)+R1.(x-x0))*(L2.(xx-x0)+R2.(x-x0))+
         (L12.(xx-x0)+(L11.(x-x0)+(R11.(xx-x0)+R12.(x-x0))))
      .= (L1.(xx-x0)+R1.(x-x0))*(L2.(xx-xx0)+R2.(xx-x0))+
         (L12.(xx-x0)+(L11.(xx-x0)+R13.(xx-x0))) by A11,RFUNCT_1:56
      .= (L1.(x-x0)+R1.(x-x0))*(L2.(x-x0)+R2.(x-x0))+
         (L11.(x-x0)+L12.(x-x0)+R13.(x-x0))
      .= (L1.(xx-x0)*L2.(xx-x0)+L1.(xx-x0)*R2.(xx-x0))+
         R1.(xx-xx0)*(L2.(xx-x0)+R2.(xx-x0))+(L.(xx-x0)+R13.(xx-x0))
         by A10,RFUNCT_1:56
      .= R14.(xx-x0)+R2.(xx-x0)*L1.(xx-x0)+R1.(xx-x0)*(L2.(xx-x0)+R2.(xx-x0))+
         (L.(xx-x0)+R13.(xx-xx0)) by A10,RFUNCT_1:56
      .= R14.(xx-x0)+R18.(xx-x0)+(R1.(xx-x0)*L2.(x-x0)+R1.(x-x0)*R2.(x-x0))+
         (L.(x-x0)+R13.(x-xx0)) by A10,A11,RFUNCT_1:56
      .= R14.(x-x0)+R18.(x-x0)+(R16.(x-x0)+R1.(x-x0)*R2.(x-x0))+
         (L.(x-x0)+R13.(xx-xx0)) by A10,A11,RFUNCT_1:56
      .= R14.(xx-x0)+R18.(x-x0)+(R16.(x-x0)+R17.(x-x0))+(L.(x-x0)+R13.(x-x0))
         by A11,RFUNCT_1:56
      .= R14.(xx-xx0)+R18.(x-x0)+R19.(x-x0)+(L.(x-x0)+R13.(x-x0))
         by A11,RFUNCT_1:56
      .= R14.(xx-x0)+(R19.(x-x0)+R18.(x-x0))+(L.(x-x0)+R13.(x-x0))
      .= L.(xx-xx0)+R13.(x-x0)+(R14.(x-x0)+R20.(x-x0)) by A11,RFUNCT_1:56
      .= L.(xx-x0)+(R13.(x-x0)+R14.(x-x0)+R20.(x-x0))
      .= L.(xx-xx0)+(R15.(x-x0)+R20.(x-x0)) by A11,RFUNCT_1:56
      .= L.(x-x0)+R.(x-x0) by A11,RFUNCT_1:56;
     end;
     hence thesis by A3,A17,Th13;
end;
