let p be FinSequence of REAL ; :: thesis: ( p is nonnegative implies for k being Element of NAT st k in dom p & p . k = Sum p holds
p has_onlyone_value_in k )
assume A1:
p is nonnegative
; :: thesis: for k being Element of NAT st k in dom p & p . k = Sum p holds
p has_onlyone_value_in k
let k1 be Element of NAT ; :: thesis: ( k1 in dom p & p . k1 = Sum p implies p has_onlyone_value_in k1 )
assume A2:
( k1 in dom p & p . k1 = Sum p )
; :: thesis: p has_onlyone_value_in k1
A3:
( k1 >= 1 & k1 <= len p )
by A2, FINSEQ_3:27;
then consider j1 being Nat such that
A4:
k1 + j1 = len p
by NAT_1:10;
reconsider j1 = j1 as Element of NAT by ORDINAL1:def 13;
for i being Element of NAT holds
( not i in dom p or not i <> k1 or not p . i <> 0 )
proof
assume
ex
i being
Element of
NAT st
(
i in dom p &
i <> k1 &
p . i <> 0 )
;
:: thesis: contradiction
then consider k2 being
Element of
NAT such that A5:
(
k2 in dom p &
k2 <> k1 &
p . k2 <> 0 )
;
A6:
(
k2 >= 1 &
k2 <= len p )
by A5, FINSEQ_3:27;
then consider j2 being
Nat such that A7:
k2 + j2 = len p
by NAT_1:10;
reconsider j2 =
j2 as
Element of
NAT by ORDINAL1:def 13;
A8:
p . k2 > 0
by A1, A5, Def1;
per cases
( k1 > k2 or k1 < k2 )
by A5, XXREAL_0:1;
suppose
k1 > k2
;
:: thesis: contradictionthen A9:
not
k1 in Seg k2
by FINSEQ_1:3;
consider p1,
p2 being
FinSequence of
REAL such that A10:
(
len p1 = k2 &
len p2 = j2 &
p = p1 ^ p2 )
by A7, FINSEQ_2:26;
k2 in Seg k2
by A6, FINSEQ_1:5;
then A11:
k2 in dom p1
by A10, FINSEQ_1:def 3;
(
p1 . k2 > 0 & ( for
k being
Nat st
k in dom p1 holds
p1 . k >= 0 ) )
then A14:
Sum p1 > 0
by A11, RVSUM_1:115;
not
k1 in dom p1
by A9, A10, FINSEQ_1:def 3;
then consider kk being
Nat such that A15:
(
kk in dom p2 &
k1 = k2 + kk )
by A2, A10, FINSEQ_1:38;
A16:
p2 . kk = p . k1
by A10, A15, FINSEQ_1:def 7;
for
k being
Nat st
k in dom p2 holds
p2 . k >= 0
then A19:
Sum p2 >= p . k1
by A15, A16, MATRPROB:5;
Sum p = (Sum p1) + (Sum p2)
by A10, RVSUM_1:105;
then
Sum p > (p . k1) + 0
by A14, A19, XREAL_1:10;
hence
contradiction
by A2;
:: thesis: verum end; suppose
k1 < k2
;
:: thesis: contradictionthen A20:
not
k2 in Seg k1
by FINSEQ_1:3;
consider p1,
p2 being
FinSequence of
REAL such that A21:
(
len p1 = k1 &
len p2 = j1 &
p = p1 ^ p2 )
by A4, FINSEQ_2:26;
k1 in Seg k1
by A3, FINSEQ_1:5;
then A22:
k1 in dom p1
by A21, FINSEQ_1:def 3;
(
p1 . k1 = p . k1 & ( for
k being
Nat st
k in dom p1 holds
p1 . k >= 0 ) )
then A25:
Sum p1 >= p . k1
by A22, MATRPROB:5;
not
k2 in dom p1
by A20, A21, FINSEQ_1:def 3;
then consider kk being
Nat such that A26:
(
kk in dom p2 &
k2 = k1 + kk )
by A5, A21, FINSEQ_1:38;
A27:
p2 . kk = p . k2
by A21, A26, FINSEQ_1:def 7;
for
k being
Nat st
k in dom p2 holds
p2 . k >= 0
then A30:
Sum p2 > 0
by A8, A26, A27, RVSUM_1:115;
Sum p = (Sum p1) + (Sum p2)
by A21, RVSUM_1:105;
then
Sum p > (p . k1) + 0
by A25, A30, XREAL_1:10;
hence
contradiction
by A2;
:: thesis: verum end; end;
end;
hence
p has_onlyone_value_in k1
by A2, Def2; :: thesis: verum