:: Quotient Module of $\mathbb Z$-module
:: by Yuichi Futa , Hiroyuki Okazaki and Yasunari Shidama
::
:: Received May 7, 2012
:: Copyright (c) 2012-2013 Association of Mizar Users


definition
let V be Z_Module;
let a be Integer;
func a * V -> non empty Subset of V equals :: ZMODUL02:def 1
{ (a * v) where v is Element of V : verum } ;
correctness
coherence
{ (a * v) where v is Element of V : verum } is non empty Subset of V
;
proof end;
end;

:: deftheorem defines * ZMODUL02:def 1 :
for V being Z_Module
for a being Integer holds a * V = { (a * v) where v is Element of V : verum } ;

definition
let V be Z_Module;
let a be Integer;
func Zero_ (a,V) -> Element of a * V equals :: ZMODUL02:def 2
0. V;
correctness
coherence
0. V is Element of a * V
;
proof end;
end;

:: deftheorem defines Zero_ ZMODUL02:def 2 :
for V being Z_Module
for a being Integer holds Zero_ (a,V) = 0. V;

definition
let V be Z_Module;
let a be Integer;
func Add_ (a,V) -> Function of [:(a * V),(a * V):],(a * V) equals :: ZMODUL02:def 3
the addF of V | [:(a * V),(a * V):];
correctness
coherence
the addF of V | [:(a * V),(a * V):] is Function of [:(a * V),(a * V):],(a * V)
;
proof end;
end;

:: deftheorem defines Add_ ZMODUL02:def 3 :
for V being Z_Module
for a being Integer holds Add_ (a,V) = the addF of V | [:(a * V),(a * V):];

definition
let V be Z_Module;
let a be Integer;
func Mult_ (a,V) -> Function of [:INT,(a * V):],(a * V) equals :: ZMODUL02:def 4
the Mult of V | [:INT,(a * V):];
correctness
coherence
the Mult of V | [:INT,(a * V):] is Function of [:INT,(a * V):],(a * V)
;
proof end;
end;

:: deftheorem defines Mult_ ZMODUL02:def 4 :
for V being Z_Module
for a being Integer holds Mult_ (a,V) = the Mult of V | [:INT,(a * V):];

definition
let V be Z_Module;
let a be Integer;
func a (*) V -> Submodule of V equals :: ZMODUL02:def 5
Z_ModuleStruct(# (a * V),(Zero_ (a,V)),(Add_ (a,V)),(Mult_ (a,V)) #);
coherence
Z_ModuleStruct(# (a * V),(Zero_ (a,V)),(Add_ (a,V)),(Mult_ (a,V)) #) is Submodule of V
proof end;
end;

:: deftheorem defines (*) ZMODUL02:def 5 :
for V being Z_Module
for a being Integer holds a (*) V = Z_ModuleStruct(# (a * V),(Zero_ (a,V)),(Add_ (a,V)),(Mult_ (a,V)) #);

definition
let V be Z_Module;
let W be Submodule of V;
func CosetSet (V,W) -> non empty Subset-Family of V equals :: ZMODUL02:def 6
{ A where A is Coset of W : verum } ;
correctness
coherence
{ A where A is Coset of W : verum } is non empty Subset-Family of V
;
proof end;
end;

:: deftheorem defines CosetSet ZMODUL02:def 6 :
for V being Z_Module
for W being Submodule of V holds CosetSet (V,W) = { A where A is Coset of W : verum } ;

definition
let V be Z_Module;
let W be Submodule of V;
func addCoset (V,W) -> BinOp of (CosetSet (V,W)) means :Def7: :: ZMODUL02:def 7
for A, B being Element of CosetSet (V,W)
for a, b being VECTOR of V st A = a + W & B = b + W holds
it . (A,B) = (a + b) + W;
existence
ex b1 being BinOp of (CosetSet (V,W)) st
for A, B being Element of CosetSet (V,W)
for a, b being VECTOR of V st A = a + W & B = b + W holds
b1 . (A,B) = (a + b) + W
proof end;
uniqueness
for b1, b2 being BinOp of (CosetSet (V,W)) st ( for A, B being Element of CosetSet (V,W)
for a, b being VECTOR of V st A = a + W & B = b + W holds
b1 . (A,B) = (a + b) + W ) & ( for A, B being Element of CosetSet (V,W)
for a, b being VECTOR of V st A = a + W & B = b + W holds
b2 . (A,B) = (a + b) + W ) holds
b1 = b2
proof end;
end;

:: deftheorem Def7 defines addCoset ZMODUL02:def 7 :
for V being Z_Module
for W being Submodule of V
for b3 being BinOp of (CosetSet (V,W)) holds
( b3 = addCoset (V,W) iff for A, B being Element of CosetSet (V,W)
for a, b being VECTOR of V st A = a + W & B = b + W holds
b3 . (A,B) = (a + b) + W );

definition
let V be Z_Module;
let W be Submodule of V;
func zeroCoset (V,W) -> Element of CosetSet (V,W) equals :: ZMODUL02:def 8
the carrier of W;
coherence
the carrier of W is Element of CosetSet (V,W)
proof end;
end;

:: deftheorem defines zeroCoset ZMODUL02:def 8 :
for V being Z_Module
for W being Submodule of V holds zeroCoset (V,W) = the carrier of W;

definition
let V be Z_Module;
let W be Submodule of V;
func lmultCoset (V,W) -> Function of [:INT,(CosetSet (V,W)):],(CosetSet (V,W)) means :Def9: :: ZMODUL02:def 9
for z being Integer
for A being Element of CosetSet (V,W)
for a being VECTOR of V st A = a + W holds
it . (z,A) = (z * a) + W;
existence
ex b1 being Function of [:INT,(CosetSet (V,W)):],(CosetSet (V,W)) st
for z being Integer
for A being Element of CosetSet (V,W)
for a being VECTOR of V st A = a + W holds
b1 . (z,A) = (z * a) + W
proof end;
uniqueness
for b1, b2 being Function of [:INT,(CosetSet (V,W)):],(CosetSet (V,W)) st ( for z being Integer
for A being Element of CosetSet (V,W)
for a being VECTOR of V st A = a + W holds
b1 . (z,A) = (z * a) + W ) & ( for z being Integer
for A being Element of CosetSet (V,W)
for a being VECTOR of V st A = a + W holds
b2 . (z,A) = (z * a) + W ) holds
b1 = b2
proof end;
end;

:: deftheorem Def9 defines lmultCoset ZMODUL02:def 9 :
for V being Z_Module
for W being Submodule of V
for b3 being Function of [:INT,(CosetSet (V,W)):],(CosetSet (V,W)) holds
( b3 = lmultCoset (V,W) iff for z being Integer
for A being Element of CosetSet (V,W)
for a being VECTOR of V st A = a + W holds
b3 . (z,A) = (z * a) + W );

definition
let V be Z_Module;
let W be Submodule of V;
func Z_ModuleQuot (V,W) -> strict Z_Module means :Def10: :: ZMODUL02:def 10
( the carrier of it = CosetSet (V,W) & the addF of it = addCoset (V,W) & 0. it = zeroCoset (V,W) & the Mult of it = lmultCoset (V,W) );
existence
ex b1 being strict Z_Module st
( the carrier of b1 = CosetSet (V,W) & the addF of b1 = addCoset (V,W) & 0. b1 = zeroCoset (V,W) & the Mult of b1 = lmultCoset (V,W) )
proof end;
uniqueness
for b1, b2 being strict Z_Module st the carrier of b1 = CosetSet (V,W) & the addF of b1 = addCoset (V,W) & 0. b1 = zeroCoset (V,W) & the Mult of b1 = lmultCoset (V,W) & the carrier of b2 = CosetSet (V,W) & the addF of b2 = addCoset (V,W) & 0. b2 = zeroCoset (V,W) & the Mult of b2 = lmultCoset (V,W) holds
b1 = b2
;
end;

:: deftheorem Def10 defines Z_ModuleQuot ZMODUL02:def 10 :
for V being Z_Module
for W being Submodule of V
for b3 being strict Z_Module holds
( b3 = Z_ModuleQuot (V,W) iff ( the carrier of b3 = CosetSet (V,W) & the addF of b3 = addCoset (V,W) & 0. b3 = zeroCoset (V,W) & the Mult of b3 = lmultCoset (V,W) ) );

theorem Th1: :: ZMODUL02:1
for p being Integer
for V being Z_Module
for W being Submodule of V
for x being VECTOR of (Z_ModuleQuot (V,W)) st W = p (*) V holds
p * x = 0. (Z_ModuleQuot (V,W))
proof end;

theorem Th2: :: ZMODUL02:2
for p, i being Integer
for V being Z_Module
for W being Submodule of V
for x being VECTOR of (Z_ModuleQuot (V,W)) st p <> 0 & W = p (*) V holds
i * x = (i mod p) * x
proof end;

theorem :: ZMODUL02:3
for p, q being Integer
for V being Z_Module
for W being Submodule of V
for v being VECTOR of V st W = p (*) V & p > 1 & q > 1 & p,q are_coprime & q * v = 0. V holds
v + W = 0. (Z_ModuleQuot (V,W))
proof end;

definition
let p be Prime;
let V be Z_Module;
func Mult_Mod_pV (V,p) -> Function of [: the carrier of (GF p), the carrier of (Z_ModuleQuot (V,(p (*) V))):], the carrier of (Z_ModuleQuot (V,(p (*) V))) means :Def11: :: ZMODUL02:def 11
for a being Element of (GF p)
for i being Integer
for x being Element of (Z_ModuleQuot (V,(p (*) V))) st a = i mod p holds
it . (a,x) = (i mod p) * x;
existence
ex b1 being Function of [: the carrier of (GF p), the carrier of (Z_ModuleQuot (V,(p (*) V))):], the carrier of (Z_ModuleQuot (V,(p (*) V))) st
for a being Element of (GF p)
for i being Integer
for x being Element of (Z_ModuleQuot (V,(p (*) V))) st a = i mod p holds
b1 . (a,x) = (i mod p) * x
proof end;
uniqueness
for b1, b2 being Function of [: the carrier of (GF p), the carrier of (Z_ModuleQuot (V,(p (*) V))):], the carrier of (Z_ModuleQuot (V,(p (*) V))) st ( for a being Element of (GF p)
for i being Integer
for x being Element of (Z_ModuleQuot (V,(p (*) V))) st a = i mod p holds
b1 . (a,x) = (i mod p) * x ) & ( for a being Element of (GF p)
for i being Integer
for x being Element of (Z_ModuleQuot (V,(p (*) V))) st a = i mod p holds
b2 . (a,x) = (i mod p) * x ) holds
b1 = b2
proof end;
end;

:: deftheorem Def11 defines Mult_Mod_pV ZMODUL02:def 11 :
for p being Prime
for V being Z_Module
for b3 being Function of [: the carrier of (GF p), the carrier of (Z_ModuleQuot (V,(p (*) V))):], the carrier of (Z_ModuleQuot (V,(p (*) V))) holds
( b3 = Mult_Mod_pV (V,p) iff for a being Element of (GF p)
for i being Integer
for x being Element of (Z_ModuleQuot (V,(p (*) V))) st a = i mod p holds
b3 . (a,x) = (i mod p) * x );

definition
let p be Prime;
let V be Z_Module;
func Z_MQ_VectSp (V,p) -> non empty strict VectSpStr over GF p equals :: ZMODUL02:def 12
VectSpStr(# the carrier of (Z_ModuleQuot (V,(p (*) V))), the addF of (Z_ModuleQuot (V,(p (*) V))), the ZeroF of (Z_ModuleQuot (V,(p (*) V))),(Mult_Mod_pV (V,p)) #);
coherence
VectSpStr(# the carrier of (Z_ModuleQuot (V,(p (*) V))), the addF of (Z_ModuleQuot (V,(p (*) V))), the ZeroF of (Z_ModuleQuot (V,(p (*) V))),(Mult_Mod_pV (V,p)) #) is non empty strict VectSpStr over GF p
;
end;

:: deftheorem defines Z_MQ_VectSp ZMODUL02:def 12 :
for p being Prime
for V being Z_Module holds Z_MQ_VectSp (V,p) = VectSpStr(# the carrier of (Z_ModuleQuot (V,(p (*) V))), the addF of (Z_ModuleQuot (V,(p (*) V))), the ZeroF of (Z_ModuleQuot (V,(p (*) V))),(Mult_Mod_pV (V,p)) #);

registration
let p be Prime;
let V be Z_Module;
cluster Z_MQ_VectSp (V,p) -> non empty right_complementable Abelian add-associative right_zeroed strict vector-distributive scalar-distributive scalar-associative scalar-unital ;
coherence
( Z_MQ_VectSp (V,p) is scalar-distributive & Z_MQ_VectSp (V,p) is vector-distributive & Z_MQ_VectSp (V,p) is scalar-associative & Z_MQ_VectSp (V,p) is scalar-unital & Z_MQ_VectSp (V,p) is add-associative & Z_MQ_VectSp (V,p) is right_zeroed & Z_MQ_VectSp (V,p) is right_complementable & Z_MQ_VectSp (V,p) is Abelian )
proof end;
end;

definition
let p be Prime;
let V be Z_Module;
let v be VECTOR of V;
func ZMtoMQV (V,p,v) -> Vector of (Z_MQ_VectSp (V,p)) equals :: ZMODUL02:def 13
v + (p (*) V);
correctness
coherence
v + (p (*) V) is Vector of (Z_MQ_VectSp (V,p))
;
proof end;
end;

:: deftheorem defines ZMtoMQV ZMODUL02:def 13 :
for p being Prime
for V being Z_Module
for v being VECTOR of V holds ZMtoMQV (V,p,v) = v + (p (*) V);

definition
let X be Z_Module;
func Mult_INT* X -> Function of [: the carrier of INT.Ring, the carrier of X:], the carrier of X equals :: ZMODUL02:def 14
the Mult of X;
correctness
coherence
the Mult of X is Function of [: the carrier of INT.Ring, the carrier of X:], the carrier of X
;
;
end;

:: deftheorem defines Mult_INT* ZMODUL02:def 14 :
for X being Z_Module holds Mult_INT* X = the Mult of X;

definition
let X be Z_Module;
func modetrans X -> non empty strict VectSpStr over INT.Ring equals :: ZMODUL02:def 15
VectSpStr(# the carrier of X, the addF of X, the ZeroF of X,(Mult_INT* X) #);
coherence
VectSpStr(# the carrier of X, the addF of X, the ZeroF of X,(Mult_INT* X) #) is non empty strict VectSpStr over INT.Ring
;
end;

:: deftheorem defines modetrans ZMODUL02:def 15 :
for X being Z_Module holds modetrans X = VectSpStr(# the carrier of X, the addF of X, the ZeroF of X,(Mult_INT* X) #);

registration
let X be Z_Module;
cluster modetrans X -> non empty right_complementable Abelian add-associative right_zeroed strict vector-distributive scalar-distributive scalar-associative scalar-unital ;
coherence
( modetrans X is Abelian & modetrans X is add-associative & modetrans X is right_zeroed & modetrans X is right_complementable & modetrans X is vector-distributive & modetrans X is scalar-distributive & modetrans X is scalar-associative & modetrans X is scalar-unital )
proof end;
end;

definition
let X be LeftMod of INT.Ring ;
func Mult_INT* X -> Function of [:INT, the carrier of X:], the carrier of X equals :: ZMODUL02:def 16
the lmult of X;
coherence
the lmult of X is Function of [:INT, the carrier of X:], the carrier of X
;
end;

:: deftheorem defines Mult_INT* ZMODUL02:def 16 :
for X being LeftMod of INT.Ring holds Mult_INT* X = the lmult of X;

definition
let X be LeftMod of INT.Ring ;
func modetrans X -> non empty strict Z_ModuleStruct equals :: ZMODUL02:def 17
Z_ModuleStruct(# the carrier of X, the ZeroF of X, the addF of X,(Mult_INT* X) #);
correctness
coherence
Z_ModuleStruct(# the carrier of X, the ZeroF of X, the addF of X,(Mult_INT* X) #) is non empty strict Z_ModuleStruct
;
;
end;

:: deftheorem defines modetrans ZMODUL02:def 17 :
for X being LeftMod of INT.Ring holds modetrans X = Z_ModuleStruct(# the carrier of X, the ZeroF of X, the addF of X,(Mult_INT* X) #);

registration
let X be LeftMod of INT.Ring ;
cluster modetrans X -> non empty right_complementable Abelian add-associative right_zeroed strict vector-distributive scalar-distributive scalar-associative scalar-unital ;
coherence
( modetrans X is Abelian & modetrans X is add-associative & modetrans X is right_zeroed & modetrans X is right_complementable & modetrans X is scalar-distributive & modetrans X is vector-distributive & modetrans X is scalar-associative & modetrans X is scalar-unital )
proof end;
end;

theorem :: ZMODUL02:4
for X being Z_Module
for v, w being Element of X
for v1, w1 being Element of (modetrans X) st v = v1 & w = w1 holds
( v + w = v1 + w1 & v - w = v1 - w1 )
proof end;

theorem :: ZMODUL02:5
for X being Z_Module
for v being Element of X
for v1 being Element of (modetrans X)
for a being Integer
for a1 being Element of INT.Ring st v = v1 & a = a1 holds
a * v = a1 * v1 ;

theorem :: ZMODUL02:6
for X being LeftMod of INT.Ring
for v, w being Element of X
for v1, w1 being Element of (modetrans X) st v = v1 & w = w1 holds
( v + w = v1 + w1 & v - w = v1 - w1 )
proof end;

theorem :: ZMODUL02:7
for X being LeftMod of INT.Ring
for v being Element of X
for v1 being Element of (modetrans X)
for a being Element of INT.Ring
for a1 being Integer st v = v1 & a = a1 holds
a * v = a1 * v1 ;

definition
let V be non empty ZeroStr ;
mode Z_Linear_Combination of V -> Element of Funcs ( the carrier of V,INT) means :Def18: :: ZMODUL02:def 18
ex T being finite Subset of V st
for v being Element of V st not v in T holds
it . v = 0 ;
existence
ex b1 being Element of Funcs ( the carrier of V,INT) ex T being finite Subset of V st
for v being Element of V st not v in T holds
b1 . v = 0
proof end;
end;

:: deftheorem Def18 defines Z_Linear_Combination ZMODUL02:def 18 :
for V being non empty ZeroStr
for b2 being Element of Funcs ( the carrier of V,INT) holds
( b2 is Z_Linear_Combination of V iff ex T being finite Subset of V st
for v being Element of V st not v in T holds
b2 . v = 0 );

definition
let V be non empty addLoopStr ;
let L be Z_Linear_Combination of V;
func Carrier L -> finite Subset of V equals :: ZMODUL02:def 19
{ v where v is Element of V : L . v <> 0 } ;
coherence
{ v where v is Element of V : L . v <> 0 } is finite Subset of V
proof end;
end;

:: deftheorem defines Carrier ZMODUL02:def 19 :
for V being non empty addLoopStr
for L being Z_Linear_Combination of V holds Carrier L = { v where v is Element of V : L . v <> 0 } ;

theorem :: ZMODUL02:8
for V being non empty addLoopStr
for L being Z_Linear_Combination of V
for v being Element of V holds
( L . v = 0 iff not v in Carrier L )
proof end;

definition
let V be non empty addLoopStr ;
func Z_ZeroLC V -> Z_Linear_Combination of V means :Def20: :: ZMODUL02:def 20
Carrier it = {} ;
existence
ex b1 being Z_Linear_Combination of V st Carrier b1 = {}
proof end;
uniqueness
for b1, b2 being Z_Linear_Combination of V st Carrier b1 = {} & Carrier b2 = {} holds
b1 = b2
proof end;
end;

:: deftheorem Def20 defines Z_ZeroLC ZMODUL02:def 20 :
for V being non empty addLoopStr
for b2 being Z_Linear_Combination of V holds
( b2 = Z_ZeroLC V iff Carrier b2 = {} );

theorem Th9: :: ZMODUL02:9
for V being non empty addLoopStr
for v being Element of V holds (Z_ZeroLC V) . v = 0
proof end;

definition
let V be non empty addLoopStr ;
let A be Subset of V;
mode Z_Linear_Combination of A -> Z_Linear_Combination of V means :Def21: :: ZMODUL02:def 21
Carrier it c= A;
existence
ex b1 being Z_Linear_Combination of V st Carrier b1 c= A
proof end;
end;

:: deftheorem Def21 defines Z_Linear_Combination ZMODUL02:def 21 :
for V being non empty addLoopStr
for A being Subset of V
for b3 being Z_Linear_Combination of V holds
( b3 is Z_Linear_Combination of A iff Carrier b3 c= A );

theorem Th10: :: ZMODUL02:10
for V being Z_Module
for A, B being Subset of V
for l being Z_Linear_Combination of A st A c= B holds
l is Z_Linear_Combination of B
proof end;

theorem Th11: :: ZMODUL02:11
for V being Z_Module
for A being Subset of V holds Z_ZeroLC V is Z_Linear_Combination of A
proof end;

theorem Th12: :: ZMODUL02:12
for V being Z_Module
for l being Z_Linear_Combination of {} the carrier of V holds l = Z_ZeroLC V
proof end;

definition
let V be Z_Module;
let F be FinSequence of V;
let f be Function of the carrier of V,INT;
func f (#) F -> FinSequence of V means :Def22: :: ZMODUL02:def 22
( len it = len F & ( for i being Element of NAT st i in dom it holds
it . i = (f . (F /. i)) * (F /. i) ) );
existence
ex b1 being FinSequence of V st
( len b1 = len F & ( for i being Element of NAT st i in dom b1 holds
b1 . i = (f . (F /. i)) * (F /. i) ) )
proof end;
uniqueness
for b1, b2 being FinSequence of V st len b1 = len F & ( for i being Element of NAT st i in dom b1 holds
b1 . i = (f . (F /. i)) * (F /. i) ) & len b2 = len F & ( for i being Element of NAT st i in dom b2 holds
b2 . i = (f . (F /. i)) * (F /. i) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def22 defines (#) ZMODUL02:def 22 :
for V being Z_Module
for F being FinSequence of V
for f being Function of the carrier of V,INT
for b4 being FinSequence of V holds
( b4 = f (#) F iff ( len b4 = len F & ( for i being Element of NAT st i in dom b4 holds
b4 . i = (f . (F /. i)) * (F /. i) ) ) );

theorem Th13: :: ZMODUL02:13
for V being Z_Module
for v being VECTOR of V
for F being FinSequence of V
for f being Function of the carrier of V,INT
for i being Element of NAT st i in dom F & v = F . i holds
(f (#) F) . i = (f . v) * v
proof end;

theorem :: ZMODUL02:14
for V being Z_Module
for f being Function of the carrier of V,INT holds f (#) (<*> the carrier of V) = <*> the carrier of V
proof end;

theorem Th15: :: ZMODUL02:15
for V being Z_Module
for v being VECTOR of V
for f being Function of the carrier of V,INT holds f (#) <*v*> = <*((f . v) * v)*>
proof end;

theorem Th16: :: ZMODUL02:16
for V being Z_Module
for v1, v2 being VECTOR of V
for f being Function of the carrier of V,INT holds f (#) <*v1,v2*> = <*((f . v1) * v1),((f . v2) * v2)*>
proof end;

theorem :: ZMODUL02:17
for V being Z_Module
for v1, v2, v3 being VECTOR of V
for f being Function of the carrier of V,INT holds f (#) <*v1,v2,v3*> = <*((f . v1) * v1),((f . v2) * v2),((f . v3) * v3)*>
proof end;

definition
let V be Z_Module;
let L be Z_Linear_Combination of V;
func Sum L -> Element of V means :Def23: :: ZMODUL02:def 23
ex F being FinSequence of V st
( F is one-to-one & rng F = Carrier L & it = Sum (L (#) F) );
existence
ex b1 being Element of V ex F being FinSequence of V st
( F is one-to-one & rng F = Carrier L & b1 = Sum (L (#) F) )
proof end;
uniqueness
for b1, b2 being Element of V st ex F being FinSequence of V st
( F is one-to-one & rng F = Carrier L & b1 = Sum (L (#) F) ) & ex F being FinSequence of V st
( F is one-to-one & rng F = Carrier L & b2 = Sum (L (#) F) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def23 defines Sum ZMODUL02:def 23 :
for V being Z_Module
for L being Z_Linear_Combination of V
for b3 being Element of V holds
( b3 = Sum L iff ex F being FinSequence of V st
( F is one-to-one & rng F = Carrier L & b3 = Sum (L (#) F) ) );

Lm1: for V being Z_Module holds Sum (Z_ZeroLC V) = 0. V
proof end;

theorem :: ZMODUL02:18
for V being Z_Module
for A being Subset of V holds
( ( A <> {} & A is linearly-closed ) iff for l being Z_Linear_Combination of A holds Sum l in A )
proof end;

theorem :: ZMODUL02:19
for V being Z_Module holds Sum (Z_ZeroLC V) = 0. V by Lm1;

theorem Th20: :: ZMODUL02:20
for V being Z_Module
for l being Z_Linear_Combination of {} the carrier of V holds Sum l = 0. V
proof end;

theorem Th21: :: ZMODUL02:21
for V being Z_Module
for v being VECTOR of V
for l being Z_Linear_Combination of {v} holds Sum l = (l . v) * v
proof end;

theorem Th22: :: ZMODUL02:22
for V being Z_Module
for v1, v2 being VECTOR of V st v1 <> v2 holds
for l being Z_Linear_Combination of {v1,v2} holds Sum l = ((l . v1) * v1) + ((l . v2) * v2)
proof end;

theorem :: ZMODUL02:23
for V being Z_Module
for L being Z_Linear_Combination of V st Carrier L = {} holds
Sum L = 0. V
proof end;

theorem Th24: :: ZMODUL02:24
for V being Z_Module
for v being VECTOR of V
for L being Z_Linear_Combination of V st Carrier L = {v} holds
Sum L = (L . v) * v
proof end;

theorem :: ZMODUL02:25
for V being Z_Module
for L being Z_Linear_Combination of V
for v1, v2 being VECTOR of V st Carrier L = {v1,v2} & v1 <> v2 holds
Sum L = ((L . v1) * v1) + ((L . v2) * v2)
proof end;

definition
let V be non empty addLoopStr ;
let L1, L2 be Z_Linear_Combination of V;
:: original: =
redefine pred L1 = L2 means :: ZMODUL02:def 24
for v being Element of V holds L1 . v = L2 . v;
compatibility
( L1 = L2 iff for v being Element of V holds L1 . v = L2 . v )
;
end;

:: deftheorem defines = ZMODUL02:def 24 :
for V being non empty addLoopStr
for L1, L2 being Z_Linear_Combination of V holds
( L1 = L2 iff for v being Element of V holds L1 . v = L2 . v );

definition
let V be non empty addLoopStr ;
let L1, L2 be Z_Linear_Combination of V;
:: original: +
redefine func L1 + L2 -> Z_Linear_Combination of V means :Def25: :: ZMODUL02:def 25
for v being Element of V holds it . v = (L1 . v) + (L2 . v);
coherence
L1 + L2 is Z_Linear_Combination of V
proof end;
compatibility
for b1 being Z_Linear_Combination of V holds
( b1 = L1 + L2 iff for v being Element of V holds b1 . v = (L1 . v) + (L2 . v) )
proof end;
commutativity
for b1, L1, L2 being Z_Linear_Combination of V st ( for v being Element of V holds b1 . v = (L1 . v) + (L2 . v) ) holds
for v being Element of V holds b1 . v = (L2 . v) + (L1 . v)
;
end;

:: deftheorem Def25 defines + ZMODUL02:def 25 :
for V being non empty addLoopStr
for L1, L2, b4 being Z_Linear_Combination of V holds
( b4 = L1 + L2 iff for v being Element of V holds b4 . v = (L1 . v) + (L2 . v) );

theorem Th26: :: ZMODUL02:26
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V holds Carrier (L1 + L2) c= (Carrier L1) \/ (Carrier L2)
proof end;

theorem Th27: :: ZMODUL02:27
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V
for A being Subset of V st L1 is Z_Linear_Combination of A & L2 is Z_Linear_Combination of A holds
L1 + L2 is Z_Linear_Combination of A
proof end;

theorem Th28: :: ZMODUL02:28
for V being Z_Module
for L1, L2, L3 being Z_Linear_Combination of V holds L1 + (L2 + L3) = (L1 + L2) + L3
proof end;

registration
let V be Z_Module;
let L be Z_Linear_Combination of V;
reduce L + (Z_ZeroLC V) to L;
reducibility
L + (Z_ZeroLC V) = L
proof end;
end;

definition
let V be Z_Module;
let a be Integer;
let L be Z_Linear_Combination of V;
func a * L -> Z_Linear_Combination of V means :Def26: :: ZMODUL02:def 26
for v being VECTOR of V holds it . v = a * (L . v);
existence
ex b1 being Z_Linear_Combination of V st
for v being VECTOR of V holds b1 . v = a * (L . v)
proof end;
uniqueness
for b1, b2 being Z_Linear_Combination of V st ( for v being VECTOR of V holds b1 . v = a * (L . v) ) & ( for v being VECTOR of V holds b2 . v = a * (L . v) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def26 defines * ZMODUL02:def 26 :
for V being Z_Module
for a being Integer
for L, b4 being Z_Linear_Combination of V holds
( b4 = a * L iff for v being VECTOR of V holds b4 . v = a * (L . v) );

theorem Th29: :: ZMODUL02:29
for V being Z_Module
for L being Z_Linear_Combination of V
for a being Integer st a <> 0 holds
Carrier (a * L) = Carrier L
proof end;

theorem Th30: :: ZMODUL02:30
for V being Z_Module
for L being Z_Linear_Combination of V holds 0 * L = Z_ZeroLC V
proof end;

theorem Th31: :: ZMODUL02:31
for V being Z_Module
for L being Z_Linear_Combination of V
for a being Integer
for A being Subset of V st L is Z_Linear_Combination of A holds
a * L is Z_Linear_Combination of A
proof end;

theorem Th32: :: ZMODUL02:32
for V being Z_Module
for L being Z_Linear_Combination of V
for a, b being Integer holds (a + b) * L = (a * L) + (b * L)
proof end;

theorem Th33: :: ZMODUL02:33
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V
for a being Integer holds a * (L1 + L2) = (a * L1) + (a * L2)
proof end;

theorem Th34: :: ZMODUL02:34
for V being Z_Module
for L being Z_Linear_Combination of V
for a, b being Integer holds a * (b * L) = (a * b) * L
proof end;

registration
let V be Z_Module;
let L be Z_Linear_Combination of V;
reduce 1 * L to L;
reducibility
1 * L = L
proof end;
end;

definition
let V be Z_Module;
let L be Z_Linear_Combination of V;
func - L -> Z_Linear_Combination of V equals :: ZMODUL02:def 27
(- 1) * L;
coherence
(- 1) * L is Z_Linear_Combination of V
;
involutiveness
for b1, b2 being Z_Linear_Combination of V st b1 = (- 1) * b2 holds
b2 = (- 1) * b1
proof end;
end;

:: deftheorem defines - ZMODUL02:def 27 :
for V being Z_Module
for L being Z_Linear_Combination of V holds - L = (- 1) * L;

theorem Th35: :: ZMODUL02:35
for V being Z_Module
for v being VECTOR of V
for L being Z_Linear_Combination of V holds (- L) . v = - (L . v)
proof end;

theorem :: ZMODUL02:36
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V st L1 + L2 = Z_ZeroLC V holds
L2 = - L1
proof end;

theorem :: ZMODUL02:37
for V being Z_Module
for L being Z_Linear_Combination of V holds Carrier (- L) = Carrier L by Th29;

theorem :: ZMODUL02:38
for V being Z_Module
for L being Z_Linear_Combination of V
for A being Subset of V st L is Z_Linear_Combination of A holds
- L is Z_Linear_Combination of A by Th31;

definition
let V be Z_Module;
let L1, L2 be Z_Linear_Combination of V;
func L1 - L2 -> Z_Linear_Combination of V equals :: ZMODUL02:def 28
L1 + (- L2);
correctness
coherence
L1 + (- L2) is Z_Linear_Combination of V
;
;
end;

:: deftheorem defines - ZMODUL02:def 28 :
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V holds L1 - L2 = L1 + (- L2);

theorem Th39: :: ZMODUL02:39
for V being Z_Module
for v being VECTOR of V
for L1, L2 being Z_Linear_Combination of V holds (L1 - L2) . v = (L1 . v) - (L2 . v)
proof end;

theorem :: ZMODUL02:40
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V holds Carrier (L1 - L2) c= (Carrier L1) \/ (Carrier L2)
proof end;

theorem :: ZMODUL02:41
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V
for A being Subset of V st L1 is Z_Linear_Combination of A & L2 is Z_Linear_Combination of A holds
L1 - L2 is Z_Linear_Combination of A
proof end;

theorem Th42: :: ZMODUL02:42
for V being Z_Module
for L being Z_Linear_Combination of V holds L - L = Z_ZeroLC V
proof end;

definition
let V be Z_Module;
func LinComb V -> set means :Def29: :: ZMODUL02:def 29
for x being set holds
( x in it iff x is Z_Linear_Combination of V );
existence
ex b1 being set st
for x being set holds
( x in b1 iff x is Z_Linear_Combination of V )
proof end;
uniqueness
for b1, b2 being set st ( for x being set holds
( x in b1 iff x is Z_Linear_Combination of V ) ) & ( for x being set holds
( x in b2 iff x is Z_Linear_Combination of V ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def29 defines LinComb ZMODUL02:def 29 :
for V being Z_Module
for b2 being set holds
( b2 = LinComb V iff for x being set holds
( x in b2 iff x is Z_Linear_Combination of V ) );

registration
let V be Z_Module;
cluster LinComb V -> non empty ;
coherence
not LinComb V is empty
proof end;
end;

definition
let V be Z_Module;
let e be Element of LinComb V;
func @ e -> Z_Linear_Combination of V equals :: ZMODUL02:def 30
e;
coherence
e is Z_Linear_Combination of V
by Def29;
end;

:: deftheorem defines @ ZMODUL02:def 30 :
for V being Z_Module
for e being Element of LinComb V holds @ e = e;

definition
let V be Z_Module;
let L be Z_Linear_Combination of V;
func @ L -> Element of LinComb V equals :: ZMODUL02:def 31
L;
coherence
L is Element of LinComb V
by Def29;
end;

:: deftheorem defines @ ZMODUL02:def 31 :
for V being Z_Module
for L being Z_Linear_Combination of V holds @ L = L;

definition
let V be Z_Module;
func LCAdd V -> BinOp of (LinComb V) means :Def32: :: ZMODUL02:def 32
for e1, e2 being Element of LinComb V holds it . (e1,e2) = (@ e1) + (@ e2);
existence
ex b1 being BinOp of (LinComb V) st
for e1, e2 being Element of LinComb V holds b1 . (e1,e2) = (@ e1) + (@ e2)
proof end;
uniqueness
for b1, b2 being BinOp of (LinComb V) st ( for e1, e2 being Element of LinComb V holds b1 . (e1,e2) = (@ e1) + (@ e2) ) & ( for e1, e2 being Element of LinComb V holds b2 . (e1,e2) = (@ e1) + (@ e2) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def32 defines LCAdd ZMODUL02:def 32 :
for V being Z_Module
for b2 being BinOp of (LinComb V) holds
( b2 = LCAdd V iff for e1, e2 being Element of LinComb V holds b2 . (e1,e2) = (@ e1) + (@ e2) );

definition
let V be Z_Module;
func LCMult V -> Function of [:INT,(LinComb V):],(LinComb V) means :Def33: :: ZMODUL02:def 33
for a being Integer
for e being Element of LinComb V holds it . [a,e] = a * (@ e);
existence
ex b1 being Function of [:INT,(LinComb V):],(LinComb V) st
for a being Integer
for e being Element of LinComb V holds b1 . [a,e] = a * (@ e)
proof end;
uniqueness
for b1, b2 being Function of [:INT,(LinComb V):],(LinComb V) st ( for a being Integer
for e being Element of LinComb V holds b1 . [a,e] = a * (@ e) ) & ( for a being Integer
for e being Element of LinComb V holds b2 . [a,e] = a * (@ e) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def33 defines LCMult ZMODUL02:def 33 :
for V being Z_Module
for b2 being Function of [:INT,(LinComb V):],(LinComb V) holds
( b2 = LCMult V iff for a being Integer
for e being Element of LinComb V holds b2 . [a,e] = a * (@ e) );

definition
let V be Z_Module;
func LC_Z_Module V -> Z_ModuleStruct equals :: ZMODUL02:def 34
Z_ModuleStruct(# (LinComb V),(@ (Z_ZeroLC V)),(LCAdd V),(LCMult V) #);
coherence
Z_ModuleStruct(# (LinComb V),(@ (Z_ZeroLC V)),(LCAdd V),(LCMult V) #) is Z_ModuleStruct
;
end;

:: deftheorem defines LC_Z_Module ZMODUL02:def 34 :
for V being Z_Module holds LC_Z_Module V = Z_ModuleStruct(# (LinComb V),(@ (Z_ZeroLC V)),(LCAdd V),(LCMult V) #);

registration
let V be Z_Module;
cluster LC_Z_Module V -> non empty strict ;
coherence
( LC_Z_Module V is strict & not LC_Z_Module V is empty )
;
end;

registration
let V be Z_Module;
cluster LC_Z_Module V -> right_complementable Abelian add-associative right_zeroed vector-distributive scalar-distributive scalar-associative scalar-unital ;
coherence
( LC_Z_Module V is Abelian & LC_Z_Module V is add-associative & LC_Z_Module V is right_zeroed & LC_Z_Module V is right_complementable & LC_Z_Module V is vector-distributive & LC_Z_Module V is scalar-distributive & LC_Z_Module V is scalar-associative & LC_Z_Module V is scalar-unital )
proof end;
end;

theorem :: ZMODUL02:43
for V being Z_Module holds the carrier of (LC_Z_Module V) = LinComb V ;

theorem :: ZMODUL02:44
for V being Z_Module holds 0. (LC_Z_Module V) = Z_ZeroLC V ;

theorem :: ZMODUL02:45
for V being Z_Module holds the addF of (LC_Z_Module V) = LCAdd V ;

theorem :: ZMODUL02:46
for V being Z_Module holds the Mult of (LC_Z_Module V) = LCMult V ;

theorem Th47: :: ZMODUL02:47
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V holds (vector ((LC_Z_Module V),L1)) + (vector ((LC_Z_Module V),L2)) = L1 + L2
proof end;

theorem Th48: :: ZMODUL02:48
for V being Z_Module
for L being Z_Linear_Combination of V
for a being Integer holds a * (vector ((LC_Z_Module V),L)) = a * L
proof end;

theorem Th49: :: ZMODUL02:49
for V being Z_Module
for L being Z_Linear_Combination of V holds - (vector ((LC_Z_Module V),L)) = - L
proof end;

theorem :: ZMODUL02:50
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V holds (vector ((LC_Z_Module V),L1)) - (vector ((LC_Z_Module V),L2)) = L1 - L2
proof end;

definition
let V be Z_Module;
let A be Subset of V;
func LC_Z_Module A -> strict Submodule of LC_Z_Module V means :: ZMODUL02:def 35
the carrier of it = { l where l is Z_Linear_Combination of A : verum } ;
existence
ex b1 being strict Submodule of LC_Z_Module V st the carrier of b1 = { l where l is Z_Linear_Combination of A : verum }
proof end;
uniqueness
for b1, b2 being strict Submodule of LC_Z_Module V st the carrier of b1 = { l where l is Z_Linear_Combination of A : verum } & the carrier of b2 = { l where l is Z_Linear_Combination of A : verum } holds
b1 = b2
by ZMODUL01:45;
end;

:: deftheorem defines LC_Z_Module ZMODUL02:def 35 :
for V being Z_Module
for A being Subset of V
for b3 being strict Submodule of LC_Z_Module V holds
( b3 = LC_Z_Module A iff the carrier of b3 = { l where l is Z_Linear_Combination of A : verum } );

Lm2: for V being Z_Module
for F, G being FinSequence of the carrier of V
for f being Function of the carrier of V,INT holds f (#) (F ^ G) = (f (#) F) ^ (f (#) G)

proof end;

theorem :: ZMODUL02:51
for V being Z_Module
for F, G being FinSequence of the carrier of V
for f being Function of the carrier of V,INT holds f (#) (F ^ G) = (f (#) F) ^ (f (#) G) by Lm2;

theorem Th52: :: ZMODUL02:52
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V holds Sum (L1 + L2) = (Sum L1) + (Sum L2)
proof end;

theorem Th53: :: ZMODUL02:53
for V being Z_Module
for a being Integer
for L being Z_Linear_Combination of V holds Sum (a * L) = a * (Sum L)
proof end;

theorem Th54: :: ZMODUL02:54
for V being Z_Module
for L being Z_Linear_Combination of V holds Sum (- L) = - (Sum L)
proof end;

theorem :: ZMODUL02:55
for V being Z_Module
for L1, L2 being Z_Linear_Combination of V holds Sum (L1 - L2) = (Sum L1) - (Sum L2)
proof end;

definition
let V be Z_Module;
let A be Subset of V;
attr A is linearly-independent means :: ZMODUL02:def 36
for l being Z_Linear_Combination of A st Sum l = 0. V holds
Carrier l = {} ;
end;

:: deftheorem defines linearly-independent ZMODUL02:def 36 :
for V being Z_Module
for A being Subset of V holds
( A is linearly-independent iff for l being Z_Linear_Combination of A st Sum l = 0. V holds
Carrier l = {} );

notation
let V be Z_Module;
let A be Subset of V;
antonym linearly-dependent A for linearly-independent ;
end;

theorem :: ZMODUL02:56
for V being Z_Module
for A, B being Subset of V st A c= B & B is linearly-independent holds
A is linearly-independent
proof end;

theorem Th57: :: ZMODUL02:57
for V being Z_Module
for A being Subset of V st A is linearly-independent holds
not 0. V in A
proof end;

theorem Th58: :: ZMODUL02:58
for V being Z_Module holds {} the carrier of V is linearly-independent
proof end;

registration
let V be Z_Module;
cluster linearly-independent for Element of bool the carrier of V;
existence
ex b1 being Subset of V st b1 is linearly-independent
proof end;
end;

theorem :: ZMODUL02:59
for V being Z_Module
for v being VECTOR of V st V is Mult-cancelable holds
( {v} is linearly-independent iff v <> 0. V )
proof end;

registration
let V be Z_Module;
cluster {(0. V)} -> linearly-dependent for Subset of V;
coherence
for b1 being Subset of V st b1 = {(0. V)} holds
not b1 is linearly-independent
proof end;
end;

theorem Th60: :: ZMODUL02:60
for V being Z_Module
for v1, v2 being VECTOR of V st {v1,v2} is linearly-independent holds
v1 <> 0. V
proof end;

theorem :: ZMODUL02:61
for V being Z_Module
for v being VECTOR of V holds {v,(0. V)} is linearly-dependent by Th60;

theorem Th62: :: ZMODUL02:62
for V being Z_Module
for v1, v2 being VECTOR of V st V is Mult-cancelable holds
( v1 <> v2 & {v1,v2} is linearly-independent iff ( v2 <> 0. V & ( for a, b being Integer st b <> 0 holds
b * v1 <> a * v2 ) ) )
proof end;

theorem :: ZMODUL02:63
for V being Z_Module
for v1, v2 being VECTOR of V st V is Mult-cancelable holds
( ( v1 <> v2 & {v1,v2} is linearly-independent ) iff for a, b being Integer st (a * v1) + (b * v2) = 0. V holds
( a = 0 & b = 0 ) )
proof end;

definition
let V be Z_Module;
let A be Subset of V;
func Lin A -> strict Submodule of V means :Def37: :: ZMODUL02:def 37
the carrier of it = { (Sum l) where l is Z_Linear_Combination of A : verum } ;
existence
ex b1 being strict Submodule of V st the carrier of b1 = { (Sum l) where l is Z_Linear_Combination of A : verum }
proof end;
uniqueness
for b1, b2 being strict Submodule of V st the carrier of b1 = { (Sum l) where l is Z_Linear_Combination of A : verum } & the carrier of b2 = { (Sum l) where l is Z_Linear_Combination of A : verum } holds
b1 = b2
by ZMODUL01:45;
end;

:: deftheorem Def37 defines Lin ZMODUL02:def 37 :
for V being Z_Module
for A being Subset of V
for b3 being strict Submodule of V holds
( b3 = Lin A iff the carrier of b3 = { (Sum l) where l is Z_Linear_Combination of A : verum } );

theorem Th64: :: ZMODUL02:64
for x being set
for V being Z_Module
for A being Subset of V holds
( x in Lin A iff ex l being Z_Linear_Combination of A st x = Sum l )
proof end;

theorem Th65: :: ZMODUL02:65
for x being set
for V being Z_Module
for A being Subset of V st x in A holds
x in Lin A
proof end;

theorem Th66: :: ZMODUL02:66
for V being Z_Module
for x being object holds
( x in (0). V iff x = 0. V )
proof end;

theorem :: ZMODUL02:67
for V being Z_Module holds Lin ({} the carrier of V) = (0). V
proof end;

theorem :: ZMODUL02:68
for V being Z_Module
for A being Subset of V holds
( not Lin A = (0). V or A = {} or A = {(0. V)} )
proof end;

theorem :: ZMODUL02:69
for V being strict Z_Module
for A being Subset of V st A = the carrier of V holds
Lin A = V
proof end;

Lm3: for V being Z_Module
for W1, W2, W3 being Submodule of V st W1 is Submodule of W2 & W1 is Submodule of W3 holds
W1 is Submodule of W2 /\ W3

proof end;

Lm4: for V being Z_Module
for W1, W2, W3 being Submodule of V st W1 is Submodule of W3 & W2 is Submodule of W3 holds
W1 + W2 is Submodule of W3

proof end;

theorem Th70: :: ZMODUL02:70
for V being Z_Module
for A, B being Subset of V st A c= B holds
Lin A is Submodule of Lin B
proof end;

theorem :: ZMODUL02:71
for V being strict Z_Module
for A, B being Subset of V st Lin A = V & A c= B holds
Lin B = V
proof end;

theorem :: ZMODUL02:72
for V being Z_Module
for A, B being Subset of V holds Lin (A \/ B) = (Lin A) + (Lin B)
proof end;

theorem :: ZMODUL02:73
for V being Z_Module
for A, B being Subset of V holds Lin (A /\ B) is Submodule of (Lin A) /\ (Lin B)
proof end;

theorem :: ZMODUL02:74
for V being Z_Module
for W1, W2, W3 being Submodule of V st W1 is Submodule of W3 holds
W1 /\ W2 is Submodule of W3
proof end;

theorem :: ZMODUL02:75
for V being Z_Module
for W1, W2, W3 being Submodule of V st W1 is Submodule of W2 & W1 is Submodule of W3 holds
W1 is Submodule of W2 /\ W3 by Lm3;

theorem :: ZMODUL02:76
for V being Z_Module
for W1, W2, W3 being Submodule of V st W1 is Submodule of W3 & W2 is Submodule of W3 holds
W1 + W2 is Submodule of W3 by Lm4;

theorem :: ZMODUL02:77
for V being Z_Module
for W1, W2, W3 being Submodule of V st W1 is Submodule of W2 holds
W1 is Submodule of W2 + W3
proof end;