reserve n for non zero Element of NAT;
reserve a,b,r,t for Real;
reserve
  Z for open Subset of REAL,
 y0 for VECTOR of REAL-NS n,
  G for Function of REAL-NS n,REAL-NS n;

theorem Th41:
  for f be PartFunc of REAL,REAL-NS n
    st ].a,b.[ c= dom f
   & f is_differentiable_on ].a,b.[
   & for x be Real
       st x in ].a,b.[ holds diff(f,x) = 0.(REAL-NS n)
   holds f| (].a,b.[) is constant
proof
  let f be PartFunc of REAL,REAL-NS n;
  assume A1: ].a,b.[ c= dom f & f is_differentiable_on ].a,b.[
   & for x be Real st x in ].a,b.[ holds diff(f,x) = 0.(REAL-NS n);
  reconsider Z = ].a,b.[ as open Subset of REAL;
  now let i be Nat;
    assume A2: 1 <= i & i <= n;
  A3: now let x be Real;
      assume x in Z; then
      f is_differentiable_in x by A1,NDIFF_3:10;
      hence (proj(i,n)*f) is_differentiable_in x &
            proj(i,n).(diff(f,x)) = diff((proj(i,n)*f),x) by A2,Th39;
    end;
  A4: the carrier of REAL-NS n = REAL n by REAL_NS1:def 4;
    dom (proj(i,n)) = REAL n by FUNCT_2:def 1; then
    rng f c= dom (proj(i,n)) by A4; then
  A5: Z c= dom (proj(i,n)*f) by A1,RELAT_1:27;
    for x be Real st x in Z holds
     (proj(i,n)*f) is_differentiable_in x by A3; then
  A6: (proj(i,n)*f) is_differentiable_on ].a,b.[ by A5,FDIFF_1:9;
    for x be Real st x in ].a,b.[ holds diff((proj(i,n)*f),x) = 0
    proof
      let x be Real;
      assume A7: x in ].a,b.[; then
    A8: proj(i,n).(diff(f,x)) = diff((proj(i,n)*f),x) by A3;
      diff(f,x) = 0.(REAL-NS n) by A1,A7;
      hence diff((proj(i,n)*f),x) = 0 by Lm7,A8;
    end;
    hence (proj(i,n)*f) | ].a,b.[ is constant by A6,ROLLE:7;
  end;
  hence thesis by Th40;
end;
