reserve m, n for non zero Element of NAT;
reserve i, j, k for Element of NAT;
reserve Z for Subset of REAL 2;
reserve c for Real;
reserve I for non empty FinSequence of NAT;
reserve d1, d2 for Element of REAL;

theorem LM20:
  for X, T be Subset of REAL, Z be Subset of REAL 2,
  f be PartFunc of REAL,REAL, g be PartFunc of REAL,REAL,
  u be PartFunc of REAL 2,REAL st X c= dom f & T c= dom g
  & X is open & T is open & Z is open
  & Z = {<*x, t*> where x, t is Real : x in X & t in T }
  & dom u = {<*x, t*> where x, t is Real : x in dom f & t in dom g }
  & f is_differentiable_on X
  & g is_differentiable_on T
  & (for x, t be Real st x in dom f & t in dom g holds u/.<*x, t*> = f/.x*g/.t)
  holds
  u is_partial_differentiable_on Z,<*1*>
  & (for x, t be Real st x in X & t in T
  holds u `partial| (Z,<*1*>)/.<*x, t*> = diff(f,x) *g/.t)
  & u is_partial_differentiable_on Z,<*2*>
  & (for x, t be Real st x in X & t in T
  holds u `partial| (Z,<*2*>)/.<*x, t*> = f/.x*diff(g,t))
  proof
    let X, T be Subset of REAL, Z be Subset of REAL 2,
    f be PartFunc of REAL,REAL, g be PartFunc of REAL,REAL,
    u be PartFunc of REAL 2,REAL;
    assume that
    A1: X c= dom f & T c= dom g and
    A2: X is open & T is open & Z is open and
    A3: Z = {<*x, t*> where x, t is Real: x in X & t in T} and
    A4: dom u = {<*x, t*> where x, t is Real : x in dom f & t in dom g} and
    A5: f is_differentiable_on X and
    A6: g is_differentiable_on T and
    A7: for x, t be Real st x in dom f & t in dom g
    holds u/.<*x, t*> = f/.x*g/.t;
A8: Z c= dom u
    proof
      let z be object;
      assume z in Z;
      then consider x, t be Real such that
      A80: z=<*x, t*> & x in X & t in T by A3;
      thus z in dom u by A80, A1, A4;
    end;
    for z being Element of REAL 2 st z in Z
    holds u is_partial_differentiable_in z,1
    proof
      let z be Element of REAL 2;
      assume z in Z;
      then consider x, t be Real such that
      P01: z=<*x, t*> & x in X & t in T by A3;
      P51: u*(reproj(1,z)) = (g/.t)(#)f by A1, P01, LM11, A4, A7;
      P52: ((proj(1,2)).z) = x by P01, LM03;
      f is_differentiable_in x by P01, A2, A5, FDIFF_1:9;
      hence u is_partial_differentiable_in z,1 by P51, P52, FDIFF_1:15;
    end; then
    P1: u is_partial_differentiable_on Z,1 by A2, A8, PDIFF_9:60;
    hence u is_partial_differentiable_on Z,<*1*>;
    P3: u `partial| (Z,<*1*>) = u `partial| (Z,1) by A2, PDIFF_9:82, P1;
    P5: for x, t be Real, z be Element of REAL 2
    st x in X & t in T & z= <*x, t*>
    holds partdiff(u,z,1) = diff(f,x) *g/.t
    proof
      let x, t be Real, z be Element of REAL 2;
      assume
      P50: x in X & t in T & z= <*x, t*>; then
      P51: u*(reproj(1,z)) = (g/.t)(#)f by A1,LM11, A4, A7;
      P52: ((proj(1,2)).z) = x by P50, LM03;
      f is_differentiable_in x by P50, A2, A5, FDIFF_1:9;
      hence thesis by P51, P52, FDIFF_1:15;
    end;
    thus for x, t be Real st x in X & t in T
    holds u `partial| (Z,<*1*>)/.<*x, t*> = diff(f,x) *g/.t
    proof
      let x, t be Real;
      assume
      P6: x in X & t in T;
      reconsider z= <*x, t*> as Element of REAL 2 by LM02;
      <*x, t*> in Z by A3,P6;
      hence u `partial| (Z,<*1*>)/.<*x, t*> = partdiff(u, z, 1)
      by P3, PDIFF_9:def 6, P1
      .= diff(f,x)*g/.t by P5, P6;
    end;
    for z being Element of REAL 2 st z in Z
    holds u is_partial_differentiable_in z,2
    proof
      let z be Element of REAL 2;
      assume z in Z;
      then consider x, t be Real such that
      P01: z=<*x, t*> & x in X & t in T by A3;
      P51: u*(reproj(2,z)) = (f/.x)(#)g by A1, LM11, P01, A4, A7;
      P52: ((proj(2,2)).z) = t by P01, LM03;
      g is_differentiable_in t by P01, A2, A6, FDIFF_1:9;
      hence u is_partial_differentiable_in z,2 by FDIFF_1:15, P51, P52;
    end; then
    P1: u is_partial_differentiable_on Z,2 by A2, A8, PDIFF_9:60;
    hence u is_partial_differentiable_on Z,<*2*>;
    P3: u `partial|(Z, <*2*>) = u `partial|(Z, 2) by A2, PDIFF_9:82, P1;
    P5: for x, t be Real, z be Element of REAL 2
    st x in X & t in T & z= <*x, t*>
    holds partdiff(u,z,2) = f/.x*diff(g,t)
    proof
      let x, t be Real, z be Element of REAL 2;
      assume
      P50: x in X & t in T & z= <*x, t*>; then
      P51: u*(reproj(2,z)) = (f/.x)(#)g by A1, LM11, A4, A7;
      P52: ((proj(2,2)).z) = t by P50,LM03;
      g is_differentiable_in t by P50, A2, A6, FDIFF_1:9;
      hence thesis by FDIFF_1:15, P51, P52;
    end;
    let x, t be Real;
    assume
    P6: x in X & t in T;
    reconsider z = <*x, t*> as Element of REAL 2 by LM02;
    <*x, t*> in Z by A3,P6;
    hence u `partial| (Z,<*2*>)/.<*x, t*> = partdiff(u, z, 2)
    by P3, PDIFF_9:def 6, P1
    .= f/.x*diff(g,t) by P5, P6;
  end;
