reserve n,m for Element of NAT;
reserve r,s for Real;
reserve z for Complex;
reserve CNS,CNS1,CNS2 for ComplexNormSpace;
reserve RNS for RealNormSpace;
reserve X,X1 for set;

theorem
  for f be PartFunc of the carrier of CNS, REAL holds ( f
is_continuous_on X iff X c= dom f & for x0 be Point of CNS, r st x0 in X & 0 <
r ex s st 0 < s & for x1 be Point of CNS st x1 in X & ||. x1- x0 .|| < s holds
  |. f/.x1 - f/.x0 .| < r )
proof
  let f be PartFunc of the carrier of CNS, REAL;
  thus f is_continuous_on X implies X c= dom f & for x0 be Point of CNS, r st
x0 in X & 0 < r ex s st 0 < s & for x1 be Point of CNS st x1 in X & ||. x1- x0
  .|| < s holds |. f/.x1 - f/.x0 .| < r
  proof
    assume
A1: f is_continuous_on X;
    hence X c= dom f;
A2: X c= dom f by A1;
    let x0 be Point of CNS, r;
    assume that
A3: x0 in X and
A4: 0<r;
    f|X is_continuous_in x0 by A1,A3;
    then consider s such that
A5: 0<s and
A6: for x1 be Point of CNS st x1 in dom(f|X) & ||. x1- x0 .|| <s holds
    |. (f|X)/.x1-(f|X)/.x0 .|<r by A4,Th11;
    take s;
    thus 0<s by A5;
    let x1 be Point of CNS;
    assume that
A7: x1 in X and
A8: ||. x1- x0 .|| <s;
A9: dom (f|X) = dom f /\ X by PARTFUN2:15
      .= X by A2,XBOOLE_1:28;
    then |. f/.x1 - f/.x0 .| = |. (f|X)/.x1 - f/.x0 .| by A7,PARTFUN2:15
      .= |. (f|X)/.x1 - (f|X)/.x0 .| by A3,A9,PARTFUN2:15;
    hence thesis by A6,A9,A7,A8;
  end;
  assume that
A10: X c= dom f and
A11: for x0 be Point of CNS,r st x0 in X & 0<r ex s st 0<s & for x1 be
  Point of CNS st x1 in X & ||. x1- x0 .|| < s holds |. f/.x1 - f/.x0 .| < r;
A12: dom (f|X) = dom f /\ X by PARTFUN2:15
    .= X by A10,XBOOLE_1:28;
  now
    let x0 be Point of CNS such that
A13: x0 in X;
    for r st 0<r ex s st 0<s & for x1 be Point of CNS st x1 in dom(f|X) &
    ||. x1- x0 .|| <s holds |. (f|X)/.x1-(f|X)/.x0 .|<r
    proof
      let r;
      assume 0<r;
      then consider s such that
A14:  0<s and
A15:  for x1 be Point of CNS st x1 in X & ||. x1- x0 .|| < s holds
      |. f /.x1 - f/.x0 .| < r by A11,A13;
      take s;
      thus 0<s by A14;
      let x1 be Point of CNS such that
A16:  x1 in dom(f|X) and
A17:  ||. x1- x0 .|| <s;
      |. (f|X)/.x1-(f|X)/.x0 .| = |. (f|X)/.x1 - f/.x0 .| by A12,A13,
PARTFUN2:15
        .= |. f/.x1 - f/.x0 .| by A16,PARTFUN2:15;
      hence thesis by A12,A15,A16,A17;
    end;
    hence f|X is_continuous_in x0 by A12,A13,Th11;
  end;
  hence thesis by A10;
end;
