LM003:
for a being non empty at_most_one FinSequence of REAL ex opt being Element of NAT ex g being non empty FinSequence of NAT st
( dom g = dom a & ( for j being Nat st j in rng g holds
SumBin (a,g,{j}) <= 1 ) & opt = card (rng g) & ( for f being non empty FinSequence of NAT st dom f = dom a & ( for j being Nat st j in rng f holds
SumBin (a,f,{j}) <= 1 ) holds
opt <= card (rng f) ) )
LM004:
for a being non empty at_most_one FinSequence of REAL
for opt1, opt2 being Element of NAT st ex g being non empty FinSequence of NAT st
( dom g = dom a & ( for j being Nat st j in rng g holds
SumBin (a,g,{j}) <= 1 ) & opt1 = card (rng g) & ( for f being non empty FinSequence of NAT st dom f = dom a & ( for j being Nat st j in rng f holds
SumBin (a,f,{j}) <= 1 ) holds
opt1 <= card (rng f) ) ) & ex g being non empty FinSequence of NAT st
( dom g = dom a & ( for j being Nat st j in rng g holds
SumBin (a,g,{j}) <= 1 ) & opt2 = card (rng g) & ( for f being non empty FinSequence of NAT st dom f = dom a & ( for j being Nat st j in rng f holds
SumBin (a,f,{j}) <= 1 ) holds
opt2 <= card (rng f) ) ) holds
opt1 = opt2
definition
let a be non
empty at_most_one FinSequence of
REAL ;
existence
ex b1 being Element of NAT ex g being non empty FinSequence of NAT st
( dom g = dom a & ( for j being Nat st j in rng g holds
SumBin (a,g,{j}) <= 1 ) & b1 = card (rng g) & ( for f being non empty FinSequence of NAT st dom f = dom a & ( for j being Nat st j in rng f holds
SumBin (a,f,{j}) <= 1 ) holds
b1 <= card (rng f) ) )
by LM003;
uniqueness
for b1, b2 being Element of NAT st ex g being non empty FinSequence of NAT st
( dom g = dom a & ( for j being Nat st j in rng g holds
SumBin (a,g,{j}) <= 1 ) & b1 = card (rng g) & ( for f being non empty FinSequence of NAT st dom f = dom a & ( for j being Nat st j in rng f holds
SumBin (a,f,{j}) <= 1 ) holds
b1 <= card (rng f) ) ) & ex g being non empty FinSequence of NAT st
( dom g = dom a & ( for j being Nat st j in rng g holds
SumBin (a,g,{j}) <= 1 ) & b2 = card (rng g) & ( for f being non empty FinSequence of NAT st dom f = dom a & ( for j being Nat st j in rng f holds
SumBin (a,f,{j}) <= 1 ) holds
b2 <= card (rng f) ) ) holds
b1 = b2
by LM004;
end;
LM001:
for a being non empty FinSequence of REAL
for Alg being Function of [:REAL,(NAT *):],NAT ex h being non empty FinSequence of NAT * st
( len h = len a & h . 1 = <*1*> & ( for i being Nat st 1 <= i & i < len a holds
ex d1 being Element of REAL ex d2 being FinSequence of NAT st
( d1 = a . (i + 1) & d2 = h . i & h . (i + 1) = d2 ^ <*(Alg . (d1,d2))*> ) ) )
LM002:
for a being non empty FinSequence of REAL
for Alg being Function of [:REAL,(NAT *):],NAT
for f, y being non empty FinSequence of NAT * st len f = len a & f . 1 = <*1*> & ( for i being Nat st 1 <= i & i < len a holds
ex d1 being Element of REAL ex d2 being FinSequence of NAT st
( d1 = a . (i + 1) & d2 = f . i & f . (i + 1) = d2 ^ <*(Alg . (d1,d2))*> ) ) & len y = len a & y . 1 = <*1*> & ( for i being Nat st 1 <= i & i < len a holds
ex d1 being Element of REAL ex d2 being FinSequence of NAT st
( d1 = a . (i + 1) & d2 = y . i & y . (i + 1) = d2 ^ <*(Alg . (d1,d2))*> ) ) holds
f = y
LM008:
for a being non empty FinSequence of REAL
for Alg being Function of [:REAL,(NAT *):],NAT holds (OnlinePackingHistory (a,Alg)) . (len (OnlinePackingHistory (a,Alg))) is non empty FinSequence of NAT
LM020:
for a being non empty FinSequence of REAL ex nf being Function of [:REAL,(NAT *):],NAT st
for s being Real
for f being FinSequence of NAT holds
( ( s + (SumBin (a,f,{(f . (len f))})) <= 1 implies nf . (s,f) = f . (len f) ) & ( s + (SumBin (a,f,{(f . (len f))})) > 1 implies nf . (s,f) = (f . (len f)) + 1 ) )
LM021:
for a being non empty FinSequence of REAL
for nf1, nf2 being Function of [:REAL,(NAT *):],NAT st ( for s being Real
for f being FinSequence of NAT holds
( ( s + (SumBin (a,f,{(f . (len f))})) <= 1 implies nf1 . (s,f) = f . (len f) ) & ( s + (SumBin (a,f,{(f . (len f))})) > 1 implies nf1 . (s,f) = (f . (len f)) + 1 ) ) ) & ( for s being Real
for f being FinSequence of NAT holds
( ( s + (SumBin (a,f,{(f . (len f))})) <= 1 implies nf2 . (s,f) = f . (len f) ) & ( s + (SumBin (a,f,{(f . (len f))})) > 1 implies nf2 . (s,f) = (f . (len f)) + 1 ) ) ) holds
nf1 = nf2
definition
let a be non
empty FinSequence of
REAL ;
existence
ex b1 being Function of [:REAL,(NAT *):],NAT st
for s being Real
for f being FinSequence of NAT holds
( ( s + (SumBin (a,f,{(f . (len f))})) <= 1 implies b1 . (s,f) = f . (len f) ) & ( s + (SumBin (a,f,{(f . (len f))})) > 1 implies b1 . (s,f) = (f . (len f)) + 1 ) )
by LM020;
uniqueness
for b1, b2 being Function of [:REAL,(NAT *):],NAT st ( for s being Real
for f being FinSequence of NAT holds
( ( s + (SumBin (a,f,{(f . (len f))})) <= 1 implies b1 . (s,f) = f . (len f) ) & ( s + (SumBin (a,f,{(f . (len f))})) > 1 implies b1 . (s,f) = (f . (len f)) + 1 ) ) ) & ( for s being Real
for f being FinSequence of NAT holds
( ( s + (SumBin (a,f,{(f . (len f))})) <= 1 implies b2 . (s,f) = f . (len f) ) & ( s + (SumBin (a,f,{(f . (len f))})) > 1 implies b2 . (s,f) = (f . (len f)) + 1 ) ) ) holds
b1 = b2
by LM021;
end;