let p, q be sequence of ExtREAL; :: thesis: for a being Real st 0 <= a & ( for n being Element of NAT holds q . n = a * (p . n) ) holds
SUM q = a * (SUM p)

let a be Real; :: thesis: ( 0 <= a & ( for n being Element of NAT holds q . n = a * (p . n) ) implies SUM q = a * (SUM p) )
assume that
A1: 0 <= a and
A2: for n being Element of NAT holds q . n = a * (p . n) ; :: thesis: SUM q = a * (SUM p)
defpred S1[ Nat] means (Ser q) . $1 = a * ((Ser p) . $1);
(Ser q) . 0 = q . 0 by SUPINF_2:def 11;
then (Ser q) . 0 = a * (p . 0) by A2;
then A3: S1[ 0 ] by SUPINF_2:def 11;
A4: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A5: S1[n] ; :: thesis: S1[n + 1]
(Ser q) . (n + 1) = ((Ser q) . n) + (q . (n + 1)) by SUPINF_2:def 11;
then (Ser q) . (n + 1) = (a * ((Ser p) . n)) + (a * (p . (n + 1))) by A2, A5;
then (Ser q) . (n + 1) = a * (((Ser p) . n) + (p . (n + 1))) by XXREAL_3:95;
hence (Ser q) . (n + 1) = a * ((Ser p) . (n + 1)) by SUPINF_2:def 11; :: thesis: verum
end;
A6: for n being Nat holds S1[n] from NAT_1:sch 2(A3, A4);
for z being object holds
( z in rng (Ser q) iff z in { (a * r) where r is R_eal : r in rng (Ser p) } )
proof
let z be object ; :: thesis: ( z in rng (Ser q) iff z in { (a * r) where r is R_eal : r in rng (Ser p) } )
hereby :: thesis: ( z in { (a * r) where r is R_eal : r in rng (Ser p) } implies z in rng (Ser q) )
assume z in rng (Ser q) ; :: thesis: z in { (a * r) where r is R_eal : r in rng (Ser p) }
then consider i being object such that
A7: ( i in dom (Ser q) & z = (Ser q) . i ) by FUNCT_1:def 3;
reconsider i = i as Nat by A7;
A8: z = a * ((Ser p) . i) by A6, A7;
(Ser p) . i in rng (Ser p) by A7, FUNCT_2:4;
hence z in { (a * r) where r is R_eal : r in rng (Ser p) } by A8; :: thesis: verum
end;
assume z in { (a * r) where r is R_eal : r in rng (Ser p) } ; :: thesis: z in rng (Ser q)
then consider r being R_eal such that
A9: ( z = a * r & r in rng (Ser p) ) ;
consider i being Element of NAT such that
A10: r = (Ser p) . i by FUNCT_2:113, A9;
reconsider i = i as Nat ;
z = (Ser q) . i by A6, A9, A10;
hence z in rng (Ser q) by FUNCT_2:4; :: thesis: verum
end;
then T1: rng (Ser q) = { (a * r) where r is R_eal : r in rng (Ser p) } by TARSKI:2;
per cases ( a > 0 or a = 0 ) by A1;
suppose a > 0 ; :: thesis: SUM q = a * (SUM p)
hence SUM q = a * (SUM p) by T1, Th18; :: thesis: verum
end;
suppose B1: a = 0 ; :: thesis: SUM q = a * (SUM p)
for n being Element of NAT holds q . n = 0.
proof
let n be Element of NAT ; :: thesis: q . n = 0.
q . n = 0 * (p . n) by B1, A2
.= 0. ;
hence q . n = 0. ; :: thesis: verum
end;
then SUM q = 0 by MEASURE7:1;
hence SUM q = a * (SUM p) by B1; :: thesis: verum
end;
end;