let R be Ring; :: thesis: for V being RightMod of R
for A being Subset of V st 0. R <> 1_ R holds
( ( A <> {} & A is linearly-closed ) iff for l being Linear_Combination of A holds Sum l in A )

let V be RightMod of R; :: thesis: for A being Subset of V st 0. R <> 1_ R holds
( ( A <> {} & A is linearly-closed ) iff for l being Linear_Combination of A holds Sum l in A )

let A be Subset of V; :: thesis: ( 0. R <> 1_ R implies ( ( A <> {} & A is linearly-closed ) iff for l being Linear_Combination of A holds Sum l in A ) )
assume A1: 0. R <> 1_ R ; :: thesis: ( ( A <> {} & A is linearly-closed ) iff for l being Linear_Combination of A holds Sum l in A )
thus ( A <> {} & A is linearly-closed implies for l being Linear_Combination of A holds Sum l in A ) :: thesis: ( ( for l being Linear_Combination of A holds Sum l in A ) implies ( A <> {} & A is linearly-closed ) )
proof
assume that
A2: A <> {} and
A3: A is linearly-closed ; :: thesis: for l being Linear_Combination of A holds Sum l in A
defpred S1[ Nat] means for l being Linear_Combination of A st card (Carrier l) = $1 holds
Sum l in A;
A4: S1[ 0 ]
proof
now
let l be Linear_Combination of A; :: thesis: ( card (Carrier l) = 0 implies Sum l in A )
assume card (Carrier l) = 0 ; :: thesis: Sum l in A
then Carrier l = {} ;
then l = ZeroLC V by Def6;
then Sum l = 0. V by Lm3;
hence Sum l in A by A2, A3, RMOD_2:4; :: thesis: verum
end;
hence S1[ 0 ] ; :: thesis: verum
end;
A5: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
now
let k be Element of NAT ; :: thesis: ( ( for l being Linear_Combination of A st card (Carrier l) = k holds
Sum l in A ) implies for l being Linear_Combination of A st card (Carrier l) = k + 1 holds
Sum l in A )

assume A6: for l being Linear_Combination of A st card (Carrier l) = k holds
Sum l in A ; :: thesis: for l being Linear_Combination of A st card (Carrier l) = k + 1 holds
Sum l in A

let l be Linear_Combination of A; :: thesis: ( card (Carrier l) = k + 1 implies Sum l in A )
assume A7: card (Carrier l) = k + 1 ; :: thesis: Sum l in A
consider F being FinSequence of V such that
A8: F is one-to-one and
A9: rng F = Carrier l and
A10: Sum l = Sum (l (#) F) by Def9;
A11: len F = k + 1 by A7, A8, A9, FINSEQ_4:77;
reconsider G = F | (Seg k) as FinSequence of V by FINSEQ_1:23;
A12: len G = k by A11, FINSEQ_3:59;
A13: k + 1 in Seg (k + 1) by FINSEQ_1:6;
then k + 1 in dom F by A11, FINSEQ_1:def 3;
then reconsider v = F . (k + 1) as Vector of V by FINSEQ_2:13;
A14: k + 1 in dom F by A11, A13, FINSEQ_1:def 3;
then A15: ( v in Carrier l & Carrier l c= A ) by A9, Def7, FUNCT_1:def 5;
then A16: v * (l . v) in A by A3, RMOD_2:def 1;
deffunc H1( Element of V) -> Element of the carrier of R = l . $1;
consider f being Function of V,R such that
A17: f . v = 0. R and
A18: for u being Element of V st u <> v holds
f . u = H1(u) from FUNCT_2:sch 6();
reconsider f = f as Element of Funcs the carrier of V,the carrier of R by FUNCT_2:11;
now
let u be Vector of V; :: thesis: ( not u in Carrier l implies f . u = 0. R )
assume A19: not u in Carrier l ; :: thesis: f . u = 0. R
hence f . u = l . u by A15, A18
.= 0. R by A19 ;
:: thesis: verum
end;
then reconsider f = f as Linear_Combination of V by Def4;
A20: Carrier f = (Carrier l) \ {v}
proof
thus Carrier f c= (Carrier l) \ {v} :: according to XBOOLE_0:def 10 :: thesis: (Carrier l) \ {v} c= Carrier f
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in Carrier f or x in (Carrier l) \ {v} )
assume x in Carrier f ; :: thesis: x in (Carrier l) \ {v}
then consider u being Vector of V such that
A21: ( u = x & f . u <> 0. R ) ;
f . u = l . u by A17, A18, A21;
then ( x in Carrier l & not x in {v} ) by A17, A21, TARSKI:def 1;
hence x in (Carrier l) \ {v} by XBOOLE_0:def 5; :: thesis: verum
end;
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in (Carrier l) \ {v} or x in Carrier f )
assume A22: x in (Carrier l) \ {v} ; :: thesis: x in Carrier f
then x in Carrier l by XBOOLE_0:def 5;
then consider u being Vector of V such that
A23: ( x = u & l . u <> 0. R ) ;
not x in {v} by A22, XBOOLE_0:def 5;
then x <> v by TARSKI:def 1;
then l . u = f . u by A18, A23;
hence x in Carrier f by A23; :: thesis: verum
end;
then ( Carrier f c= A \ {v} & A \ {v} c= A ) by A15, XBOOLE_1:33, XBOOLE_1:36;
then Carrier f c= A by XBOOLE_1:1;
then reconsider f = f as Linear_Combination of A by Def7;
A24: G is one-to-one by A8, FUNCT_1:84;
A25: rng G = Carrier f
proof
thus rng G c= Carrier f :: according to XBOOLE_0:def 10 :: thesis: Carrier f c= rng G
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in rng G or x in Carrier f )
assume x in rng G ; :: thesis: x in Carrier f
then consider y being set such that
A26: y in dom G and
A27: G . y = x by FUNCT_1:def 5;
reconsider y = y as Nat by A26, FINSEQ_3:25;
dom G c= dom F by RELAT_1:89;
then A28: ( y in dom F & G . y = F . y ) by A26, FUNCT_1:70;
then A29: x in rng F by A27, FUNCT_1:def 5;
now
assume x = v ; :: thesis: contradiction
then ( k + 1 = y & y <= k & k < k + 1 ) by A8, A12, A14, A26, A27, A28, FINSEQ_3:27, FUNCT_1:def 8, XREAL_1:31;
hence contradiction ; :: thesis: verum
end;
then not x in {v} by TARSKI:def 1;
hence x in Carrier f by A9, A20, A29, XBOOLE_0:def 5; :: thesis: verum
end;
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in Carrier f or x in rng G )
assume A30: x in Carrier f ; :: thesis: x in rng G
then x in rng F by A9, A20, XBOOLE_0:def 5;
then consider y being set such that
A31: y in dom F and
A32: F . y = x by FUNCT_1:def 5;
reconsider y = y as Element of NAT by A31, FINSEQ_3:25;
then y in (dom F) /\ (Seg k) by A31, XBOOLE_0:def 4;
then A33: y in dom G by RELAT_1:90;
then G . y = F . y by FUNCT_1:70;
hence x in rng G by A32, A33, FUNCT_1:def 5; :: thesis: verum
end;
then A34: Sum (f (#) G) = Sum f by A24, Def9;
A35: ( len (l (#) F) = k + 1 & len (f (#) G) = k ) by A11, A12, Def8;
(Seg (k + 1)) /\ (Seg k) = Seg k by FINSEQ_1:9, NAT_1:12
.= dom (f (#) G) by A35, FINSEQ_1:def 3 ;
then A36: dom (f (#) G) = (dom (l (#) F)) /\ (Seg k) by A35, FINSEQ_1:def 3;
now
let x be set ; :: thesis: ( x in dom (f (#) G) implies (f (#) G) . x = (l (#) F) . x )
assume A37: x in dom (f (#) G) ; :: thesis: (f (#) G) . x = (l (#) F) . x
then reconsider n = x as Nat by FINSEQ_3:25;
A38: n in dom G by A12, A35, A37, FINSEQ_3:31;
then A39: ( G . n in rng G & rng G c= the carrier of V ) by FINSEQ_1:def 4, FUNCT_1:def 5;
then reconsider u = G . n as Vector of V ;
not u in {v} by A20, A25, A39, XBOOLE_0:def 5;
then A40: u <> v by TARSKI:def 1;
A41: (f (#) G) . n = u * (f . u) by A38, Th32
.= u * (l . u) by A18, A40 ;
n in dom (l (#) F) by A36, A37, XBOOLE_0:def 4;
then A42: n in dom F by A11, A35, FINSEQ_3:31;
then ( F . n in rng F & rng F c= the carrier of V ) by FINSEQ_1:def 4, FUNCT_1:def 5;
then reconsider w = F . n as Vector of V ;
w = u by A38, FUNCT_1:70;
hence (f (#) G) . x = (l (#) F) . x by A41, A42, Th32; :: thesis: verum
end;
then f (#) G = (l (#) F) | (Seg k) by A36, FUNCT_1:68;
then A43: f (#) G = (l (#) F) | (dom (f (#) G)) by A35, FINSEQ_1:def 3;
(l (#) F) . (len F) = v * (l . v) by A11, A14, Th32;
then A44: Sum (l (#) F) = (Sum (f (#) G)) + (v * (l . v)) by A11, A35, A43, RLVECT_1:55;
v in rng F by A14, FUNCT_1:def 5;
then ( Carrier l is finite & {v} c= Carrier l ) by A9, ZFMISC_1:37;
then card (Carrier f) = (k + 1) - (card {v}) by A7, A20, CARD_2:63
.= (k + 1) - 1 by CARD_1:50
.= k by XCMPLX_1:26 ;
then Sum f in A by A6;
hence Sum l in A by A3, A10, A16, A34, A44, RMOD_2:def 1; :: thesis: verum
end;
hence for k being Element of NAT st S1[k] holds
S1[k + 1] ; :: thesis: verum
end;
A45: for k being Element of NAT holds S1[k] from NAT_1:sch 1(A4, A5);
let l be Linear_Combination of A; :: thesis: Sum l in A
card (Carrier l) = card (Carrier l) ;
hence Sum l in A by A45; :: thesis: verum
end;
assume A46: for l being Linear_Combination of A holds Sum l in A ; :: thesis: ( A <> {} & A is linearly-closed )
( ZeroLC V is Linear_Combination of A & Sum (ZeroLC V) = 0. V ) by Lm3, Th26;
then A47: 0. V in A by A46;
thus A <> {} by A46; :: thesis: A is linearly-closed
A48: for a being Scalar of R
for v being Vector of V st v in A holds
v * a in A
proof
let a be Scalar of R; :: thesis: for v being Vector of V st v in A holds
v * a in A

let v be Vector of V; :: thesis: ( v in A implies v * a in A )
assume A49: v in A ; :: thesis: v * a in A
now
per cases ( a = 0. R or a <> 0. R ) ;
suppose A50: a <> 0. R ; :: thesis: v * a in A
deffunc H1( Element of V) -> Element of the carrier of R = 0. R;
consider f being Function of V,R such that
A51: f . v = a and
A52: for u being Element of V st u <> v holds
f . u = H1(u) from FUNCT_2:sch 6();
reconsider f = f as Element of Funcs the carrier of V,the carrier of R by FUNCT_2:11;
now
let u be Vector of V; :: thesis: ( not u in {v} implies f . u = 0. R )
assume not u in {v} ; :: thesis: f . u = 0. R
then u <> v by TARSKI:def 1;
hence f . u = 0. R by A52; :: thesis: verum
end;
then reconsider f = f as Linear_Combination of V by Def4;
A53: Carrier f = {v}
proof
thus Carrier f c= {v} :: according to XBOOLE_0:def 10 :: thesis: {v} c= Carrier f
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in Carrier f or x in {v} )
assume x in Carrier f ; :: thesis: x in {v}
then consider u being Vector of V such that
A54: ( x = u & f . u <> 0. R ) ;
u = v by A52, A54;
hence x in {v} by A54, TARSKI:def 1; :: thesis: verum
end;
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in {v} or x in Carrier f )
assume x in {v} ; :: thesis: x in Carrier f
then x = v by TARSKI:def 1;
hence x in Carrier f by A50, A51; :: thesis: verum
end;
{v} c= A by A49, ZFMISC_1:37;
then reconsider f = f as Linear_Combination of A by A53, Def7;
consider F being FinSequence of V such that
A55: F is one-to-one and
A56: rng F = Carrier f and
A57: Sum (f (#) F) = Sum f by Def9;
F = <*v*> by A53, A55, A56, FINSEQ_3:106;
then f (#) F = <*(v * (f . v))*> by Th34;
then Sum f = v * a by A51, A57, RLVECT_1:61;
hence v * a in A by A46; :: thesis: verum
end;
end;
end;
hence v * a in A ; :: thesis: verum
end;
thus for v, u being Vector of V st v in A & u in A holds
v + u in A :: according to RMOD_2:def 1 :: thesis: for b1 being Element of the carrier of R
for b2 being Element of the carrier of V holds
( not b2 in A or b2 * b1 in A )
proof
let v, u be Vector of V; :: thesis: ( v in A & u in A implies v + u in A )
assume that
A58: v in A and
A59: u in A ; :: thesis: v + u in A
now
per cases ( u = v or v <> u ) ;
suppose u = v ; :: thesis: v + u in A
then v + u = (v * (1_ R)) + v by VECTSP_2:def 23
.= (v * (1_ R)) + (v * (1_ R)) by VECTSP_2:def 23
.= v * ((1_ R) + (1_ R)) by VECTSP_2:def 23 ;
hence v + u in A by A48, A58; :: thesis: verum
end;
suppose A60: v <> u ; :: thesis: v + u in A
deffunc H1( Element of V) -> Element of the carrier of R = 0. R;
consider f being Function of V,R such that
A61: f . v = 1_ R and
A62: f . u = 1_ R and
A63: for w being Element of V st w <> v & w <> u holds
f . w = H1(w) from FUNCT_2:sch 7(A60);
reconsider f = f as Element of Funcs the carrier of V,the carrier of R by FUNCT_2:11;
now
let w be Vector of V; :: thesis: ( not w in {v,u} implies f . w = 0. R )
assume not w in {v,u} ; :: thesis: f . w = 0. R
then ( w <> v & w <> u ) by TARSKI:def 2;
hence f . w = 0. R by A63; :: thesis: verum
end;
then reconsider f = f as Linear_Combination of V by Def4;
A64: Carrier f = {v,u}
proof
thus Carrier f c= {v,u} :: according to XBOOLE_0:def 10 :: thesis: {v,u} c= Carrier f
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in Carrier f or x in {v,u} )
assume x in Carrier f ; :: thesis: x in {v,u}
then ex w being Vector of V st
( x = w & f . w <> 0. R ) ;
then ( x = v or x = u ) by A63;
hence x in {v,u} by TARSKI:def 2; :: thesis: verum
end;
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in {v,u} or x in Carrier f )
assume x in {v,u} ; :: thesis: x in Carrier f
then ( x = v or x = u ) by TARSKI:def 2;
hence x in Carrier f by A1, A61, A62; :: thesis: verum
end;
then Carrier f c= A by A58, A59, ZFMISC_1:38;
then reconsider f = f as Linear_Combination of A by Def7;
consider F being FinSequence of V such that
A65: F is one-to-one and
A66: rng F = Carrier f and
A67: Sum (f (#) F) = Sum f by Def9;
( F = <*v,u*> or F = <*u,v*> ) by A60, A64, A65, A66, FINSEQ_3:108;
then ( ( f (#) F = <*(v * (1_ R)),(u * (1_ R))*> or f (#) F = <*(u * (1_ R)),(v * (1_ R))*> ) & u * (1_ R) = u & v * (1_ R) = v ) by A61, A62, Th35, VECTSP_2:def 23;
then Sum f = v + u by A67, RLVECT_1:62;
hence v + u in A by A46; :: thesis: verum
end;
end;
end;
hence v + u in A ; :: thesis: verum
end;
thus for b1 being Element of the carrier of R
for b2 being Element of the carrier of V holds
( not b2 in A or b2 * b1 in A ) by A48; :: thesis: verum