let p be FinSequence; ProperPrefixes p, dom p are_equipotent
defpred S1[ set , set ] means ex w being FinSequence st
( $1 = w & $2 = (len w) + 1 );
A1:
for x being set st x in ProperPrefixes p holds
ex y being set st S1[x,y]
consider f being Function such that
A4:
dom f = ProperPrefixes p
and
A5:
for x being set st x in ProperPrefixes p holds
S1[x,f . x]
from CLASSES1:sch 1(A1);
take
f
; WELLORD2:def 4 ( f is one-to-one & proj1 f = ProperPrefixes p & proj2 f = dom p )
thus
f is one-to-one
( proj1 f = ProperPrefixes p & proj2 f = dom p )
thus
dom f = ProperPrefixes p
by A4; proj2 f = dom p
thus
rng f c= dom p
XBOOLE_0:def 10 dom p is_a_prefix_of proj2 f
let x be set ; TARSKI:def 3 ( not x in dom p or x in proj2 f )
assume A17:
x in dom p
; x in proj2 f
then A18:
x in Seg (len p)
by FINSEQ_1:def 3;
reconsider n = x as Element of NAT by A17;
A19:
1 <= n
by A18, FINSEQ_1:3;
A20:
n <= len p
by A18, FINSEQ_1:3;
consider m being Nat such that
A21:
n = 1 + m
by A19, NAT_1:10;
reconsider m = m as Element of NAT by ORDINAL1:def 13;
reconsider q = p | (Seg m) as FinSequence by FINSEQ_1:19;
A22:
m <= len p
by A20, A21, NAT_1:13;
A23:
m <> len p
by A20, A21, NAT_1:13;
A24:
len q = m
by A22, FINSEQ_1:21;
A25:
q is_a_prefix_of p
by Def1;
len q = m
by A22, FINSEQ_1:21;
then
q is_a_proper_prefix_of p
by A23, A25, XBOOLE_0:def 8;
then A28:
q in ProperPrefixes p
by Th36;
then
ex r being FinSequence st
( q = r & f . q = (len r) + 1 )
by A5;
hence
x in proj2 f
by A4, A21, A24, A28, FUNCT_1:def 5; verum