let mu be natural-valued FinSequence; ( ( for j being Nat holds mu . (2 * j) = 0 ) implies ex h being odd-valued FinSequence st
( h is non-decreasing & ( for j being Nat holds card (Coim (h,j)) = mu . j ) ) )
assume A1:
for j being Nat holds mu . (2 * j) = 0
; ex h being odd-valued FinSequence st
( h is non-decreasing & ( for j being Nat holds card (Coim (h,j)) = mu . j ) )
set S = Seg (len mu);
A2:
rng mu c= NAT
by VALUED_0:def 6;
A3:
dom mu = Seg (len mu)
by FINSEQ_1:def 3;
then
mu is Function of (Seg (len mu)),NAT
by A2, FUNCT_2:2;
then consider h being FinSequence of Seg (len mu) such that
A4:
for d being Element of Seg (len mu) holds card (Coim (h,d)) = mu . d
by Th7;
A5:
rng h c= Seg (len mu)
by FINSEQ_1:def 4;
A6:
rng h c= OddNAT
then reconsider h = h as odd-valued FinSequence by Def1;
rng h c= REAL
;
then reconsider h = h as FinSequence of REAL by FINSEQ_1:def 4;
set s = sort_a h;
rng h = rng (sort_a h)
by RFINSEQ2:def 6, CLASSES1:75;
then reconsider s = sort_a h as odd-valued FinSequence by A6, Def1;
take
s
; ( s is non-decreasing & ( for j being Nat holds card (Coim (s,j)) = mu . j ) )
thus
s is non-decreasing
; for j being Nat holds card (Coim (s,j)) = mu . j
let i be Nat; card (Coim (s,i)) = mu . i