let n be Element of NAT ; :: thesis: for e being real positive number
for g being continuous Function of I[01],(TOP-REAL n) ex h being FinSequence of REAL st
( h . 1 = 0 & h . (len h) = 1 & 5 <= len h & rng h c= the carrier of I[01] & h is increasing & ( for i being Element of NAT
for Q being Subset of I[01]
for W being Subset of (Euclid n) st 1 <= i & i < len h & Q = [.(h /. i),(h /. (i + 1)).] & W = g .: Q holds
diameter W < e ) )

1 in { r where r is Real : ( 0 <= r & r <= 1 ) } ;
then A1: 1 in [.0,1.] by RCOMP_1:def 1;
{1} c= [.0,1.]
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in {1} or x in [.0,1.] )
assume x in {1} ; :: thesis: x in [.0,1.]
hence x in [.0,1.] by A1, TARSKI:def 1; :: thesis: verum
end;
then A2: [.0,1.] \/ {1} = [.0,1.] by XBOOLE_1:12;
Closed-Interval-TSpace (0,1) = TopSpaceMetr (Closed-Interval-MSpace (0,1)) by TOPMETR:def 8;
then A3: the carrier of I[01] = the carrier of (Closed-Interval-MSpace (0,1)) by TOPMETR:16, TOPMETR:27
.= [.0,1.] by TOPMETR:14 ;
let e be real positive number ; :: thesis: for g being continuous Function of I[01],(TOP-REAL n) ex h being FinSequence of REAL st
( h . 1 = 0 & h . (len h) = 1 & 5 <= len h & rng h c= the carrier of I[01] & h is increasing & ( for i being Element of NAT
for Q being Subset of I[01]
for W being Subset of (Euclid n) st 1 <= i & i < len h & Q = [.(h /. i),(h /. (i + 1)).] & W = g .: Q holds
diameter W < e ) )

let g be continuous Function of I[01],(TOP-REAL n); :: thesis: ex h being FinSequence of REAL st
( h . 1 = 0 & h . (len h) = 1 & 5 <= len h & rng h c= the carrier of I[01] & h is increasing & ( for i being Element of NAT
for Q being Subset of I[01]
for W being Subset of (Euclid n) st 1 <= i & i < len h & Q = [.(h /. i),(h /. (i + 1)).] & W = g .: Q holds
diameter W < e ) )

reconsider e = e as positive Real by XREAL_0:def 1;
reconsider f = g as Function of (Closed-Interval-MSpace (0,1)),(Euclid n) by UNIFORM1:11;
A4: e / 2 < e by XREAL_1:218;
A5: e / 2 > 0 by XREAL_1:217;
f is uniformly_continuous by UNIFORM1:9;
then consider s1 being Real such that
A6: 0 < s1 and
A7: for u1, u2 being Element of (Closed-Interval-MSpace (0,1)) st dist (u1,u2) < s1 holds
dist ((f /. u1),(f /. u2)) < e / 2 by A5, UNIFORM1:def 1;
set s = min (s1,(1 / 2));
defpred S1[ Nat, set ] means $2 = ((min (s1,(1 / 2))) / 2) * ($1 - 1);
A8: 0 <= min (s1,(1 / 2)) by A6, XXREAL_0:20;
then reconsider j = [/(2 / (min (s1,(1 / 2))))\] as Element of NAT by INT_1:80;
A9: 2 / (min (s1,(1 / 2))) <= j by INT_1:def 5;
A10: min (s1,(1 / 2)) <= s1 by XXREAL_0:17;
A11: for u1, u2 being Element of (Closed-Interval-MSpace (0,1)) st dist (u1,u2) < min (s1,(1 / 2)) holds
dist ((f /. u1),(f /. u2)) < e / 2
proof
let u1, u2 be Element of (Closed-Interval-MSpace (0,1)); :: thesis: ( dist (u1,u2) < min (s1,(1 / 2)) implies dist ((f /. u1),(f /. u2)) < e / 2 )
assume dist (u1,u2) < min (s1,(1 / 2)) ; :: thesis: dist ((f /. u1),(f /. u2)) < e / 2
then dist (u1,u2) < s1 by A10, XXREAL_0:2;
hence dist ((f /. u1),(f /. u2)) < e / 2 by A7; :: thesis: verum
end;
A12: 2 / (min (s1,(1 / 2))) <= [/(2 / (min (s1,(1 / 2))))\] by INT_1:def 5;
then (2 / (min (s1,(1 / 2)))) - j <= 0 by XREAL_1:49;
then 1 + ((2 / (min (s1,(1 / 2)))) - j) <= 1 + 0 by XREAL_1:8;
then A13: ((min (s1,(1 / 2))) / 2) * (1 + ((2 / (min (s1,(1 / 2)))) - j)) <= ((min (s1,(1 / 2))) / 2) * 1 by A8, XREAL_1:66;
A14: for k being Nat st k in Seg j holds
ex x being set st S1[k,x] ;
consider p being FinSequence such that
A15: ( dom p = Seg j & ( for k being Nat st k in Seg j holds
S1[k,p . k] ) ) from FINSEQ_1:sch 1(A14);
A16: Seg (len p) = Seg j by A15, FINSEQ_1:def 3;
rng (p ^ <*1*>) c= REAL
proof
let y be set ; :: according to TARSKI:def 3 :: thesis: ( not y in rng (p ^ <*1*>) or y in REAL )
A17: len (p ^ <*1*>) = (len p) + 1 by FINSEQ_2:19;
assume y in rng (p ^ <*1*>) ; :: thesis: y in REAL
then consider x being set such that
A18: x in dom (p ^ <*1*>) and
A19: y = (p ^ <*1*>) . x by FUNCT_1:def 5;
reconsider nx = x as Element of NAT by A18;
A20: dom (p ^ <*1*>) = Seg (len (p ^ <*1*>)) by FINSEQ_1:def 3;
then A21: 1 <= nx by A18, FINSEQ_1:3;
A22: 1 <= nx by A18, A20, FINSEQ_1:3;
A23: nx <= len (p ^ <*1*>) by A18, A20, FINSEQ_1:3;
per cases ( nx < (len p) + 1 or nx >= (len p) + 1 ) ;
end;
end;
then reconsider h1 = p ^ <*1*> as FinSequence of REAL by FINSEQ_1:def 4;
A26: len h1 = (len p) + 1 by FINSEQ_2:19;
A27: len p = j by A15, FINSEQ_1:def 3;
A28: min (s1,(1 / 2)) <> 0 by A6, XXREAL_0:15;
then 2 / (min (s1,(1 / 2))) >= 2 / (1 / 2) by A8, XREAL_1:120, XXREAL_0:17;
then 4 <= j by A9, XXREAL_0:2;
then A29: 4 + 1 <= (len p) + 1 by A27, XREAL_1:8;
A30: (min (s1,(1 / 2))) / 2 > 0 by A8, A28, XREAL_1:217;
A31: for i being Element of NAT
for r1, r2 being Real st 1 <= i & i < len p & r1 = p . i & r2 = p . (i + 1) holds
( r1 < r2 & r2 - r1 = (min (s1,(1 / 2))) / 2 )
proof
let i be Element of NAT ; :: thesis: for r1, r2 being Real st 1 <= i & i < len p & r1 = p . i & r2 = p . (i + 1) holds
( r1 < r2 & r2 - r1 = (min (s1,(1 / 2))) / 2 )

let r1, r2 be Real; :: thesis: ( 1 <= i & i < len p & r1 = p . i & r2 = p . (i + 1) implies ( r1 < r2 & r2 - r1 = (min (s1,(1 / 2))) / 2 ) )
assume that
A32: ( 1 <= i & i < len p ) and
A33: r1 = p . i and
A34: r2 = p . (i + 1) ; :: thesis: ( r1 < r2 & r2 - r1 = (min (s1,(1 / 2))) / 2 )
( 1 < i + 1 & i + 1 <= len p ) by A32, NAT_1:13;
then i + 1 in Seg j by A16, FINSEQ_1:3;
then A35: r2 = ((min (s1,(1 / 2))) / 2) * ((i + 1) - 1) by A15, A34;
i < i + 1 by NAT_1:13;
then A36: i - 1 < (i + 1) - 1 by XREAL_1:11;
A37: i in Seg j by A16, A32, FINSEQ_1:3;
then r1 = ((min (s1,(1 / 2))) / 2) * (i - 1) by A15, A33;
hence r1 < r2 by A30, A35, A36, XREAL_1:70; :: thesis: r2 - r1 = (min (s1,(1 / 2))) / 2
r2 - r1 = (((min (s1,(1 / 2))) / 2) * i) - (((min (s1,(1 / 2))) / 2) * (i - 1)) by A15, A33, A37, A35;
hence r2 - r1 = (min (s1,(1 / 2))) / 2 ; :: thesis: verum
end;
0 < min (s1,(1 / 2)) by A6, A28, XXREAL_0:20;
then 0 < j by A12, XREAL_1:141;
then A38: 0 + 1 <= j by NAT_1:13;
then 1 in Seg j by FINSEQ_1:3;
then p . 1 = ((min (s1,(1 / 2))) / 2) * (1 - 1) by A15
.= 0 ;
then A39: h1 . 1 = 0 by A38, A27, Lm2;
2 * (min (s1,(1 / 2))) <> 0 by A6, XXREAL_0:15;
then A40: ( ((min (s1,(1 / 2))) / 2) * (2 / (min (s1,(1 / 2)))) = (2 * (min (s1,(1 / 2)))) / (2 * (min (s1,(1 / 2)))) & (2 * (min (s1,(1 / 2)))) / (2 * (min (s1,(1 / 2)))) = 1 ) by XCMPLX_1:60, XCMPLX_1:77;
then A41: 1 - (((min (s1,(1 / 2))) / 2) * (j - 1)) = ((min (s1,(1 / 2))) / 2) * (1 + ((2 / (min (s1,(1 / 2)))) - [/(2 / (min (s1,(1 / 2))))\])) ;
A42: for r1 being Real st r1 = p . (len p) holds
1 - r1 <= (min (s1,(1 / 2))) / 2
proof
let r1 be Real; :: thesis: ( r1 = p . (len p) implies 1 - r1 <= (min (s1,(1 / 2))) / 2 )
assume A43: r1 = p . (len p) ; :: thesis: 1 - r1 <= (min (s1,(1 / 2))) / 2
len p in Seg j by A38, A27, FINSEQ_1:3;
hence 1 - r1 <= (min (s1,(1 / 2))) / 2 by A13, A15, A27, A41, A43; :: thesis: verum
end;
A44: for i being Element of NAT st 1 <= i & i < len h1 holds
(h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2
proof
let i be Element of NAT ; :: thesis: ( 1 <= i & i < len h1 implies (h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2 )
assume that
A45: 1 <= i and
A46: i < len h1 ; :: thesis: (h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2
A47: i + 1 <= len h1 by A46, NAT_1:13;
A48: i <= len p by A26, A46, NAT_1:13;
A49: 1 < i + 1 by A45, NAT_1:13;
per cases ( i < len p or i >= len p ) ;
suppose A50: i < len p ; :: thesis: (h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2
then i + 1 <= len p by NAT_1:13;
then A51: h1 . (i + 1) = p . (i + 1) by A49, FINSEQ_1:85;
A52: h1 . i = p . i by A45, A50, FINSEQ_1:85;
( h1 . i = h1 /. i & h1 . (i + 1) = h1 /. (i + 1) ) by A45, A46, A47, A49, FINSEQ_4:24;
hence (h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2 by A31, A45, A50, A52, A51; :: thesis: verum
end;
suppose i >= len p ; :: thesis: (h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2
then A53: i = len p by A48, XXREAL_0:1;
A54: h1 /. i = h1 . i by A45, A46, FINSEQ_4:24
.= p . i by A45, A48, FINSEQ_1:85 ;
h1 /. (i + 1) = h1 . (i + 1) by A47, A49, FINSEQ_4:24
.= 1 by A53, FINSEQ_1:59 ;
hence (h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2 by A42, A53, A54; :: thesis: verum
end;
end;
end;
[/(2 / (min (s1,(1 / 2))))\] < (2 / (min (s1,(1 / 2)))) + 1 by INT_1:def 5;
then [/(2 / (min (s1,(1 / 2))))\] - 1 < ((2 / (min (s1,(1 / 2)))) + 1) - 1 by XREAL_1:11;
then A55: ((min (s1,(1 / 2))) / 2) * (j - 1) < ((min (s1,(1 / 2))) / 2) * (2 / (min (s1,(1 / 2)))) by A30, XREAL_1:70;
A56: for i being Element of NAT
for r1 being Real st 1 <= i & i <= len p & r1 = p . i holds
r1 < 1
proof
let i be Element of NAT ; :: thesis: for r1 being Real st 1 <= i & i <= len p & r1 = p . i holds
r1 < 1

let r1 be Real; :: thesis: ( 1 <= i & i <= len p & r1 = p . i implies r1 < 1 )
assume that
A57: 1 <= i and
A58: i <= len p and
A59: r1 = p . i ; :: thesis: r1 < 1
i - 1 <= j - 1 by A27, A58, XREAL_1:11;
then A60: ((min (s1,(1 / 2))) / 2) * (i - 1) <= ((min (s1,(1 / 2))) / 2) * (j - 1) by A8, XREAL_1:66;
i in Seg j by A16, A57, A58, FINSEQ_1:3;
then r1 = ((min (s1,(1 / 2))) / 2) * (i - 1) by A15, A59;
hence r1 < 1 by A55, A40, A60, XXREAL_0:2; :: thesis: verum
end;
A61: for i being Element of NAT st 1 <= i & i < len h1 holds
h1 /. i < h1 /. (i + 1)
proof
let i be Element of NAT ; :: thesis: ( 1 <= i & i < len h1 implies h1 /. i < h1 /. (i + 1) )
assume that
A62: 1 <= i and
A63: i < len h1 ; :: thesis: h1 /. i < h1 /. (i + 1)
A64: i + 1 <= len h1 by A63, NAT_1:13;
A65: 1 < i + 1 by A62, NAT_1:13;
A66: i <= len p by A26, A63, NAT_1:13;
per cases ( i < len p or i >= len p ) ;
suppose A67: i < len p ; :: thesis: h1 /. i < h1 /. (i + 1)
then i + 1 <= len p by NAT_1:13;
then A68: h1 . (i + 1) = p . (i + 1) by A65, FINSEQ_1:85;
A69: h1 . i = p . i by A62, A67, FINSEQ_1:85;
( h1 . i = h1 /. i & h1 . (i + 1) = h1 /. (i + 1) ) by A62, A63, A64, A65, FINSEQ_4:24;
hence h1 /. i < h1 /. (i + 1) by A31, A62, A67, A69, A68; :: thesis: verum
end;
suppose i >= len p ; :: thesis: h1 /. i < h1 /. (i + 1)
then A70: i = len p by A66, XXREAL_0:1;
A71: h1 /. (i + 1) = h1 . (i + 1) by A64, A65, FINSEQ_4:24
.= 1 by A70, FINSEQ_1:59 ;
h1 /. i = h1 . i by A62, A63, FINSEQ_4:24
.= p . i by A62, A66, FINSEQ_1:85 ;
hence h1 /. i < h1 /. (i + 1) by A56, A62, A66, A71; :: thesis: verum
end;
end;
end;
A72: dom g = the carrier of I[01] by FUNCT_2:def 1;
A73: for i being Element of NAT
for Q being Subset of I[01]
for W being Subset of (Euclid n) st 1 <= i & i < len h1 & Q = [.(h1 /. i),(h1 /. (i + 1)).] & W = g .: Q holds
diameter W < e
proof
let i be Element of NAT ; :: thesis: for Q being Subset of I[01]
for W being Subset of (Euclid n) st 1 <= i & i < len h1 & Q = [.(h1 /. i),(h1 /. (i + 1)).] & W = g .: Q holds
diameter W < e

let Q be Subset of I[01]; :: thesis: for W being Subset of (Euclid n) st 1 <= i & i < len h1 & Q = [.(h1 /. i),(h1 /. (i + 1)).] & W = g .: Q holds
diameter W < e

let W be Subset of (Euclid n); :: thesis: ( 1 <= i & i < len h1 & Q = [.(h1 /. i),(h1 /. (i + 1)).] & W = g .: Q implies diameter W < e )
assume that
A74: ( 1 <= i & i < len h1 ) and
A75: Q = [.(h1 /. i),(h1 /. (i + 1)).] and
A76: W = g .: Q ; :: thesis: diameter W < e
h1 /. i < h1 /. (i + 1) by A61, A74;
then A77: Q <> {} by A75, XXREAL_1:1;
A78: for x, y being Point of (Euclid n) st x in W & y in W holds
dist (x,y) <= e / 2
proof
let x, y be Point of (Euclid n); :: thesis: ( x in W & y in W implies dist (x,y) <= e / 2 )
assume that
A79: x in W and
A80: y in W ; :: thesis: dist (x,y) <= e / 2
consider x3 being set such that
A81: x3 in dom g and
A82: x3 in Q and
A83: x = g . x3 by A76, A79, FUNCT_1:def 12;
reconsider x3 = x3 as Element of (Closed-Interval-MSpace (0,1)) by A81, Lm1, TOPMETR:16;
reconsider r3 = x3 as Real by A75, A82;
A84: (h1 /. (i + 1)) - (h1 /. i) <= (min (s1,(1 / 2))) / 2 by A44, A74;
consider y3 being set such that
A85: y3 in dom g and
A86: y3 in Q and
A87: y = g . y3 by A76, A80, FUNCT_1:def 12;
reconsider y3 = y3 as Element of (Closed-Interval-MSpace (0,1)) by A85, Lm1, TOPMETR:16;
reconsider s3 = y3 as Real by A75, A86;
A88: ( f . x3 = f /. x3 & f . y3 = f /. y3 ) ;
abs (r3 - s3) <= (h1 /. (i + 1)) - (h1 /. i) by A75, A82, A86, UNIFORM1:14;
then abs (r3 - s3) <= (min (s1,(1 / 2))) / 2 by A84, XXREAL_0:2;
then A89: dist (x3,y3) <= (min (s1,(1 / 2))) / 2 by HEINE:1;
(min (s1,(1 / 2))) / 2 < min (s1,(1 / 2)) by A8, A28, XREAL_1:218;
then dist (x3,y3) < min (s1,(1 / 2)) by A89, XXREAL_0:2;
hence dist (x,y) <= e / 2 by A11, A83, A87, A88; :: thesis: verum
end;
then W is bounded by A5, TBSP_1:def 9;
then diameter W <= e / 2 by A72, A76, A77, A78, TBSP_1:def 10;
hence diameter W < e by A4, XXREAL_0:2; :: thesis: verum
consider x1 being Element of Q;
end;
A90: rng p c= [.0,1.]
proof
let y be set ; :: according to TARSKI:def 3 :: thesis: ( not y in rng p or y in [.0,1.] )
assume y in rng p ; :: thesis: y in [.0,1.]
then consider x being set such that
A91: x in dom p and
A92: y = p . x by FUNCT_1:def 5;
reconsider nx = x as Element of NAT by A91;
A93: p . nx = ((min (s1,(1 / 2))) / 2) * (nx - 1) by A15, A91;
then reconsider ry = p . nx as Real ;
A94: x in Seg (len p) by A91, FINSEQ_1:def 3;
then A95: 1 <= nx by FINSEQ_1:3;
then A96: nx - 1 >= 1 - 1 by XREAL_1:11;
nx <= len p by A94, FINSEQ_1:3;
then ry < 1 by A56, A95;
then y in { rs where rs is Real : ( 0 <= rs & rs <= 1 ) } by A8, A92, A93, A96;
hence y in [.0,1.] by RCOMP_1:def 1; :: thesis: verum
end;
rng <*1*> = {1} by FINSEQ_1:55;
then rng h1 = (rng p) \/ {1} by FINSEQ_1:44;
then A97: rng h1 c= [.0,1.] \/ {1} by A90, XBOOLE_1:13;
h1 . (len h1) = 1 by A26, FINSEQ_1:59;
hence ex h being FinSequence of REAL st
( h . 1 = 0 & h . (len h) = 1 & 5 <= len h & rng h c= the carrier of I[01] & h is increasing & ( for i being Element of NAT
for Q being Subset of I[01]
for W being Subset of (Euclid n) st 1 <= i & i < len h & Q = [.(h /. i),(h /. (i + 1)).] & W = g .: Q holds
diameter W < e ) ) by A26, A29, A39, A2, A97, A3, A61, A73, Lm3; :: thesis: verum