:: RLVECT_5 semantic presentation

theorem Th1: :: RLVECT_5:1
for b1 being RealLinearSpace
for b2, b3 being Linear_Combination of b1
for b4 being Subset of b1 st b4 is linearly-independent & Carrier b2 c= b4 & Carrier b3 c= b4 & Sum b2 = Sum b3 holds
b2 = b3
proof end;

theorem Th2: :: RLVECT_5:2
for b1 being RealLinearSpace
for b2 being Subset of b1 st b2 is linearly-independent holds
ex b3 being Basis of b1 st b2 c= b3
proof end;

theorem Th3: :: RLVECT_5:3
for b1 being RealLinearSpace
for b2 being Linear_Combination of b1
for b3 being VECTOR of b1 holds
( b3 in Carrier b2 iff ex b4 being VECTOR of b1 st
( b3 = b4 & b2 . b4 <> 0 ) )
proof end;

Lemma4: for b1, b2 being set st b2 in b1 holds
(b1 \ {b2}) \/ {b2} = b1
proof end;

theorem Th4: :: RLVECT_5:4
canceled;

theorem Th5: :: RLVECT_5:5
for b1 being RealLinearSpace
for b2 being Linear_Combination of b1
for b3, b4 being FinSequence of the carrier of b1
for b5 being Permutation of dom b3 st b4 = b3 * b5 holds
Sum (b2 (#) b3) = Sum (b2 (#) b4)
proof end;

theorem Th6: :: RLVECT_5:6
for b1 being RealLinearSpace
for b2 being Linear_Combination of b1
for b3 being FinSequence of the carrier of b1 st Carrier b2 misses rng b3 holds
Sum (b2 (#) b3) = 0. b1
proof end;

theorem Th7: :: RLVECT_5:7
for b1 being RealLinearSpace
for b2 being FinSequence of the carrier of b1 st b2 is one-to-one holds
for b3 being Linear_Combination of b1 st Carrier b3 c= rng b2 holds
Sum (b3 (#) b2) = Sum b3
proof end;

theorem Th8: :: RLVECT_5:8
for b1 being RealLinearSpace
for b2 being Linear_Combination of b1
for b3 being FinSequence of the carrier of b1 ex b4 being Linear_Combination of b1 st
( Carrier b4 = (rng b3) /\ (Carrier b2) & b2 (#) b3 = b4 (#) b3 )
proof end;

theorem Th9: :: RLVECT_5:9
for b1 being RealLinearSpace
for b2 being Linear_Combination of b1
for b3 being Subset of b1
for b4 being FinSequence of the carrier of b1 st rng b4 c= the carrier of (Lin b3) holds
ex b5 being Linear_Combination of b3 st Sum (b2 (#) b4) = Sum b5
proof end;

theorem Th10: :: RLVECT_5:10
for b1 being RealLinearSpace
for b2 being Linear_Combination of b1
for b3 being Subset of b1 st Carrier b2 c= the carrier of (Lin b3) holds
ex b4 being Linear_Combination of b3 st Sum b2 = Sum b4
proof end;

theorem Th11: :: RLVECT_5:11
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Linear_Combination of b1 st Carrier b3 c= the carrier of b2 holds
for b4 being Linear_Combination of b2 st b4 = b3 | the carrier of b2 holds
( Carrier b3 = Carrier b4 & Sum b3 = Sum b4 )
proof end;

theorem Th12: :: RLVECT_5:12
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Linear_Combination of b2 ex b4 being Linear_Combination of b1 st
( Carrier b3 = Carrier b4 & Sum b3 = Sum b4 )
proof end;

theorem Th13: :: RLVECT_5:13
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Linear_Combination of b1 st Carrier b3 c= the carrier of b2 holds
ex b4 being Linear_Combination of b2 st
( Carrier b4 = Carrier b3 & Sum b4 = Sum b3 )
proof end;

theorem Th14: :: RLVECT_5:14
for b1 being RealLinearSpace
for b2 being Basis of b1
for b3 being VECTOR of b1 holds b3 in Lin b2
proof end;

theorem Th15: :: RLVECT_5:15
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Subset of b2 st b3 is linearly-independent holds
b3 is linearly-independent Subset of b1
proof end;

theorem Th16: :: RLVECT_5:16
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Subset of b1 st b3 is linearly-independent & b3 c= the carrier of b2 holds
b3 is linearly-independent Subset of b2
proof end;

theorem Th17: :: RLVECT_5:17
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Basis of b2 ex b4 being Basis of b1 st b3 c= b4
proof end;

theorem Th18: :: RLVECT_5:18
for b1 being RealLinearSpace
for b2 being Subset of b1 st b2 is linearly-independent holds
for b3 being VECTOR of b1 st b3 in b2 holds
for b4 being Subset of b1 st b4 = b2 \ {b3} holds
not b3 in Lin b4
proof end;

theorem Th19: :: RLVECT_5:19
for b1 being RealLinearSpace
for b2 being Basis of b1
for b3 being non empty Subset of b1 st b3 misses b2 holds
for b4 being Subset of b1 st b4 = b2 \/ b3 holds
not b4 is linearly-independent
proof end;

theorem Th20: :: RLVECT_5:20
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Subset of b1 st b3 c= the carrier of b2 holds
Lin b3 is Subspace of b2
proof end;

theorem Th21: :: RLVECT_5:21
for b1 being RealLinearSpace
for b2 being Subspace of b1
for b3 being Subset of b1
for b4 being Subset of b2 st b3 = b4 holds
Lin b3 = Lin b4
proof end;

theorem Th22: :: RLVECT_5:22
for b1 being RealLinearSpace
for b2, b3 being finite Subset of b1
for b4 being VECTOR of b1 st b4 in Lin (b2 \/ b3) & not b4 in Lin b3 holds
ex b5 being VECTOR of b1 st
( b5 in b2 & b5 in Lin (((b2 \/ b3) \ {b5}) \/ {b4}) )
proof end;

theorem Th23: :: RLVECT_5:23
for b1 being RealLinearSpace
for b2, b3 being finite Subset of b1 st RLSStruct(# the carrier of b1,the Zero of b1,the add of b1,the Mult of b1 #) = Lin b2 & b3 is linearly-independent holds
( card b3 <= card b2 & ex b4 being finite Subset of b1 st
( b4 c= b2 & card b4 = (card b2) - (card b3) & RLSStruct(# the carrier of b1,the Zero of b1,the add of b1,the Mult of b1 #) = Lin (b3 \/ b4) ) )
proof end;

definition
let c1 be RealLinearSpace;
attr a1 is finite-dimensional means :Def1: :: RLVECT_5:def 1
ex b1 being finite Subset of a1 st b1 is Basis of a1;
end;

:: deftheorem Def1 defines finite-dimensional RLVECT_5:def 1 :
for b1 being RealLinearSpace holds
( b1 is finite-dimensional iff ex b2 being finite Subset of b1 st b2 is Basis of b1 );

registration
cluster strict finite-dimensional RLSStruct ;
existence
ex b1 being RealLinearSpace st
( b1 is strict & b1 is finite-dimensional )
proof end;
end;

definition
let c1 be RealLinearSpace;
redefine attr a1 is finite-dimensional means :Def2: :: RLVECT_5:def 2
ex b1 being finite Subset of a1 st b1 is Basis of a1;
compatibility
( c1 is finite-dimensional iff ex b1 being finite Subset of c1 st b1 is Basis of c1 )
by Def1;
end;

:: deftheorem Def2 defines finite-dimensional RLVECT_5:def 2 :
for b1 being RealLinearSpace holds
( b1 is finite-dimensional iff ex b2 being finite Subset of b1 st b2 is Basis of b1 );

theorem Th24: :: RLVECT_5:24
for b1 being RealLinearSpace st b1 is finite-dimensional holds
for b2 being Basis of b1 holds b2 is finite
proof end;

theorem Th25: :: RLVECT_5:25
for b1 being RealLinearSpace st b1 is finite-dimensional holds
for b2 being Subset of b1 st b2 is linearly-independent holds
b2 is finite
proof end;

theorem Th26: :: RLVECT_5:26
for b1 being RealLinearSpace st b1 is finite-dimensional holds
for b2, b3 being Basis of b1 holds Card b2 = Card b3
proof end;

theorem Th27: :: RLVECT_5:27
for b1 being RealLinearSpace holds (0). b1 is finite-dimensional
proof end;

theorem Th28: :: RLVECT_5:28
for b1 being RealLinearSpace
for b2 being Subspace of b1 st b1 is finite-dimensional holds
b2 is finite-dimensional
proof end;

registration
let c1 be RealLinearSpace;
cluster strict finite-dimensional Subspace of a1;
existence
ex b1 being Subspace of c1 st
( b1 is finite-dimensional & b1 is strict )
proof end;
end;

registration
let c1 be finite-dimensional RealLinearSpace;
cluster -> finite-dimensional Subspace of a1;
correctness
coherence
for b1 being Subspace of c1 holds b1 is finite-dimensional
;
by Th28;
end;

registration
let c1 be finite-dimensional RealLinearSpace;
cluster strict finite-dimensional Subspace of a1;
existence
ex b1 being Subspace of c1 st b1 is strict
proof end;
end;

definition
let c1 be RealLinearSpace;
assume E30: c1 is finite-dimensional ;
func dim c1 -> Nat means :Def3: :: RLVECT_5:def 3
for b1 being Basis of a1 holds a2 = Card b1;
existence
ex b1 being Nat st
for b2 being Basis of c1 holds b1 = Card b2
proof end;
uniqueness
for b1, b2 being Nat st ( for b3 being Basis of c1 holds b1 = Card b3 ) & ( for b3 being Basis of c1 holds b2 = Card b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def3 defines dim RLVECT_5:def 3 :
for b1 being RealLinearSpace st b1 is finite-dimensional holds
for b2 being Nat holds
( b2 = dim b1 iff for b3 being Basis of b1 holds b2 = Card b3 );

theorem Th29: :: RLVECT_5:29
for b1 being finite-dimensional RealLinearSpace
for b2 being Subspace of b1 holds dim b2 <= dim b1
proof end;

theorem Th30: :: RLVECT_5:30
for b1 being finite-dimensional RealLinearSpace
for b2 being Subset of b1 st b2 is linearly-independent holds
Card b2 = dim (Lin b2)
proof end;

theorem Th31: :: RLVECT_5:31
for b1 being finite-dimensional RealLinearSpace holds dim b1 = dim ((Omega). b1)
proof end;

theorem Th32: :: RLVECT_5:32
for b1 being finite-dimensional RealLinearSpace
for b2 being Subspace of b1 holds
( dim b1 = dim b2 iff (Omega). b1 = (Omega). b2 )
proof end;

theorem Th33: :: RLVECT_5:33
for b1 being finite-dimensional RealLinearSpace holds
( dim b1 = 0 iff (Omega). b1 = (0). b1 )
proof end;

theorem Th34: :: RLVECT_5:34
for b1 being finite-dimensional RealLinearSpace holds
( dim b1 = 1 iff ex b2 being VECTOR of b1 st
( b2 <> 0. b1 & (Omega). b1 = Lin {b2} ) )
proof end;

theorem Th35: :: RLVECT_5:35
for b1 being finite-dimensional RealLinearSpace holds
( dim b1 = 2 iff ex b2, b3 being VECTOR of b1 st
( b2 <> b3 & {b2,b3} is linearly-independent & (Omega). b1 = Lin {b2,b3} ) )
proof end;

theorem Th36: :: RLVECT_5:36
for b1 being finite-dimensional RealLinearSpace
for b2, b3 being Subspace of b1 holds (dim (b2 + b3)) + (dim (b2 /\ b3)) = (dim b2) + (dim b3)
proof end;

theorem Th37: :: RLVECT_5:37
for b1 being finite-dimensional RealLinearSpace
for b2, b3 being Subspace of b1 holds dim (b2 /\ b3) >= ((dim b2) + (dim b3)) - (dim b1)
proof end;

theorem Th38: :: RLVECT_5:38
for b1 being finite-dimensional RealLinearSpace
for b2, b3 being Subspace of b1 st b1 is_the_direct_sum_of b2,b3 holds
dim b1 = (dim b2) + (dim b3)
proof end;

Lemma36: for b1 being Nat
for b2 being finite-dimensional RealLinearSpace st b1 <= dim b2 holds
ex b3 being strict Subspace of b2 st dim b3 = b1
proof end;

theorem Th39: :: RLVECT_5:39
for b1 being Nat
for b2 being finite-dimensional RealLinearSpace holds
( b1 <= dim b2 iff ex b3 being strict Subspace of b2 st dim b3 = b1 ) by Lemma36, Th29;

definition
let c1 be finite-dimensional RealLinearSpace;
let c2 be Nat;
func c2 Subspaces_of c1 -> set means :Def4: :: RLVECT_5:def 4
for b1 being set holds
( b1 in a3 iff ex b2 being strict Subspace of a1 st
( b2 = b1 & dim b2 = a2 ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being strict Subspace of c1 st
( b3 = b2 & dim b3 = c2 ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being strict Subspace of c1 st
( b4 = b3 & dim b4 = c2 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being strict Subspace of c1 st
( b4 = b3 & dim b4 = c2 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines Subspaces_of RLVECT_5:def 4 :
for b1 being finite-dimensional RealLinearSpace
for b2 being Nat
for b3 being set holds
( b3 = b2 Subspaces_of b1 iff for b4 being set holds
( b4 in b3 iff ex b5 being strict Subspace of b1 st
( b5 = b4 & dim b5 = b2 ) ) );

theorem Th40: :: RLVECT_5:40
for b1 being Nat
for b2 being finite-dimensional RealLinearSpace st b1 <= dim b2 holds
not b1 Subspaces_of b2 is empty
proof end;

theorem Th41: :: RLVECT_5:41
for b1 being Nat
for b2 being finite-dimensional RealLinearSpace st dim b2 < b1 holds
b1 Subspaces_of b2 = {}
proof end;

theorem Th42: :: RLVECT_5:42
for b1 being Nat
for b2 being finite-dimensional RealLinearSpace
for b3 being Subspace of b2 holds b1 Subspaces_of b3 c= b1 Subspaces_of b2
proof end;