:: CONVEX3 semantic presentation

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

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

definition
let c1 be RealLinearSpace;
let c2 be non empty Subset of c1;
defpred S1[ set ] means a1 is Convex_Combination of c2;
func ConvexComb c2 -> set means :: CONVEX3:def 2
for b1 being set holds
( b1 in a3 iff b1 is Convex_Combination of a2 );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff b2 is Convex_Combination of c2 )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff b3 is Convex_Combination of c2 ) ) & ( for b3 being set holds
( b3 in b2 iff b3 is Convex_Combination of c2 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def2 defines ConvexComb CONVEX3:def 2 :
for b1 being RealLinearSpace
for b2 being non empty Subset of b1
for b3 being set holds
( b3 = ConvexComb b2 iff for b4 being set holds
( b4 in b3 iff b4 is Convex_Combination of b2 ) );

theorem Th1: :: CONVEX3:1
for b1 being RealLinearSpace
for b2 being VECTOR of b1 ex b3 being Convex_Combination of b1 st
( Sum b3 = b2 & ( for b4 being non empty Subset of b1 st b2 in b4 holds
b3 is Convex_Combination of b4 ) )
proof end;

theorem Th2: :: CONVEX3:2
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st b2 <> b3 holds
ex b4 being Convex_Combination of b1 st
for b5 being non empty Subset of b1 st {b2,b3} c= b5 holds
b4 is Convex_Combination of b5
proof end;

theorem Th3: :: CONVEX3:3
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 st b2 <> b3 & b2 <> b4 & b3 <> b4 holds
ex b5 being Convex_Combination of b1 st
for b6 being non empty Subset of b1 st {b2,b3,b4} c= b6 holds
b5 is Convex_Combination of b6
proof end;

Lemma3: for b1 being RealLinearSpace
for b2 being non empty Subset of b1 st { (Sum b3) where B is Convex_Combination of b2 : b3 in ConvexComb b1 } c= b2 holds
b2 is convex
proof end;

Lemma4: for b1 being RealLinearSpace
for b2 being non empty Subset of b1
for b3 being Convex_Combination of b2 st card (Carrier b3) >= 2 holds
ex b4, b5 being Convex_Combination of b2ex b6 being Real st
( 0 < b6 & b6 < 1 & b3 = (b6 * b4) + ((1 - b6) * b5) & card (Carrier b4) = 1 & card (Carrier b5) = (card (Carrier b3)) - 1 )
proof end;

Lemma5: for b1 being RealLinearSpace
for b2 being non empty Subset of b1 st b2 is convex holds
{ (Sum b3) where B is Convex_Combination of b2 : b3 in ConvexComb b1 } c= b2
proof end;

theorem Th4: :: CONVEX3:4
for b1 being RealLinearSpace
for b2 being non empty Subset of b1 holds
( b2 is convex iff { (Sum b3) where B is Convex_Combination of b2 : b3 in ConvexComb b1 } c= b2 ) by Lemma3, Lemma5;

theorem Th5: :: CONVEX3:5
for b1 being RealLinearSpace
for b2 being non empty Subset of b1 holds conv b2 = { (Sum b3) where B is Convex_Combination of b2 : b3 in ConvexComb b1 }
proof end;

definition
let c1 be non empty RLSStruct ;
let c2 be Subset of c1;
attr a2 is cone means :Def3: :: CONVEX3:def 3
for b1 being Real
for b2 being VECTOR of a1 st b1 > 0 & b2 in a2 holds
b1 * b2 in a2;
end;

:: deftheorem Def3 defines cone CONVEX3:def 3 :
for b1 being non empty RLSStruct
for b2 being Subset of b1 holds
( b2 is cone iff for b3 being Real
for b4 being VECTOR of b1 st b3 > 0 & b4 in b2 holds
b3 * b4 in b2 );

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

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

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

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

theorem Th7: :: CONVEX3:7
for b1 being non empty RLSStruct
for b2 being cone Subset of b1 st b1 is RealLinearSpace-like holds
( b2 is convex iff for b3, b4 being VECTOR of b1 st b3 in b2 & b4 in b2 holds
b3 + b4 in b2 )
proof end;

Lemma9: for b1 being RealLinearSpace
for b2 being Subset of b1
for b3 being Linear_Combination of b2 st card (Carrier b3) >= 1 holds
ex b4, b5 being Linear_Combination of b2 st
( Sum b3 = (Sum b4) + (Sum b5) & card (Carrier b4) = 1 & card (Carrier b5) = (card (Carrier b3)) - 1 & Carrier b4 c= Carrier b3 & Carrier b5 c= Carrier b3 & ( for b6 being VECTOR of b1 st b6 in Carrier b4 holds
b4 . b6 = b3 . b6 ) & ( for b6 being VECTOR of b1 st b6 in Carrier b5 holds
b5 . b6 = b3 . b6 ) )
proof end;

theorem Th8: :: CONVEX3:8
for b1 being RealLinearSpace
for b2 being Subset of b1 holds
( ( b2 is convex & b2 is cone ) iff for b3 being Linear_Combination of b2 st Carrier b3 <> {} & ( for b4 being VECTOR of b1 st b4 in Carrier b3 holds
b3 . b4 > 0 ) holds
Sum b3 in b2 )
proof end;

theorem Th9: :: CONVEX3:9
for b1 being non empty RLSStruct
for b2, b3 being Subset of b1 st b2 is cone & b3 is cone holds
b2 /\ b3 is cone
proof end;