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 Th40:
  for f be PartFunc of REAL,REAL-NS n,
      X be set st
      for i be Nat st 1 <= i & i <= n
       holds (proj(i,n)*f) | X is constant
 holds
   f| X is constant
proof
  let f be PartFunc of REAL,REAL-NS n, X be set;
  assume A1: for i be Nat st 1 <= i & i <= n
      holds (proj(i,n)*f) | X is constant;
A2: the carrier of (REAL-NS n) = REAL n by REAL_NS1:def 4;
  now let x,y be object;
    assume A3: x in dom (f| X) & y in dom (f| X); then
  A4: x in dom f & x in X & y in dom f & y in X by RELAT_1:57;
    f.x in rng f by A4,FUNCT_1:3; then
    reconsider fx=f.x as Element of REAL n by REAL_NS1:def 4;
    f.y in rng f by A4,FUNCT_1:3; then
    reconsider fy=f.y as Element of REAL n by REAL_NS1:def 4;
  A5: len fy =n by CARD_1:def 7;
  A6: len fx =n by CARD_1:def 7;
    now let i be Nat;
      assume
    A7: 1 <= i & i <= len fx;
      dom proj(i,n) = the carrier of REAL-NS n by A2,FUNCT_2:def 1; then
      rng f c= dom proj(i,n); then
    A8: dom f = dom (proj(i,n)*f) by RELAT_1:27;
    A9: ((proj(i,n)*f) | X).x
        =((proj(i,n)*f)).x by A3,FUNCT_1:49
       .= proj(i,n).(f.x) by A4,FUNCT_1:13
       .= fx.i by PDIFF_1:def 1;
    A10: ((proj(i,n)*f) | X).y
        =((proj(i,n)*f)).y by A3,FUNCT_1:49
       .= proj(i,n).(f.y) by A4,FUNCT_1:13
       .= fy.i by PDIFF_1:def 1;
    A11: (proj(i,n)*f) | X is constant by A1,A7,A6;
      x in dom ((proj(i,n)*f) | X) & y in dom ((proj(i,n)*f) | X)
        by A8,A4,RELAT_1:57;
      hence fx.i = fy.i by A9,A10,A11,FUNCT_1:def 10;
    end; then
  A12: fx=fy by A5,CARD_1:def 7;
    thus (f| X).x = f.x by A3,FUNCT_1:49
                 .=(f| X).y by A3,A12,FUNCT_1:49;
  end;
  hence thesis by FUNCT_1:def 10;
end;
