let n be non zero Nat; :: thesis: for r being Real
for f being PartFunc of (CarProduct ((Seg n) --> RNS_Real)),RNS_Real st f is_continuous_on dom f holds
ex H being Subset of (CarProduct ((Seg n) --> RNS_Real)) st
( H /\ (dom f) = f " ].-infty,r.[ & H is open )

let r be Real; :: thesis: for f being PartFunc of (CarProduct ((Seg n) --> RNS_Real)),RNS_Real st f is_continuous_on dom f holds
ex H being Subset of (CarProduct ((Seg n) --> RNS_Real)) st
( H /\ (dom f) = f " ].-infty,r.[ & H is open )

let f be PartFunc of (CarProduct ((Seg n) --> RNS_Real)),RNS_Real; :: thesis: ( f is_continuous_on dom f implies ex H being Subset of (CarProduct ((Seg n) --> RNS_Real)) st
( H /\ (dom f) = f " ].-infty,r.[ & H is open ) )

assume A1: f is_continuous_on dom f ; :: thesis: ex H being Subset of (CarProduct ((Seg n) --> RNS_Real)) st
( H /\ (dom f) = f " ].-infty,r.[ & H is open )

set E = dom f;
set S = CarProduct ((Seg n) --> RNS_Real);
A2: now :: thesis: for z being object st z in f " ].-infty,r.[ holds
ex t being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( t = z & ex s being Real st
( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) )
let z be object ; :: thesis: ( z in f " ].-infty,r.[ implies ex t being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( t = z & ex s being Real st
( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) ) )

assume A3: z in f " ].-infty,r.[ ; :: thesis: ex t being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( t = z & ex s being Real st
( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) )

then A4: ( z in dom f & f . z in ].-infty,r.[ ) by FUNCT_1:def 7;
then A5: ex t being Real st
( t = f . z & -infty < t & t < r ) ;
reconsider t = z as Point of (CarProduct ((Seg n) --> RNS_Real)) by A3;
take t = t; :: thesis: ( t = z & ex s being Real st
( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) )

thus t = z ; :: thesis: ex s being Real st
( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) )

reconsider y = f . t as Real ;
set e = r - y;
consider s being Real such that
A6: ( 0 < s & ( for t1 being Point of (CarProduct ((Seg n) --> RNS_Real)) st t1 in dom f & ||.(t1 - t).|| < s holds
||.((f /. t1) - (f /. t)).|| < r - y ) ) by A1, A4, A5, XREAL_1:50, NFCONT_1:19;
take s = s; :: thesis: ( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) )

thus 0 < s by A6; :: thesis: for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[

thus for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ :: thesis: verum
proof
let t1 be object ; :: thesis: ( t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } implies f . t1 in ].-infty,r.[ )
assume A7: t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } ; :: thesis: f . t1 in ].-infty,r.[
then A8: ( t1 in dom f & t1 in { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } ) by XBOOLE_0:def 4;
reconsider y0 = t1 as Point of (CarProduct ((Seg n) --> RNS_Real)) by A7;
A9: ex y1 being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( y0 = y1 & ||.(y1 - t).|| < s ) by A8;
reconsider r1 = f /. y0, r2 = f /. t as Real ;
A10: r2 = f . t by A4, PARTFUN1:def 6;
(f /. y0) - (f /. t) = r1 - r2 by DUALSP03:4;
then ||.((f /. y0) - (f /. t)).|| = |.(r1 - r2).| by EUCLID:def 2;
then r1 in ].(r2 - (r - y)),(r2 + (r - y)).[ by A6, A8, A9, RCOMP_1:1;
then ex g being Real st
( g = r1 & r2 - (r - y) < g & g < r2 + (r - y) ) ;
then ( -infty < r1 & r1 < r ) by A10, XXREAL_0:12;
then r1 in ].-infty,r.[ ;
hence f . t1 in ].-infty,r.[ by A8, PARTFUN1:def 6; :: thesis: verum
end;
end;
defpred S1[ object , object ] means ex t being Point of (CarProduct ((Seg n) --> RNS_Real)) ex s being Real st
( t = $1 & s = $2 & 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) );
A11: for z being object st z in f " ].-infty,r.[ holds
ex y being object st
( y in REAL & S1[z,y] )
proof
let z be object ; :: thesis: ( z in f " ].-infty,r.[ implies ex y being object st
( y in REAL & S1[z,y] ) )

assume z in f " ].-infty,r.[ ; :: thesis: ex y being object st
( y in REAL & S1[z,y] )

then consider t being Point of (CarProduct ((Seg n) --> RNS_Real)) such that
A12: ( t = z & ex s being Real st
( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) ) by A2;
consider s being Real such that
A13: ( 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) by A12;
reconsider y = s as Element of REAL by XREAL_0:def 1;
take y ; :: thesis: ( y in REAL & S1[z,y] )
thus y in REAL ; :: thesis: S1[z,y]
thus S1[z,y] by A12, A13; :: thesis: verum
end;
consider R being Function of (f " ].-infty,r.[),REAL such that
A14: for x being object st x in f " ].-infty,r.[ holds
S1[x,R . x] from FUNCT_2:sch 1(A11);
defpred S2[ object , object ] means ex t being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( t = $1 & 0 < R . $1 & $2 = { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < R . $1 } );
A15: for z being object st z in f " ].-infty,r.[ holds
ex y being object st
( y in bool the carrier of (CarProduct ((Seg n) --> RNS_Real)) & S2[z,y] )
proof
let z be object ; :: thesis: ( z in f " ].-infty,r.[ implies ex y being object st
( y in bool the carrier of (CarProduct ((Seg n) --> RNS_Real)) & S2[z,y] ) )

assume z in f " ].-infty,r.[ ; :: thesis: ex y being object st
( y in bool the carrier of (CarProduct ((Seg n) --> RNS_Real)) & S2[z,y] )

then consider t being Point of (CarProduct ((Seg n) --> RNS_Real)), s being Real such that
A16: ( t = z & s = R . z & 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) by A14;
set y = { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } ;
take { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } ; :: thesis: ( { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } in bool the carrier of (CarProduct ((Seg n) --> RNS_Real)) & S2[z, { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } ] )
now :: thesis: for x being object st x in { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
x in the carrier of (CarProduct ((Seg n) --> RNS_Real))
let x be object ; :: thesis: ( x in { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } implies x in the carrier of (CarProduct ((Seg n) --> RNS_Real)) )
assume x in { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } ; :: thesis: x in the carrier of (CarProduct ((Seg n) --> RNS_Real))
then ex t1 being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( x = t1 & ||.(t1 - t).|| < s ) ;
hence x in the carrier of (CarProduct ((Seg n) --> RNS_Real)) ; :: thesis: verum
end;
then { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } c= the carrier of (CarProduct ((Seg n) --> RNS_Real)) ;
hence ( { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } in bool the carrier of (CarProduct ((Seg n) --> RNS_Real)) & S2[z, { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } ] ) by A16; :: thesis: verum
end;
consider B being Function of (f " ].-infty,r.[),(bool the carrier of (CarProduct ((Seg n) --> RNS_Real))) such that
A17: for x being object st x in f " ].-infty,r.[ holds
S2[x,B . x] from FUNCT_2:sch 1(A15);
set H = union (rng B);
reconsider H = union (rng B) as Subset of (CarProduct ((Seg n) --> RNS_Real)) ;
take H ; :: thesis: ( H /\ (dom f) = f " ].-infty,r.[ & H is open )
for z being object holds
( z in H /\ (dom f) iff z in f " ].-infty,r.[ )
proof
let z be object ; :: thesis: ( z in H /\ (dom f) iff z in f " ].-infty,r.[ )
hereby :: thesis: ( z in f " ].-infty,r.[ implies z in H /\ (dom f) )
assume z in H /\ (dom f) ; :: thesis: z in f " ].-infty,r.[
then A18: ( z in H & z in dom f ) by XBOOLE_0:def 4;
then consider Y being set such that
A19: ( z in Y & Y in rng B ) by TARSKI:def 4;
consider x being object such that
A20: ( x in dom B & Y = B . x ) by FUNCT_1:def 3, A19;
A21: ex t being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( t = x & 0 < R . x & B . x = { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < R . x } ) by A17, A20;
A22: ex t being Point of (CarProduct ((Seg n) --> RNS_Real)) ex s being Real st
( t = x & s = R . x & 0 < s & ( for t1 being object st t1 in (dom f) /\ { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < s } holds
f . t1 in ].-infty,r.[ ) ) by A14, A20;
z in (dom f) /\ (B . x) by A19, A20, A18, XBOOLE_0:def 4;
then f . z in ].-infty,r.[ by A21, A22;
hence z in f " ].-infty,r.[ by A18, FUNCT_1:def 7; :: thesis: verum
end;
assume A23: z in f " ].-infty,r.[ ; :: thesis: z in H /\ (dom f)
then A24: z in dom f by FUNCT_1:def 7;
consider t being Point of (CarProduct ((Seg n) --> RNS_Real)) such that
A25: ( t = z & 0 < R . z & B . z = { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < R . z } ) by A17, A23;
reconsider z0 = z as Point of (CarProduct ((Seg n) --> RNS_Real)) by A23;
||.(z0 - z0).|| = ||.(0. (CarProduct ((Seg n) --> RNS_Real))).|| by RLVECT_1:15;
then A26: z0 in B . z0 by A25;
z0 in dom B by A23, FUNCT_2:def 1;
then B . z0 in rng B by FUNCT_1:3;
then z in union (rng B) by A26, TARSKI:def 4;
hence z in H /\ (dom f) by A24, XBOOLE_0:def 4; :: thesis: verum
end;
hence H /\ (dom f) = f " ].-infty,r.[ by TARSKI:2; :: thesis: H is open
for z being Point of (CarProduct ((Seg n) --> RNS_Real)) st z in H holds
ex N being Neighbourhood of z st N c= H
proof
let z be Point of (CarProduct ((Seg n) --> RNS_Real)); :: thesis: ( z in H implies ex N being Neighbourhood of z st N c= H )
assume z in H ; :: thesis: ex N being Neighbourhood of z st N c= H
then consider Y being set such that
A27: ( z in Y & Y in rng B ) by TARSKI:def 4;
consider x being object such that
A28: ( x in dom B & Y = B . x ) by FUNCT_1:def 3, A27;
consider t being Point of (CarProduct ((Seg n) --> RNS_Real)) such that
A29: ( t = x & 0 < R . x & B . x = { t1 where t1 is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(t1 - t).|| < R . x } ) by A17, A28;
A30: ex t1 being Point of (CarProduct ((Seg n) --> RNS_Real)) st
( z = t1 & ||.(t1 - t).|| < R . x ) by A29, A27, A28;
set e = (R . x) - ||.(z - t).||;
reconsider N = { y where y is Point of (CarProduct ((Seg n) --> RNS_Real)) : ||.(y - z).|| < (R . x) - ||.(z - t).|| } as Neighbourhood of z by A30, XREAL_1:50, NFCONT_1:3;
take N ; :: thesis: N c= H
A31: now :: thesis: for p being object st p in N holds
p in Y
let p be object ; :: thesis: ( p in N implies p in Y )
assume p in N ; :: thesis: p in Y
then consider y being Point of (CarProduct ((Seg n) --> RNS_Real)) such that
A32: ( y = p & ||.(y - z).|| < (R . x) - ||.(z - t).|| ) ;
A33: ||.(y - t).|| <= ||.(y - z).|| + ||.(z - t).|| by NORMSP_1:10;
||.(y - z).|| + ||.(z - t).|| < ((R . x) - ||.(z - t).||) + ||.(z - t).|| by A32, XREAL_1:8;
then ||.(y - t).|| < R . x by A33, XXREAL_0:2;
hence p in Y by A29, A28, A32; :: thesis: verum
end;
Y c= H by A27, ZFMISC_1:74;
hence N c= H by A31; :: thesis: verum
end;
hence H is open by NDIFF_1:5; :: thesis: verum