:: RLVECT_1 semantic presentation

definition
attr a1 is strict;
struct LoopStr -> ZeroStr ;
aggr LoopStr(# carrier, add, Zero #) -> LoopStr ;
sel add c1 -> BinOp of the carrier of a1;
end;

definition
attr a1 is strict;
struct RLSStruct -> LoopStr ;
aggr RLSStruct(# carrier, Zero, add, Mult #) -> RLSStruct ;
sel Mult c1 -> Function of [:REAL ,the carrier of a1:],the carrier of a1;
end;

registration
cluster non empty RLSStruct ;
existence
not for b1 being RLSStruct holds b1 is empty
proof end;
end;

definition
let c1 be RLSStruct ;
mode VECTOR of a1 is Element of a1;
end;

definition
let c1 be 1-sorted ;
let c2 be set ;
pred c2 in c1 means :Def1: :: RLVECT_1:def 1
a2 in the carrier of a1;
end;

:: deftheorem Def1 defines in RLVECT_1:def 1 :
for b1 being 1-sorted
for b2 being set holds
( b2 in b1 iff b2 in the carrier of b1 );

theorem Th1: :: RLVECT_1:1
canceled;

theorem Th2: :: RLVECT_1:2
canceled;

theorem Th3: :: RLVECT_1:3
for b1 being non empty 1-sorted
for b2 being Element of b1 holds b2 in b1 by Def1;

definition
let c1 be ZeroStr ;
func 0. c1 -> Element of a1 equals :: RLVECT_1:def 2
the Zero of a1;
coherence
the Zero of c1 is Element of c1
;
end;

:: deftheorem Def2 defines 0. RLVECT_1:def 2 :
for b1 being ZeroStr holds 0. b1 = the Zero of b1;

registration
cluster non empty strict LoopStr ;
existence
ex b1 being LoopStr st
( b1 is strict & not b1 is empty )
proof end;
end;

definition
let c1 be non empty LoopStr ;
let c2, c3 be Element of c1;
func c2 + c3 -> Element of a1 equals :: RLVECT_1:def 3
the add of a1 . [a2,a3];
coherence
the add of c1 . [c2,c3] is Element of c1
;
end;

:: deftheorem Def3 defines + RLVECT_1:def 3 :
for b1 being non empty LoopStr
for b2, b3 being Element of b1 holds b2 + b3 = the add of b1 . [b2,b3];

definition
let c1 be non empty RLSStruct ;
let c2 be VECTOR of c1;
let c3 be Real;
func c3 * c2 -> Element of a1 equals :: RLVECT_1:def 4
the Mult of a1 . [a3,a2];
coherence
the Mult of c1 . [c3,c2] is Element of c1
;
end;

:: deftheorem Def4 defines * RLVECT_1:def 4 :
for b1 being non empty RLSStruct
for b2 being VECTOR of b1
for b3 being Real holds b3 * b2 = the Mult of b1 . [b3,b2];

theorem Th4: :: RLVECT_1:4
canceled;

theorem Th5: :: RLVECT_1:5
for b1 being non empty LoopStr
for b2, b3 being Element of b1 holds b2 + b3 = the add of b1 . b2,b3 ;

registration
let c1 be non empty set ;
let c2 be Element of c1;
let c3 be BinOp of c1;
let c4 be Function of [:REAL ,c1:],c1;
cluster RLSStruct(# a1,a2,a3,a4 #) -> non empty ;
coherence
not RLSStruct(# c1,c2,c3,c4 #) is empty
by STRUCT_0:def 1;
end;

E2: now
take c1 = {0};
reconsider c2 = 0 as Element of c1 by TARSKI:def 1;
take c3 = c2;
deffunc H1( Element of c1, Element of c1) -> Element of c1 = c3;
consider c4 being BinOp of c1 such that
E3: for b1, b2 being Element of c1 holds c4 . b1,b2 = H1(b1,b2) from BINOP_1:sch 2();
deffunc H2( Element of REAL , Element of c1) -> Element of c1 = c3;
consider c5 being Function of [:REAL ,c1:],c1 such that
E4: for b1 being Element of REAL
for b2 being Element of c1 holds c5 . [b1,b2] = H2(b1,b2) from FUNCT_2:sch 8();
take c6 = c4;
take c7 = c5;
set c8 = RLSStruct(# c1,c3,c6,c7 #);
thus for b1, b2 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) holds b1 + b2 = b2 + b1
proof
let c9, c10 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
E5: ( c9 + c10 = c6 . c9,c10 & c10 + c9 = c6 . c10,c9 ) ;
reconsider c11 = c9, c12 = c10 as Element of c1 ;
( c9 + c10 = H1(c11,c12) & c10 + c9 = H1(c12,c11) ) by E3, E5;
hence c9 + c10 = c10 + c9 ;
end;
thus for b1, b2, b3 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) holds (b1 + b2) + b3 = b1 + (b2 + b3)
proof
let c9, c10, c11 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
E5: ( (c9 + c10) + c11 = c6 . (c9 + c10),c11 & c9 + (c10 + c11) = c6 . c9,(c10 + c11) ) ;
reconsider c12 = c9, c13 = c10, c14 = c11 as Element of c1 ;
( (c9 + c10) + c11 = H1(H1(c12,c13),c14) & c9 + (c10 + c11) = H1(c12,H1(c13,c14)) ) by E3, E5;
hence (c9 + c10) + c11 = c9 + (c10 + c11) ;
end;
thus for b1 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) holds b1 + (0. RLSStruct(# c1,c3,c6,c7 #)) = b1
proof
let c9 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
reconsider c10 = c9 as Element of c1 ;
c9 + (0. RLSStruct(# c1,c3,c6,c7 #)) = c6 . [c9,(0. RLSStruct(# c1,c3,c6,c7 #))]
.= c6 . c9,(0. RLSStruct(# c1,c3,c6,c7 #))
.= H1(c10,c3) by E3 ;
hence c9 + (0. RLSStruct(# c1,c3,c6,c7 #)) = c9 by TARSKI:def 1;
end;
thus for b1 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) ex b2 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) st b1 + b2 = 0. RLSStruct(# c1,c3,c6,c7 #)
proof
let c9 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
reconsider c10 = c3 as VECTOR of RLSStruct(# c1,c3,c6,c7 #) ;
take c10 ;
thus c9 + c10 = c6 . [c9,c10]
.= c6 . c9,c10
.= the Zero of RLSStruct(# c1,c3,c6,c7 #) by E3
.= 0. RLSStruct(# c1,c3,c6,c7 #) ;
end;
thus for b1 being Real
for b2, b3 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) holds b1 * (b2 + b3) = (b1 * b2) + (b1 * b3)
proof
let c9 be Real;
let c10, c11 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
reconsider c12 = c10, c13 = c11 as Element of c1 ;
(c9 * c10) + (c9 * c11) = c6 . [(c9 * c10),(c9 * c11)]
.= c6 . (c9 * c10),(c9 * c11)
.= H1(H2(c9,c12),H2(c9,c13)) by E3 ;
hence c9 * (c10 + c11) = (c9 * c10) + (c9 * c11) by E4;
end;
thus for b1, b2 being Real
for b3 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) holds (b1 + b2) * b3 = (b1 * b3) + (b2 * b3)
proof
let c9, c10 be Real;
let c11 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
set c12 = c9 + c10;
reconsider c13 = c11 as Element of c1 ;
E5: (c9 + c10) * c11 = c7 . [(c9 + c10),c11]
.= H2(c9 + c10,c13) by E4 ;
(c9 * c11) + (c10 * c11) = c6 . [(c9 * c11),(c10 * c11)]
.= c6 . (c9 * c11),(c10 * c11)
.= H1(H2(c9,c13),H2(c10,c13)) by E3 ;
hence (c9 + c10) * c11 = (c9 * c11) + (c10 * c11) by E5;
end;
thus for b1, b2 being Real
for b3 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) holds (b1 * b2) * b3 = b1 * (b2 * b3)
proof
let c9, c10 be Real;
let c11 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
set c12 = c9 * c10;
reconsider c13 = c11 as Element of c1 ;
E5: (c9 * c10) * c11 = c7 . [(c9 * c10),c11]
.= H2(c9 * c10,c13) by E4 ;
c9 * (c10 * c11) = c7 . [c9,(c10 * c11)]
.= H2(c9,H2(c10,c13)) by E4 ;
hence (c9 * c10) * c11 = c9 * (c10 * c11) by E5;
end;
thus for b1 being VECTOR of RLSStruct(# c1,c3,c6,c7 #) holds 1 * b1 = b1
proof
let c9 be VECTOR of RLSStruct(# c1,c3,c6,c7 #);
reconsider c10 = c9 as Element of c1 ;
reconsider c11 = 1 as Element of REAL ;
1 * c9 = c7 . [1,c9]
.= H2(c11,c10) by E4 ;
hence 1 * c9 = c9 by TARSKI:def 1;
end;
end;

definition
let c1 be non empty LoopStr ;
attr a1 is Abelian means :Def5: :: RLVECT_1:def 5
for b1, b2 being Element of a1 holds b1 + b2 = b2 + b1;
attr a1 is add-associative means :Def6: :: RLVECT_1:def 6
for b1, b2, b3 being Element of a1 holds (b1 + b2) + b3 = b1 + (b2 + b3);
attr a1 is right_zeroed means :Def7: :: RLVECT_1:def 7
for b1 being Element of a1 holds b1 + (0. a1) = b1;
attr a1 is right_complementable means :Def8: :: RLVECT_1:def 8
for b1 being Element of a1 ex b2 being Element of a1 st b1 + b2 = 0. a1;
end;

:: deftheorem Def5 defines Abelian RLVECT_1:def 5 :
for b1 being non empty LoopStr holds
( b1 is Abelian iff for b2, b3 being Element of b1 holds b2 + b3 = b3 + b2 );

:: deftheorem Def6 defines add-associative RLVECT_1:def 6 :
for b1 being non empty LoopStr holds
( b1 is add-associative iff for b2, b3, b4 being Element of b1 holds (b2 + b3) + b4 = b2 + (b3 + b4) );

:: deftheorem Def7 defines right_zeroed RLVECT_1:def 7 :
for b1 being non empty LoopStr holds
( b1 is right_zeroed iff for b2 being Element of b1 holds b2 + (0. b1) = b2 );

:: deftheorem Def8 defines right_complementable RLVECT_1:def 8 :
for b1 being non empty LoopStr holds
( b1 is right_complementable iff for b2 being Element of b1 ex b3 being Element of b1 st b2 + b3 = 0. b1 );

definition
let c1 be non empty RLSStruct ;
attr a1 is RealLinearSpace-like means :Def9: :: RLVECT_1:def 9
( ( for b1 being Real
for b2, b3 being VECTOR of a1 holds b1 * (b2 + b3) = (b1 * b2) + (b1 * b3) ) & ( for b1, b2 being Real
for b3 being VECTOR of a1 holds (b1 + b2) * b3 = (b1 * b3) + (b2 * b3) ) & ( for b1, b2 being Real
for b3 being VECTOR of a1 holds (b1 * b2) * b3 = b1 * (b2 * b3) ) & ( for b1 being VECTOR of a1 holds 1 * b1 = b1 ) );
end;

:: deftheorem Def9 defines RealLinearSpace-like RLVECT_1:def 9 :
for b1 being non empty RLSStruct holds
( b1 is RealLinearSpace-like iff ( ( for b2 being Real
for b3, b4 being VECTOR of b1 holds b2 * (b3 + b4) = (b2 * b3) + (b2 * b4) ) & ( for b2, b3 being Real
for b4 being VECTOR of b1 holds (b2 + b3) * b4 = (b2 * b4) + (b3 * b4) ) & ( for b2, b3 being Real
for b4 being VECTOR of b1 holds (b2 * b3) * b4 = b2 * (b3 * b4) ) & ( for b2 being VECTOR of b1 holds 1 * b2 = b2 ) ) );

registration
cluster non empty strict Abelian add-associative right_zeroed right_complementable LoopStr ;
existence
ex b1 being non empty LoopStr st
( b1 is strict & b1 is Abelian & b1 is add-associative & b1 is right_zeroed & b1 is right_complementable )
proof end;
end;

registration
cluster non empty strict Abelian add-associative right_zeroed right_complementable RealLinearSpace-like RLSStruct ;
existence
ex b1 being non empty RLSStruct st
( not b1 is empty & b1 is strict & b1 is Abelian & b1 is add-associative & b1 is right_zeroed & b1 is right_complementable & b1 is RealLinearSpace-like )
proof end;
end;

definition
mode RealLinearSpace is non empty Abelian add-associative right_zeroed right_complementable RealLinearSpace-like RLSStruct ;
end;

definition
let c1 be non empty Abelian LoopStr ;
let c2, c3 be Element of c1;
redefine func + as c2 + c3 -> Element of a1;
commutativity
for b1, b2 being Element of c1 holds b1 + b2 = b2 + b1
by Def5;
end;

theorem Th6: :: RLVECT_1:6
canceled;

theorem Th7: :: RLVECT_1:7
for b1 being non empty RLSStruct st ( for b2, b3 being VECTOR of b1 holds b2 + b3 = b3 + b2 ) & ( for b2, b3, b4 being VECTOR of b1 holds (b2 + b3) + b4 = b2 + (b3 + b4) ) & ( for b2 being VECTOR of b1 holds b2 + (0. b1) = b2 ) & ( for b2 being VECTOR of b1 ex b3 being VECTOR of b1 st b2 + b3 = 0. b1 ) & ( for b2 being Real
for b3, b4 being VECTOR of b1 holds b2 * (b3 + b4) = (b2 * b3) + (b2 * b4) ) & ( for b2, b3 being Real
for b4 being VECTOR of b1 holds (b2 + b3) * b4 = (b2 * b4) + (b3 * b4) ) & ( for b2, b3 being Real
for b4 being VECTOR of b1 holds (b2 * b3) * b4 = b2 * (b3 * b4) ) & ( for b2 being VECTOR of b1 holds 1 * b2 = b2 ) holds
b1 is RealLinearSpace by Def5, Def6, Def7, Def8, Def9;

Lemma8: for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 st b2 + b3 = 0. b1 holds
b3 + b2 = 0. b1
proof end;

theorem Th8: :: RLVECT_1:8
canceled;

theorem Th9: :: RLVECT_1:9
canceled;

theorem Th10: :: RLVECT_1:10
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds
( b2 + (0. b1) = b2 & (0. b1) + b2 = b2 )
proof end;

definition
let c1 be non empty LoopStr ;
let c2 be Element of c1;
assume E10: ( c1 is add-associative & c1 is right_zeroed & c1 is right_complementable ) ;
func - c2 -> Element of a1 means :Def10: :: RLVECT_1:def 10
a2 + a3 = 0. a1;
existence
ex b1 being Element of c1 st c2 + b1 = 0. c1
by E10, Def8;
uniqueness
for b1, b2 being Element of c1 st c2 + b1 = 0. c1 & c2 + b2 = 0. c1 holds
b1 = b2
proof end;
end;

:: deftheorem Def10 defines - RLVECT_1:def 10 :
for b1 being non empty LoopStr
for b2 being Element of b1 st b1 is add-associative & b1 is right_zeroed & b1 is right_complementable holds
for b3 being Element of b1 holds
( b3 = - b2 iff b2 + b3 = 0. b1 );

Lemma11: for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 ex b4 being Element of b1 st b2 + b4 = b3
proof end;

definition
let c1 be non empty LoopStr ;
let c2, c3 be Element of c1;
func c2 - c3 -> Element of a1 equals :: RLVECT_1:def 11
a2 + (- a3);
correctness
coherence
c2 + (- c3) is Element of c1
;
;
end;

:: deftheorem Def11 defines - RLVECT_1:def 11 :
for b1 being non empty LoopStr
for b2, b3 being Element of b1 holds b2 - b3 = b2 + (- b3);

theorem Th11: :: RLVECT_1:11
canceled;

theorem Th12: :: RLVECT_1:12
canceled;

theorem Th13: :: RLVECT_1:13
canceled;

theorem Th14: :: RLVECT_1:14
canceled;

theorem Th15: :: RLVECT_1:15
canceled;

theorem Th16: :: RLVECT_1:16
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds
( b2 + (- b2) = 0. b1 & (- b2) + b2 = 0. b1 )
proof end;

theorem Th17: :: RLVECT_1:17
canceled;

theorem Th18: :: RLVECT_1:18
canceled;

theorem Th19: :: RLVECT_1:19
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 st b2 + b3 = 0. b1 holds
b2 = - b3
proof end;

theorem Th20: :: RLVECT_1:20
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 ex b4 being Element of b1 st b2 + b4 = b3 by Lemma11;

theorem Th21: :: RLVECT_1:21
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4, b5 being Element of b1 st ( b2 + b4 = b2 + b5 or b4 + b2 = b5 + b2 ) holds
b4 = b5
proof end;

theorem Th22: :: RLVECT_1:22
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 st ( b2 + b3 = b2 or b3 + b2 = b2 ) holds
b3 = 0. b1
proof end;

theorem Th23: :: RLVECT_1:23
for b1 being Real
for b2 being RealLinearSpace
for b3 being VECTOR of b2 st ( b1 = 0 or b3 = 0. b2 ) holds
b1 * b3 = 0. b2
proof end;

theorem Th24: :: RLVECT_1:24
for b1 being Real
for b2 being RealLinearSpace
for b3 being VECTOR of b2 holds
( not b1 * b3 = 0. b2 or b1 = 0 or b3 = 0. b2 )
proof end;

theorem Th25: :: RLVECT_1:25
for b1 being non empty add-associative right_zeroed right_complementable LoopStr holds - (0. b1) = 0. b1
proof end;

theorem Th26: :: RLVECT_1:26
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds b2 - (0. b1) = b2
proof end;

theorem Th27: :: RLVECT_1:27
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds (0. b1) - b2 = - b2 by Th10;

theorem Th28: :: RLVECT_1:28
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds b2 - b2 = 0. b1 by Def10;

theorem Th29: :: RLVECT_1:29
for b1 being RealLinearSpace
for b2 being VECTOR of b1 holds - b2 = (- 1) * b2
proof end;

theorem Th30: :: RLVECT_1:30
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds - (- b2) = b2
proof end;

theorem Th31: :: RLVECT_1:31
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 st - b2 = - b3 holds
b2 = b3
proof end;

theorem Th32: :: RLVECT_1:32
canceled;

theorem Th33: :: RLVECT_1:33
for b1 being RealLinearSpace
for b2 being VECTOR of b1 st b2 = - b2 holds
b2 = 0. b1
proof end;

theorem Th34: :: RLVECT_1:34
for b1 being RealLinearSpace
for b2 being VECTOR of b1 st b2 + b2 = 0. b1 holds
b2 = 0. b1
proof end;

theorem Th35: :: RLVECT_1:35
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 st b2 - b3 = 0. b1 holds
b2 = b3
proof end;

theorem Th36: :: RLVECT_1:36
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 ex b4 being Element of b1 st b3 - b4 = b2
proof end;

theorem Th37: :: RLVECT_1:37
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 st b2 - b3 = b2 - b4 holds
b3 = b4
proof end;

theorem Th38: :: RLVECT_1:38
for b1 being Real
for b2 being RealLinearSpace
for b3 being VECTOR of b2 holds b1 * (- b3) = (- b1) * b3
proof end;

theorem Th39: :: RLVECT_1:39
for b1 being Real
for b2 being RealLinearSpace
for b3 being VECTOR of b2 holds b1 * (- b3) = - (b1 * b3)
proof end;

theorem Th40: :: RLVECT_1:40
for b1 being Real
for b2 being RealLinearSpace
for b3 being VECTOR of b2 holds (- b1) * (- b3) = b1 * b3
proof end;

Lemma27: for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds - (b2 + b3) = (- b3) + (- b2)
proof end;

theorem Th41: :: RLVECT_1:41
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds b2 - (b3 + b4) = (b2 - b4) - b3
proof end;

theorem Th42: :: RLVECT_1:42
for b1 being non empty add-associative LoopStr
for b2, b3, b4 being Element of b1 holds (b2 + b3) - b4 = b2 + (b3 - b4) by Def6;

theorem Th43: :: RLVECT_1:43
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds b2 - (b3 - b4) = (b2 - b3) + b4
proof end;

theorem Th44: :: RLVECT_1:44
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds - (b2 + b3) = (- b3) - b2
proof end;

theorem Th45: :: RLVECT_1:45
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds - (b2 + b3) = (- b3) + (- b2) by Lemma27;

theorem Th46: :: RLVECT_1:46
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds (- b2) - b3 = (- b3) - b2
proof end;

theorem Th47: :: RLVECT_1:47
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds - (b2 - b3) = b3 + (- b2)
proof end;

theorem Th48: :: RLVECT_1:48
for b1 being Real
for b2 being RealLinearSpace
for b3, b4 being VECTOR of b2 holds b1 * (b3 - b4) = (b1 * b3) - (b1 * b4)
proof end;

theorem Th49: :: RLVECT_1:49
for b1, b2 being Real
for b3 being RealLinearSpace
for b4 being VECTOR of b3 holds (b1 - b2) * b4 = (b1 * b4) - (b2 * b4)
proof end;

theorem Th50: :: RLVECT_1:50
for b1 being Real
for b2 being RealLinearSpace
for b3, b4 being VECTOR of b2 st b1 <> 0 & b1 * b3 = b1 * b4 holds
b3 = b4
proof end;

theorem Th51: :: RLVECT_1:51
for b1, b2 being Real
for b3 being RealLinearSpace
for b4 being VECTOR of b3 st b4 <> 0. b3 & b1 * b4 = b2 * b4 holds
b1 = b2
proof end;

definition
let c1 be non empty 1-sorted ;
let c2, c3 be Element of c1;
redefine func <* as <*c2,c3*> -> FinSequence of the carrier of a1;
coherence
<*c2,c3*> is FinSequence of the carrier of c1
proof end;
end;

definition
let c1 be non empty 1-sorted ;
let c2, c3, c4 be Element of c1;
redefine func <* as <*c2,c3,c4*> -> FinSequence of the carrier of a1;
coherence
<*c2,c3,c4*> is FinSequence of the carrier of c1
proof end;
end;

definition
let c1 be non empty LoopStr ;
let c2 be FinSequence of the carrier of c1;
func Sum c2 -> Element of a1 means :Def12: :: RLVECT_1:def 12
ex b1 being Function of NAT ,the carrier of a1 st
( a3 = b1 . (len a2) & b1 . 0 = 0. a1 & ( for b2 being Nat
for b3 being Element of a1 st b2 < len a2 & b3 = a2 . (b2 + 1) holds
b1 . (b2 + 1) = (b1 . b2) + b3 ) );
existence
ex b1 being Element of c1ex b2 being Function of NAT ,the carrier of c1 st
( b1 = b2 . (len c2) & b2 . 0 = 0. c1 & ( for b3 being Nat
for b4 being Element of c1 st b3 < len c2 & b4 = c2 . (b3 + 1) holds
b2 . (b3 + 1) = (b2 . b3) + b4 ) )
proof end;
uniqueness
for b1, b2 being Element of c1 st ex b3 being Function of NAT ,the carrier of c1 st
( b1 = b3 . (len c2) & b3 . 0 = 0. c1 & ( for b4 being Nat
for b5 being Element of c1 st b4 < len c2 & b5 = c2 . (b4 + 1) holds
b3 . (b4 + 1) = (b3 . b4) + b5 ) ) & ex b3 being Function of NAT ,the carrier of c1 st
( b2 = b3 . (len c2) & b3 . 0 = 0. c1 & ( for b4 being Nat
for b5 being Element of c1 st b4 < len c2 & b5 = c2 . (b4 + 1) holds
b3 . (b4 + 1) = (b3 . b4) + b5 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def12 defines Sum RLVECT_1:def 12 :
for b1 being non empty LoopStr
for b2 being FinSequence of the carrier of b1
for b3 being Element of b1 holds
( b3 = Sum b2 iff ex b4 being Function of NAT ,the carrier of b1 st
( b3 = b4 . (len b2) & b4 . 0 = 0. b1 & ( for b5 being Nat
for b6 being Element of b1 st b5 < len b2 & b6 = b2 . (b5 + 1) holds
b4 . (b5 + 1) = (b4 . b5) + b6 ) ) );

Lemma33: for b1 being non empty LoopStr holds Sum (<*> the carrier of b1) = 0. b1
proof end;

Lemma34: for b1 being non empty LoopStr
for b2 being FinSequence of the carrier of b1 st len b2 = 0 holds
Sum b2 = 0. b1
proof end;

theorem Th52: :: RLVECT_1:52
canceled;

theorem Th53: :: RLVECT_1:53
canceled;

theorem Th54: :: RLVECT_1:54
for b1 being non empty LoopStr
for b2 being FinSequence of the carrier of b1
for b3, b4 being Nat st b3 in Seg b4 & len b2 = b4 holds
b2 . b3 is Element of b1
proof end;

theorem Th55: :: RLVECT_1:55
for b1 being non empty LoopStr
for b2, b3 being FinSequence of the carrier of b1
for b4 being Element of b1 st len b2 = (len b3) + 1 & b3 = b2 | (dom b3) & b4 = b2 . (len b2) holds
Sum b2 = (Sum b3) + b4
proof end;

theorem Th56: :: RLVECT_1:56
for b1 being Real
for b2 being RealLinearSpace
for b3, b4 being FinSequence of the carrier of b2 st len b3 = len b4 & ( for b5 being Nat
for b6 being VECTOR of b2 st b5 in dom b3 & b6 = b4 . b5 holds
b3 . b5 = b1 * b6 ) holds
Sum b3 = b1 * (Sum b4)
proof end;

theorem Th57: :: RLVECT_1:57
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3 being FinSequence of the carrier of b1 st len b2 = len b3 & ( for b4 being Nat
for b5 being Element of b1 st b4 in dom b2 & b5 = b3 . b4 holds
b2 . b4 = - b5 ) holds
Sum b2 = - (Sum b3)
proof end;

Lemma37: for b1 being natural number st b1 < 1 holds
b1 = 0
by NAT_1:39;

theorem Th58: :: RLVECT_1:58
for b1 being non empty add-associative right_zeroed LoopStr
for b2, b3 being FinSequence of the carrier of b1 holds Sum (b2 ^ b3) = (Sum b2) + (Sum b3)
proof end;

Lemma39: for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds Sum <*b2*> = b2
proof end;

theorem Th59: :: RLVECT_1:59
for b1 being non empty Abelian add-associative right_zeroed LoopStr
for b2, b3 being FinSequence of the carrier of b1 st rng b2 = rng b3 & b2 is one-to-one & b3 is one-to-one holds
Sum b2 = Sum b3
proof end;

theorem Th60: :: RLVECT_1:60
for b1 being non empty LoopStr holds Sum (<*> the carrier of b1) = 0. b1 by Lemma33;

theorem Th61: :: RLVECT_1:61
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds Sum <*b2*> = b2 by Lemma39;

theorem Th62: :: RLVECT_1:62
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds Sum <*b2,b3*> = b2 + b3
proof end;

theorem Th63: :: RLVECT_1:63
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b2,b3,b4*> = (b2 + b3) + b4
proof end;

theorem Th64: :: RLVECT_1:64
for b1 being RealLinearSpace
for b2 being Real holds b2 * (Sum (<*> the carrier of b1)) = 0. b1
proof end;

theorem Th65: :: RLVECT_1:65
canceled;

theorem Th66: :: RLVECT_1:66
for b1 being RealLinearSpace
for b2 being Real
for b3, b4 being VECTOR of b1 holds b2 * (Sum <*b3,b4*>) = (b2 * b3) + (b2 * b4)
proof end;

theorem Th67: :: RLVECT_1:67
for b1 being RealLinearSpace
for b2 being Real
for b3, b4, b5 being VECTOR of b1 holds b2 * (Sum <*b3,b4,b5*>) = ((b2 * b3) + (b2 * b4)) + (b2 * b5)
proof end;

theorem Th68: :: RLVECT_1:68
for b1 being non empty add-associative right_zeroed right_complementable LoopStr holds - (Sum (<*> the carrier of b1)) = 0. b1
proof end;

theorem Th69: :: RLVECT_1:69
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds - (Sum <*b2*>) = - b2 by Lemma39;

theorem Th70: :: RLVECT_1:70
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds - (Sum <*b2,b3*>) = (- b2) - b3
proof end;

theorem Th71: :: RLVECT_1:71
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds - (Sum <*b2,b3,b4*>) = ((- b2) - b3) - b4
proof end;

theorem Th72: :: RLVECT_1:72
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds Sum <*b2,b3*> = Sum <*b3,b2*>
proof end;

theorem Th73: :: RLVECT_1:73
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds Sum <*b2,b3*> = (Sum <*b2*>) + (Sum <*b3*>)
proof end;

theorem Th74: :: RLVECT_1:74
for b1 being non empty add-associative right_zeroed right_complementable LoopStr holds Sum <*(0. b1),(0. b1)*> = 0. b1
proof end;

theorem Th75: :: RLVECT_1:75
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds
( Sum <*(0. b1),b2*> = b2 & Sum <*b2,(0. b1)*> = b2 )
proof end;

theorem Th76: :: RLVECT_1:76
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds
( Sum <*b2,(- b2)*> = 0. b1 & Sum <*(- b2),b2*> = 0. b1 )
proof end;

theorem Th77: :: RLVECT_1:77
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds Sum <*b2,(- b3)*> = b2 - b3 by Th62;

theorem Th78: :: RLVECT_1:78
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds Sum <*(- b2),(- b3)*> = - (b3 + b2)
proof end;

theorem Th79: :: RLVECT_1:79
for b1 being RealLinearSpace
for b2 being VECTOR of b1 holds Sum <*b2,b2*> = 2 * b2
proof end;

theorem Th80: :: RLVECT_1:80
for b1 being RealLinearSpace
for b2 being VECTOR of b1 holds Sum <*(- b2),(- b2)*> = (- 2) * b2
proof end;

theorem Th81: :: RLVECT_1:81
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b2,b3,b4*> = ((Sum <*b2*>) + (Sum <*b3*>)) + (Sum <*b4*>)
proof end;

theorem Th82: :: RLVECT_1:82
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b2,b3,b4*> = (Sum <*b2,b3*>) + b4
proof end;

theorem Th83: :: RLVECT_1:83
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b3,b2,b4*> = (Sum <*b2,b4*>) + b3
proof end;

theorem Th84: :: RLVECT_1:84
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b3,b2,b4*> = (Sum <*b3,b4*>) + b2
proof end;

theorem Th85: :: RLVECT_1:85
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b3,b2,b4*> = Sum <*b3,b4,b2*>
proof end;

theorem Th86: :: RLVECT_1:86
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b3,b2,b4*> = Sum <*b2,b3,b4*>
proof end;

theorem Th87: :: RLVECT_1:87
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b3,b2,b4*> = Sum <*b2,b4,b3*>
proof end;

theorem Th88: :: RLVECT_1:88
canceled;

theorem Th89: :: RLVECT_1:89
for b1 being non empty Abelian add-associative right_zeroed right_complementable LoopStr
for b2, b3, b4 being Element of b1 holds Sum <*b3,b2,b4*> = Sum <*b4,b2,b3*>
proof end;

theorem Th90: :: RLVECT_1:90
for b1 being non empty add-associative right_zeroed right_complementable LoopStr holds Sum <*(0. b1),(0. b1),(0. b1)*> = 0. b1
proof end;

theorem Th91: :: RLVECT_1:91
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being Element of b1 holds
( Sum <*(0. b1),(0. b1),b2*> = b2 & Sum <*(0. b1),b2,(0. b1)*> = b2 & Sum <*b2,(0. b1),(0. b1)*> = b2 )
proof end;

theorem Th92: :: RLVECT_1:92
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2, b3 being Element of b1 holds
( Sum <*(0. b1),b2,b3*> = b2 + b3 & Sum <*b2,b3,(0. b1)*> = b2 + b3 & Sum <*b2,(0. b1),b3*> = b2 + b3 )
proof end;

theorem Th93: :: RLVECT_1:93
for b1 being RealLinearSpace
for b2 being VECTOR of b1 holds Sum <*b2,b2,b2*> = 3 * b2
proof end;

theorem Th94: :: RLVECT_1:94
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being FinSequence of the carrier of b1 st len b2 = 0 holds
Sum b2 = 0. b1 by Lemma34;

theorem Th95: :: RLVECT_1:95
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being FinSequence of the carrier of b1 st len b2 = 1 holds
Sum b2 = b2 . 1
proof end;

theorem Th96: :: RLVECT_1:96
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being FinSequence of the carrier of b1
for b3, b4 being Element of b1 st len b2 = 2 & b3 = b2 . 1 & b4 = b2 . 2 holds
Sum b2 = b3 + b4
proof end;

theorem Th97: :: RLVECT_1:97
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being FinSequence of the carrier of b1
for b3, b4, b5 being Element of b1 st len b2 = 3 & b3 = b2 . 1 & b4 = b2 . 2 & b5 = b2 . 3 holds
Sum b2 = (b3 + b4) + b5
proof end;

definition
let c1 be non empty ZeroStr ;
let c2 be Element of c1;
attr a2 is non-zero means :: RLVECT_1:def 13
a2 <> 0. a1;
end;

:: deftheorem Def13 defines non-zero RLVECT_1:def 13 :
for b1 being non empty ZeroStr
for b2 being Element of b1 holds
( b2 is non-zero iff b2 <> 0. b1 );