:: Convex Hull, Set of Convex Combinations and Convex Cone
:: by Noboru Endou and Yasunari Shidama
::
:: Received June 16, 2003
:: Copyright (c) 2003 Association of Mizar Users


begin

definition
let V be RealLinearSpace;
defpred S1[ set ] means $1 is Convex_Combination of ;
func ConvexComb V -> set means :Def1: :: CONVEX3:def 1
for L being set holds
( L in it iff L is Convex_Combination of );
existence
ex b1 being set st
for L being set holds
( L in b1 iff L is Convex_Combination of )
proof end;
uniqueness
for b1, b2 being set st ( for L being set holds
( L in b1 iff L is Convex_Combination of ) ) & ( for L being set holds
( L in b2 iff L is Convex_Combination of ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines ConvexComb CONVEX3:def 1 :
for V being RealLinearSpace
for b2 being set holds
( b2 = ConvexComb V iff for L being set holds
( L in b2 iff L is Convex_Combination of ) );

definition
let V be RealLinearSpace;
let M be non empty Subset of ;
defpred S1[ set ] means $1 is Convex_Combination of V;
func ConvexComb M -> set means :: CONVEX3:def 2
for L being set holds
( L in it iff L is Convex_Combination of V );
existence
ex b1 being set st
for L being set holds
( L in b1 iff L is Convex_Combination of V )
proof end;
uniqueness
for b1, b2 being set st ( for L being set holds
( L in b1 iff L is Convex_Combination of V ) ) & ( for L being set holds
( L in b2 iff L is Convex_Combination of V ) ) holds
b1 = b2
proof end;
end;

:: deftheorem defines ConvexComb CONVEX3:def 2 :
for V being RealLinearSpace
for M being non empty Subset of
for b3 being set holds
( b3 = ConvexComb M iff for L being set holds
( L in b3 iff L is Convex_Combination of V ) );

theorem Th1: :: CONVEX3:1
for V being RealLinearSpace
for v being VECTOR of ex L being Convex_Combination of st
( Sum L = v & ( for A being non empty Subset of st v in A holds
L is Convex_Combination of V ) )
proof end;

theorem :: CONVEX3:2
for V being RealLinearSpace
for v1, v2 being VECTOR of st v1 <> v2 holds
ex L being Convex_Combination of st
for A being non empty Subset of st {v1,v2} c= A holds
L is Convex_Combination of V
proof end;

theorem :: CONVEX3:3
for V being RealLinearSpace
for v1, v2, v3 being VECTOR of st v1 <> v2 & v1 <> v3 & v2 <> v3 holds
ex L being Convex_Combination of st
for A being non empty Subset of st {v1,v2,v3} c= A holds
L is Convex_Combination of V
proof end;

Lm1: for V being RealLinearSpace
for M being non empty Subset of st { (Sum L) where L is Convex_Combination of V : L in ConvexComb V } c= M holds
M is convex
proof end;

Lm2: for V being RealLinearSpace
for M being non empty Subset of
for L being Convex_Combination of V st card (Carrier L) >= 2 holds
ex L1, L2 being Convex_Combination of V ex r being Real st
( 0 < r & r < 1 & L = (r * L1) + ((1 - r) * L2) & card (Carrier L1) = 1 & card (Carrier L2) = (card (Carrier L)) - 1 )
proof end;

Lm3: for V being RealLinearSpace
for M being non empty Subset of st M is convex holds
{ (Sum L) where L is Convex_Combination of V : L in ConvexComb V } c= M
proof end;

theorem :: CONVEX3:4
for V being RealLinearSpace
for M being non empty Subset of holds
( M is convex iff { (Sum L) where L is Convex_Combination of V : L in ConvexComb V } c= M ) by Lm1, Lm3;

theorem :: CONVEX3:5
for V being RealLinearSpace
for M being non empty Subset of holds conv M = { (Sum L) where L is Convex_Combination of V : L in ConvexComb V }
proof end;

begin

definition
let V be non empty RLSStruct ;
let M be Subset of ;
attr M is cone means :Def3: :: CONVEX3:def 3
for r being Real
for v being VECTOR of st r > 0 & v in M holds
r * v in M;
end;

:: deftheorem Def3 defines cone CONVEX3:def 3 :
for V being non empty RLSStruct
for M being Subset of holds
( M is cone iff for r being Real
for v being VECTOR of st r > 0 & v in M holds
r * v in M );

theorem Th6: :: CONVEX3:6
for V being non empty RLSStruct
for M being Subset of st M = {} holds
M is cone
proof end;

registration
let V be non empty RLSStruct ;
cluster cone Element of K18(the carrier of V);
existence
ex b1 being Subset of st b1 is cone
proof end;
end;

registration
let V be non empty RLSStruct ;
cluster empty cone Element of K18(the carrier of V);
existence
ex b1 being Subset of st
( b1 is empty & b1 is cone )
proof end;
end;

registration
let V be RealLinearSpace;
cluster non empty cone Element of K18(the carrier of V);
existence
ex b1 being Subset of st
( not b1 is empty & b1 is cone )
proof end;
end;

theorem Th7: :: CONVEX3:7
for V being non empty RLSStruct
for M being cone Subset of st V is RealLinearSpace-like holds
( M is convex iff for u, v being VECTOR of st u in M & v in M holds
u + v in M )
proof end;

Lm4: for V being RealLinearSpace
for M being Subset of
for L being Linear_Combination of M st card (Carrier L) >= 1 holds
ex L1, L2 being Linear_Combination of M st
( Sum L = (Sum L1) + (Sum L2) & card (Carrier L1) = 1 & card (Carrier L2) = (card (Carrier L)) - 1 & Carrier L1 c= Carrier L & Carrier L2 c= Carrier L & ( for v being VECTOR of st v in Carrier L1 holds
L1 . v = L . v ) & ( for v being VECTOR of st v in Carrier L2 holds
L2 . v = L . v ) )
proof end;

theorem :: CONVEX3:8
for V being RealLinearSpace
for M being Subset of holds
( ( M is convex & M is cone ) iff for L being Linear_Combination of M st Carrier L <> {} & ( for v being VECTOR of st v in Carrier L holds
L . v > 0 ) holds
Sum L in M )
proof end;

theorem :: CONVEX3:9
for V being non empty RLSStruct
for M, N being Subset of st M is cone & N is cone holds
M /\ N is cone
proof end;