let T be non empty TopStruct ; :: thesis: for S1, S2 being sequence of T st rng S2 c= rng S1 & S2 is one-to-one holds
ex P being Permutation of NAT st S2 * P is subsequence of S1
let S1, S2 be sequence of T; :: thesis: ( rng S2 c= rng S1 & S2 is one-to-one implies ex P being Permutation of NAT st S2 * P is subsequence of S1 )
assume that
A1:
rng S2 c= rng S1
and
A2:
S2 is one-to-one
; :: thesis: ex P being Permutation of NAT st S2 * P is subsequence of S1
defpred S1[ set , set ] means S2 . $1 = S1 . $2;
A3:
for n being set st n in NAT holds
ex u being set st
( u in NAT & S1[n,u] )
consider f being Function such that
A6:
dom f = NAT
and
A7:
rng f c= NAT
and
A8:
for n being set st n in NAT holds
S1[n,f . n]
from WELLORD2:sch 1(A3);
reconsider A = rng f as non empty Subset of NAT by A6, A7, RELAT_1:65;
A9:
f is one-to-one
proof
let x1,
x2 be
set ;
:: according to FUNCT_1:def 8 :: thesis: ( not x1 in dom f or not x2 in dom f or not f . x1 = f . x2 or x1 = x2 )
assume that A10:
x1 in dom f
and A11:
x2 in dom f
and A12:
f . x1 = f . x2
;
:: thesis: x1 = x2
S2 . x2 = S1 . (f . x2)
by A6, A8, A11;
then A13:
S2 . x1 = S2 . x2
by A6, A8, A10, A12;
A14:
x1 in dom S2
by A6, A10, NORMSP_1:17;
x2 in dom S2
by A6, A11, NORMSP_1:17;
hence
x1 = x2
by A2, A13, A14, FUNCT_1:def 8;
:: thesis: verum
end;
A15:
for m being Element of NAT holds { k where k is Element of NAT : ( k in rng f & k > m ) } <> {}
A19:
for m being Element of NAT holds { k where k is Element of NAT : ( k in rng f & k > m ) } c= NAT
defpred S2[ Element of NAT , set , set ] means for B being non empty Subset of NAT
for m being Element of NAT st m = $2 & B = { k where k is Element of NAT : ( k in rng f & k > m ) } holds
$3 = min B;
A21:
for n being Element of NAT
for x being set ex y being set st S2[n,x,y]
consider g being Function such that
A26:
dom g = NAT
and
A27:
g . 0 = min A
and
A28:
for n being Element of NAT holds S2[n,g . n,g . (n + 1)]
from RECDEF_1:sch 1(A21);
defpred S3[ Element of NAT ] means g . $1 in NAT ;
A29:
S3[ 0 ]
by A27;
A30:
for k being Element of NAT st S3[k] holds
S3[k + 1]
A31:
for k being Element of NAT holds S3[k]
from NAT_1:sch 1(A29, A30);
A32:
rng g c= NAT
for n being Element of NAT holds g . n is real
then reconsider g1 = g as Real_Sequence by A26, SEQ_1:4;
g1 is increasing
then reconsider g1 = g1 as increasing sequence of NAT by A32, A26, RELSET_1:11;
A37:
g1 is one-to-one
then A42:
g " is one-to-one
;
A43:
rng f = rng g
then A63:
rng f = dom (g " )
by A37, FUNCT_1:55;
then A64:
( dom ((g " ) * f) = dom f & rng ((g " ) * f) = rng (g " ) )
by RELAT_1:46, RELAT_1:47;
A65:
rng (g " ) = dom g
by A37, FUNCT_1:55;
rng (g " ) = NAT
by A26, A37, FUNCT_1:55;
then reconsider P = (g " ) * f as Function of NAT ,NAT by A6, A64, FUNCT_2:def 1, RELSET_1:11;
P is bijective
then reconsider P = P as Permutation of NAT ;
take
P "
; :: thesis: S2 * (P " ) is subsequence of S1
( NAT = dom (S2 * (P " )) & NAT = dom (S1 * g) & ( for x being set st x in NAT holds
(S2 * (P " )) . x = (S1 * g) . x ) )
proof
A66:
(
dom (P " ) = NAT &
rng (P " ) c= NAT )
by FUNCT_2:def 1;
thus
NAT = dom (S2 * (P " ))
by FUNCT_2:def 1;
:: thesis: ( NAT = dom (S1 * g) & ( for x being set st x in NAT holds
(S2 * (P " )) . x = (S1 * g) . x ) )
rng g c= dom S1
by A32, NORMSP_1:17;
hence
NAT = dom (S1 * g)
by A26, RELAT_1:46;
:: thesis: for x being set st x in NAT holds
(S2 * (P " )) . x = (S1 * g) . x
let x be
set ;
:: thesis: ( x in NAT implies (S2 * (P " )) . x = (S1 * g) . x )
assume A67:
x in NAT
;
:: thesis: (S2 * (P " )) . x = (S1 * g) . x
then A68:
g . x in rng g
by A26, FUNCT_1:def 5;
then A69:
(f " ) . (g . x) in dom f
by A9, A43, FUNCT_1:54;
thus (S2 * (P " )) . x =
S2 . ((((g " ) * f) " ) . x)
by A66, A67, FUNCT_1:23
.=
S2 . (((f " ) * ((g " ) " )) . x)
by A9, A42, FUNCT_1:66
.=
S2 . (((f " ) * g) . x)
by A37, FUNCT_1:65
.=
S2 . ((f " ) . (g . x))
by A26, A67, FUNCT_1:23
.=
S1 . (f . ((f " ) . (g . x)))
by A6, A8, A69
.=
S1 . (g . x)
by A9, A43, A68, FUNCT_1:57
.=
(S1 * g) . x
by A26, A67, FUNCT_1:23
;
:: thesis: verum
end;
then
S2 * (P " ) = S1 * g1
by FUNCT_1:9;
hence
S2 * (P " ) is subsequence of S1
; :: thesis: verum