let V be non empty add-associative right_zeroed addLoopStr ; :: thesis: for F, G being FinSequence of the carrier of V holds Sum (F ^ G) = (Sum F) + (Sum G)
let F, G be FinSequence of the carrier of V; :: thesis: Sum (F ^ G) = (Sum F) + (Sum G)
defpred S1[ set ] means for G being FinSequence of the carrier of V st len G = $1 holds
Sum (F ^ G) = (Sum F) + (Sum G);
A1:
S1[ 0 ]
A2:
for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be
Element of
NAT ;
:: thesis: ( S1[k] implies S1[k + 1] )
assume A3:
for
G being
FinSequence of the
carrier of
V st
len G = k holds
Sum (F ^ G) = (Sum F) + (Sum G)
;
:: thesis: S1[k + 1]
let H be
FinSequence of the
carrier of
V;
:: thesis: ( len H = k + 1 implies Sum (F ^ H) = (Sum F) + (Sum H) )
assume A4:
len H = k + 1
;
:: thesis: Sum (F ^ H) = (Sum F) + (Sum H)
reconsider p =
H | (Seg k) as
FinSequence of the
carrier of
V by FINSEQ_1:23;
A5:
dom H = Seg (k + 1)
by A4, FINSEQ_1:def 3;
then A6:
k + 1
in dom H
by FINSEQ_1:6;
then
(
H . (k + 1) in rng H &
rng H c= the
carrier of
V )
by FINSEQ_1:def 4, FUNCT_1:def 5;
then reconsider v =
H . (k + 1) as
Element of
V ;
A7:
k <= k + 1
by NAT_1:12;
then A8:
len p = k
by A4, FINSEQ_1:21;
then A9:
dom H = Seg ((len p) + (len <*v*>))
by A5, FINSEQ_1:56;
dom p = Seg k
by A4, A7, FINSEQ_1:21;
then A10:
dom p c= dom H
by A5, A7, FINSEQ_1:7;
then
H = p ^ <*v*>
by A9, A11, FINSEQ_1:def 7;
then
F ^ H = (F ^ p) ^ <*v*>
by FINSEQ_1:45;
then
len (F ^ H) = (len (F ^ p)) + (len <*v*>)
by FINSEQ_1:35;
then A12:
len (F ^ H) = (len (F ^ p)) + 1
by FINSEQ_1:56;
A13:
dom (F ^ p) = Seg (len (F ^ p))
by FINSEQ_1:def 3;
A14:
dom (F ^ H) =
Seg (len (F ^ H))
by FINSEQ_1:def 3
.=
Seg ((len F) + (len H))
by FINSEQ_1:35
;
A15:
Seg (len (F ^ p)) = Seg ((len F) + (len p))
by FINSEQ_1:35;
(len F) + (len p) <= (len F) + (len H)
by A4, A7, A8, XREAL_1:9;
then
Seg (len (F ^ p)) c= dom (F ^ H)
by A14, A15, FINSEQ_1:7;
then A16:
dom (F ^ p) = (dom (F ^ H)) /\ (Seg (len (F ^ p)))
by A13, XBOOLE_1:28;
then A24:
F ^ p =
(F ^ H) | (Seg (len (F ^ p)))
by A16, FUNCT_1:68, FUNCT_1:70, RELAT_1:90
.=
(F ^ H) | (dom (F ^ p))
by FINSEQ_1:def 3
;
A25:
dom p = Seg (len p)
by FINSEQ_1:def 3;
v =
(F ^ H) . ((len F) + (len H))
by A4, A6, FINSEQ_1:def 7
.=
(F ^ H) . (len (F ^ H))
by FINSEQ_1:35
;
hence Sum (F ^ H) =
(Sum (F ^ p)) + v
by A12, A24, Th55
.=
((Sum F) + (Sum p)) + v
by A3, A8
.=
(Sum F) + ((Sum p) + v)
by Def6
.=
(Sum F) + (Sum H)
by A4, A8, A25, Th55
;
:: thesis: verum
end;
for k being Element of NAT holds S1[k]
from NAT_1:sch 1(A1, A2);
then
( len G = len G implies Sum (F ^ G) = (Sum F) + (Sum G) )
;
hence
Sum (F ^ G) = (Sum F) + (Sum G)
; :: thesis: verum