let L be non empty right_complementable add-associative right_zeroed addLoopStr ; :: thesis: for p being FinSequence of L
for n being Element of NAT st ( for k being Element of NAT st k in dom p & k > n holds
p . k = 0. L ) holds
Sum p = Sum (p | n)
let p be FinSequence of L; :: thesis: for n being Element of NAT st ( for k being Element of NAT st k in dom p & k > n holds
p . k = 0. L ) holds
Sum p = Sum (p | n)
let n be Element of NAT ; :: thesis: ( ( for k being Element of NAT st k in dom p & k > n holds
p . k = 0. L ) implies Sum p = Sum (p | n) )
assume A1:
for k being Element of NAT st k in dom p & k > n holds
p . k = 0. L
; :: thesis: Sum p = Sum (p | n)
defpred S1[ Element of NAT ] means for p being FinSequence of L
for n being Element of NAT st len p = $1 & ( for k being Element of NAT st k in dom p & k > n holds
p . k = 0. L ) holds
Sum p = Sum (p | n);
A2:
S1[ 0 ]
by FINSEQ_1:79;
A3:
now let k be
Element of
NAT ;
:: thesis: ( S1[k] implies S1[k + 1] )assume A4:
S1[
k]
;
:: thesis: S1[k + 1]now let p be
FinSequence of
L;
:: thesis: for n being Element of NAT st len p = k + 1 & ( for l being Element of NAT st l in dom p & l > n holds
p . l = 0. L ) holds
Sum p = Sum (p | n)let n be
Element of
NAT ;
:: thesis: ( len p = k + 1 & ( for l being Element of NAT st l in dom p & l > n holds
p . l = 0. L ) implies Sum p = Sum (p | n) )assume A5:
(
len p = k + 1 & ( for
l being
Element of
NAT st
l in dom p &
l > n holds
p . l = 0. L ) )
;
:: thesis: Sum p = Sum (p | n)set q =
p | (Seg k);
reconsider q =
p | (Seg k) as
FinSequence of
L by FINSEQ_1:23;
A6:
dom p = Seg (k + 1)
by A5, FINSEQ_1:def 3;
A7:
k <= len p
by A5, NAT_1:11;
then A8:
len q = k
by FINSEQ_1:21;
A9:
k <= k + 1
by NAT_1:11;
dom q = Seg k
by A7, FINSEQ_1:21;
then A10:
dom q c= dom p
by A6, A9, FINSEQ_1:7;
A11:
q ^ <*(p /. (k + 1))*> =
q ^ <*(p . (k + 1))*>
by A6, FINSEQ_1:6, PARTFUN1:def 8
.=
p
by A5, FINSEQ_3:61
;
A12:
q = p | k
by FINSEQ_1:def 15;
now per cases
( k < n or n <= k )
;
case A20:
n <= k
;
:: thesis: Sum p = Sum (p | n)
k + 1
> n
by A20, NAT_1:13;
then A24:
0. L =
p . (k + 1)
by A5, A6, FINSEQ_1:6
.=
p /. (k + 1)
by A6, FINSEQ_1:6, PARTFUN1:def 8
;
thus Sum p =
(Sum q) + (Sum <*(p /. (k + 1))*>)
by A11, RLVECT_1:58
.=
(Sum q) + (p /. (k + 1))
by RLVECT_1:61
.=
Sum q
by A24, RLVECT_1:def 7
.=
Sum (q | n)
by A4, A8, A21
.=
Sum (p | n)
by A12, A20, FINSEQ_1:103
;
:: thesis: verum end; end; end; hence
Sum p = Sum (p | n)
;
:: thesis: verum end; hence
S1[
k + 1]
;
:: thesis: verum end;
A25:
for k being Element of NAT holds S1[k]
from NAT_1:sch 1(A2, A3);
consider k being Element of NAT such that
A26:
len p = k
;
thus
Sum p = Sum (p | n)
by A1, A25, A26; :: thesis: verum