reserve n for Nat,
        p,p1,p2 for Point of TOP-REAL n,
        x for Real;
reserve n,m for non zero Nat;
reserve i,j for Nat;
reserve f for PartFunc of REAL-NS m,REAL-NS n;
reserve g for PartFunc of REAL m,REAL n;
reserve h for PartFunc of REAL m,REAL;
reserve x for Point of REAL-NS m;
reserve y for Element of REAL m;
reserve X for set;

theorem
 for m,n be non zero Nat, f be PartFunc of REAL m,REAL n,
    x0 be Element of REAL m holds
 f is_continuous_in x0
      iff
 (x0 in dom f &
  for r be Real st 0<r
   ex s be Real st
    0<s &
    for x1 be Element of REAL m st x1 in dom f & |. x1- x0 .| < s
      holds |. f/.x1 - f/.x0 .| < r)
proof
   let m,n be non zero Nat,
       f be PartFunc of REAL m,REAL n,
       x0 be Element of REAL m;
    the carrier of REAL-NS m = REAL m &
   the carrier of REAL-NS n = REAL n by REAL_NS1:def 4;
   then reconsider g=f as PartFunc of REAL-NS m,REAL-NS n;
   reconsider y0=x0 as Point of REAL-NS m by REAL_NS1:def 4;
   hereby assume f is_continuous_in x0;
then A1: g is_continuous_in y0;
then A2: y0 in dom g & for r be Real st 0<r
    ex s be Real st
        0<s & for y1 be Point of REAL-NS m st y1 in dom g & ||. y1- y0 .|| < s
         holds ||. g/.y1-g/.y0 .||<r by NFCONT_1:7;
    thus x0 in dom f by A1,NFCONT_1:7;
    thus for r be Real st 0<r ex s be Real
      st 0 <s & for x1 be Element of REAL m
      st x1 in dom f & |. x1- x0 .| <s holds |. f/.x1-f/.x0 .|<r
    proof
     let r be Real;
     assume 0 < r;
     then consider s be Real such that
A3:   0<s & for y1 be Point of REAL-NS m st y1 in dom g & ||. y1- y0 .|| < s
      holds ||. g/.y1-g/.y0 .||<r by A1,NFCONT_1:7;
     take s;
     thus 0 < s by A3;
     hereby let x1 be Element of REAL m;
      assume A4: x1 in dom f & |. x1- x0 .| < s;
      reconsider y1=x1 as Point of REAL-NS m by REAL_NS1:def 4;
       y1 in dom g & ||. y1- y0 .|| < s by A4,REAL_NS1:1,5;
then A5:   ||. g/.y1-g/.y0 .||<r by A3;
       g/.y1 = f/.x1 & g/.y0 = f/.x0 by A2,Th30,A4;
      hence |. f/.x1-f/.x0 .|<r by A5,REAL_NS1:1,5;
     end;
    end;
   end;
   assume
A6: x0 in dom f & for r be Real st 0<r ex s be Real
     st 0<s & for x1 be Element of REAL m
     st x1 in dom f & |. x1- x0 .| <s holds |. f/.x1-f/.x0 .|<r;
   reconsider y0=x0 as Point of REAL-NS m by REAL_NS1:def 4;
    for r be Real st 0<r
     ex s be Real st 0 <s & for y1 be Point of REAL-NS m
      st y1 in dom g & ||. y1- y0 .|| <s
        holds ||. g/.y1-g/.y0 .||<r
   proof
    let r be Real;
    assume 0 < r;
    then consider s be Real such that
A7:  0<s & for x1 be Element of REAL m st x1 in dom f & |. x1- x0 .| < s
      holds |. f/.x1-f/.x0 .|<r by A6;
    take s;
    thus 0 < s by A7;
    hereby let y1 be Point of REAL-NS m;
     assume A8: y1 in dom g & ||. y1- y0 .|| < s;
     reconsider x1=y1 as Element of REAL m by REAL_NS1:def 4;
      x1 in dom f & |. x1- x0 .| < s by A8,REAL_NS1:1,5;
then A9:  |. f/.x1-f/.x0 .|<r by A7;
      g/.y1 = f/.x1 & g/.y0 = f/.x0 by A8,A6,Th30;
     hence ||. g/.y1-g/.y0 .||<r by A9,REAL_NS1:1,5;
    end;
   end;
   then g is_continuous_in y0 by A6,NFCONT_1:7;
   hence f is_continuous_in x0;
end;
