:: VECTMETR semantic presentation

definition
let c1 be non empty MetrStruct ;
attr a1 is convex means :Def1: :: VECTMETR:def 1
for b1, b2 being Element of a1
for b3 being Real st 0 <= b3 & b3 <= 1 holds
ex b4 being Element of a1 st
( dist b1,b4 = b3 * (dist b1,b2) & dist b4,b2 = (1 - b3) * (dist b1,b2) );
end;

:: deftheorem Def1 defines convex VECTMETR:def 1 :
for b1 being non empty MetrStruct holds
( b1 is convex iff for b2, b3 being Element of b1
for b4 being Real st 0 <= b4 & b4 <= 1 holds
ex b5 being Element of b1 st
( dist b2,b5 = b4 * (dist b2,b3) & dist b5,b3 = (1 - b4) * (dist b2,b3) ) );

definition
let c1 be non empty MetrStruct ;
attr a1 is internal means :: VECTMETR:def 2
for b1, b2 being Element of a1
for b3, b4 being Real st b3 > 0 & b4 > 0 holds
ex b5 being FinSequence of the carrier of a1 st
( b5 /. 1 = b1 & b5 /. (len b5) = b2 & ( for b6 being Nat st 1 <= b6 & b6 <= (len b5) - 1 holds
dist (b5 /. b6),(b5 /. (b6 + 1)) < b3 ) & ( for b6 being FinSequence of REAL st len b6 = (len b5) - 1 & ( for b7 being Nat st 1 <= b7 & b7 <= len b6 holds
b6 /. b7 = dist (b5 /. b7),(b5 /. (b7 + 1)) ) holds
abs ((dist b1,b2) - (Sum b6)) < b4 ) );
end;

:: deftheorem Def2 defines internal VECTMETR:def 2 :
for b1 being non empty MetrStruct holds
( b1 is internal iff for b2, b3 being Element of b1
for b4, b5 being Real st b4 > 0 & b5 > 0 holds
ex b6 being FinSequence of the carrier of b1 st
( b6 /. 1 = b2 & b6 /. (len b6) = b3 & ( for b7 being Nat st 1 <= b7 & b7 <= (len b6) - 1 holds
dist (b6 /. b7),(b6 /. (b7 + 1)) < b4 ) & ( for b7 being FinSequence of REAL st len b7 = (len b6) - 1 & ( for b8 being Nat st 1 <= b8 & b8 <= len b7 holds
b7 /. b8 = dist (b6 /. b8),(b6 /. (b8 + 1)) ) holds
abs ((dist b2,b3) - (Sum b7)) < b5 ) ) );

theorem Th1: :: VECTMETR:1
for b1 being non empty MetrSpace st b1 is convex holds
for b2, b3 being Element of b1
for b4 being Real st b4 > 0 holds
ex b5 being FinSequence of the carrier of b1 st
( b5 /. 1 = b2 & b5 /. (len b5) = b3 & ( for b6 being Nat st 1 <= b6 & b6 <= (len b5) - 1 holds
dist (b5 /. b6),(b5 /. (b6 + 1)) < b4 ) & ( for b6 being FinSequence of REAL st len b6 = (len b5) - 1 & ( for b7 being Nat st 1 <= b7 & b7 <= len b6 holds
b6 /. b7 = dist (b5 /. b7),(b5 /. (b7 + 1)) ) holds
dist b2,b3 = Sum b6 ) )
proof end;

registration
cluster non empty convex -> non empty internal MetrStruct ;
coherence
for b1 being non empty MetrSpace st b1 is convex holds
b1 is internal
proof end;
end;

registration
cluster non empty convex internal MetrStruct ;
existence
ex b1 being non empty MetrSpace st b1 is convex
proof end;
end;

definition
mode Geometry is non empty Reflexive discerning symmetric triangle internal MetrStruct ;
end;

definition
let c1 be non empty MetrStruct ;
let c2 be Function of c1,c1;
attr a2 is isometric means :Def3: :: VECTMETR:def 3
( rng a2 = the carrier of a1 & ( for b1, b2 being Element of a1 holds dist b1,b2 = dist (a2 . b1),(a2 . b2) ) );
end;

:: deftheorem Def3 defines isometric VECTMETR:def 3 :
for b1 being non empty MetrStruct
for b2 being Function of b1,b1 holds
( b2 is isometric iff ( rng b2 = the carrier of b1 & ( for b3, b4 being Element of b1 holds dist b3,b4 = dist (b2 . b3),(b2 . b4) ) ) );

definition
let c1 be non empty MetrStruct ;
func ISOM c1 -> set means :Def4: :: VECTMETR:def 4
for b1 being set holds
( b1 in a2 iff ex b2 being Function of a1,a1 st
( b2 = b1 & b2 is isometric ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being Function of c1,c1 st
( b3 = b2 & b3 is isometric ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being Function of c1,c1 st
( b4 = b3 & b4 is isometric ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being Function of c1,c1 st
( b4 = b3 & b4 is isometric ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines ISOM VECTMETR:def 4 :
for b1 being non empty MetrStruct
for b2 being set holds
( b2 = ISOM b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being Function of b1,b1 st
( b4 = b3 & b4 is isometric ) ) );

definition
let c1 be non empty MetrStruct ;
redefine func ISOM as ISOM c1 -> Subset of (Funcs the carrier of a1,the carrier of a1);
coherence
ISOM c1 is Subset of (Funcs the carrier of c1,the carrier of c1)
proof end;
end;

theorem Th2: :: VECTMETR:2
for b1 being non empty Reflexive discerning MetrStruct
for b2 being Function of b1,b1 st b2 is isometric holds
b2 is one-to-one
proof end;

registration
let c1 be non empty Reflexive discerning MetrStruct ;
cluster isometric -> one-to-one Relation of the carrier of a1,the carrier of a1;
coherence
for b1 being Function of c1,c1 st b1 is isometric holds
b1 is one-to-one
by Th2;
end;

registration
let c1 be non empty MetrStruct ;
cluster isometric Relation of the carrier of a1,the carrier of a1;
existence
ex b1 being Function of c1,c1 st b1 is isometric
proof end;
end;

theorem Th3: :: VECTMETR:3
for b1 being non empty Reflexive discerning MetrStruct
for b2 being isometric Function of b1,b1 holds b2 " is isometric
proof end;

theorem Th4: :: VECTMETR:4
for b1 being non empty MetrStruct
for b2, b3 being isometric Function of b1,b1 holds b2 * b3 is isometric
proof end;

theorem Th5: :: VECTMETR:5
for b1 being non empty MetrStruct holds id b1 is isometric
proof end;

registration
let c1 be non empty MetrStruct ;
cluster ISOM a1 -> non empty ;
coherence
not ISOM c1 is empty
proof end;
end;

definition
attr a1 is strict;
struct RLSMetrStruct -> RLSStruct , MetrStruct ;
aggr RLSMetrStruct(# carrier, distance, Zero, add, Mult #) -> RLSMetrStruct ;
end;

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

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

definition
let c1 be non empty RLSMetrStruct ;
attr a1 is homogeneous means :Def5: :: VECTMETR:def 5
for b1 being Real
for b2, b3 being Element of a1 holds dist (b1 * b2),(b1 * b3) = (abs b1) * (dist b2,b3);
end;

:: deftheorem Def5 defines homogeneous VECTMETR:def 5 :
for b1 being non empty RLSMetrStruct holds
( b1 is homogeneous iff for b2 being Real
for b3, b4 being Element of b1 holds dist (b2 * b3),(b2 * b4) = (abs b2) * (dist b3,b4) );

definition
let c1 be non empty RLSMetrStruct ;
attr a1 is translatible means :Def6: :: VECTMETR:def 6
for b1, b2, b3 being Element of a1 holds dist b3,b2 = dist (b3 + b1),(b2 + b1);
end;

:: deftheorem Def6 defines translatible VECTMETR:def 6 :
for b1 being non empty RLSMetrStruct holds
( b1 is translatible iff for b2, b3, b4 being Element of b1 holds dist b4,b3 = dist (b4 + b2),(b3 + b2) );

definition
let c1 be non empty RLSMetrStruct ;
let c2 be Element of c1;
func Norm c2 -> Real equals :: VECTMETR:def 7
dist (0. a1),a2;
coherence
dist (0. c1),c2 is Real
;
end;

:: deftheorem Def7 defines Norm VECTMETR:def 7 :
for b1 being non empty RLSMetrStruct
for b2 being Element of b1 holds Norm b2 = dist (0. b1),b2;

registration
cluster non empty Abelian add-associative right_zeroed right_complementable RealLinearSpace-like Reflexive discerning symmetric triangle strict homogeneous translatible RLSMetrStruct ;
existence
ex b1 being non empty RLSMetrStruct st
( b1 is strict & b1 is Abelian & b1 is add-associative & b1 is right_zeroed & b1 is right_complementable & b1 is RealLinearSpace-like & b1 is Reflexive & b1 is discerning & b1 is symmetric & b1 is triangle & b1 is homogeneous & b1 is translatible )
proof end;
end;

definition
mode RealLinearMetrSpace is non empty Abelian add-associative right_zeroed right_complementable RealLinearSpace-like Reflexive discerning symmetric triangle homogeneous translatible RLSMetrStruct ;
end;

theorem Th6: :: VECTMETR:6
for b1 being non empty Abelian add-associative right_zeroed right_complementable RealLinearSpace-like homogeneous RLSMetrStruct
for b2 being Real
for b3 being Element of b1 holds Norm (b2 * b3) = (abs b2) * (Norm b3)
proof end;

theorem Th7: :: VECTMETR:7
for b1 being non empty Abelian add-associative right_zeroed right_complementable triangle translatible RLSMetrStruct
for b2, b3 being Element of b1 holds Norm (b2 + b3) <= (Norm b2) + (Norm b3)
proof end;

theorem Th8: :: VECTMETR:8
for b1 being non empty add-associative right_zeroed right_complementable translatible RLSMetrStruct
for b2, b3 being Element of b1 holds dist b2,b3 = Norm (b3 - b2)
proof end;

definition
let c1 be Nat;
func RLMSpace c1 -> strict RealLinearMetrSpace means :Def8: :: VECTMETR:def 8
( the carrier of a2 = REAL a1 & the distance of a2 = Pitag_dist a1 & the Zero of a2 = 0* a1 & ( for b1, b2 being Element of REAL a1 holds the add of a2 . b1,b2 = b1 + b2 ) & ( for b1 being Element of REAL a1
for b2 being Element of REAL holds the Mult of a2 . b2,b1 = b2 * b1 ) );
existence
ex b1 being strict RealLinearMetrSpace st
( the carrier of b1 = REAL c1 & the distance of b1 = Pitag_dist c1 & the Zero of b1 = 0* c1 & ( for b2, b3 being Element of REAL c1 holds the add of b1 . b2,b3 = b2 + b3 ) & ( for b2 being Element of REAL c1
for b3 being Element of REAL holds the Mult of b1 . b3,b2 = b3 * b2 ) )
proof end;
uniqueness
for b1, b2 being strict RealLinearMetrSpace st the carrier of b1 = REAL c1 & the distance of b1 = Pitag_dist c1 & the Zero of b1 = 0* c1 & ( for b3, b4 being Element of REAL c1 holds the add of b1 . b3,b4 = b3 + b4 ) & ( for b3 being Element of REAL c1
for b4 being Element of REAL holds the Mult of b1 . b4,b3 = b4 * b3 ) & the carrier of b2 = REAL c1 & the distance of b2 = Pitag_dist c1 & the Zero of b2 = 0* c1 & ( for b3, b4 being Element of REAL c1 holds the add of b2 . b3,b4 = b3 + b4 ) & ( for b3 being Element of REAL c1
for b4 being Element of REAL holds the Mult of b2 . b4,b3 = b4 * b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def8 defines RLMSpace VECTMETR:def 8 :
for b1 being Nat
for b2 being strict RealLinearMetrSpace holds
( b2 = RLMSpace b1 iff ( the carrier of b2 = REAL b1 & the distance of b2 = Pitag_dist b1 & the Zero of b2 = 0* b1 & ( for b3, b4 being Element of REAL b1 holds the add of b2 . b3,b4 = b3 + b4 ) & ( for b3 being Element of REAL b1
for b4 being Element of REAL holds the Mult of b2 . b4,b3 = b4 * b3 ) ) );

theorem Th9: :: VECTMETR:9
for b1 being Nat
for b2 being isometric Function of (RLMSpace b1),(RLMSpace b1) holds rng b2 = REAL b1
proof end;

definition
let c1 be Nat;
func IsomGroup c1 -> strict HGrStr means :Def9: :: VECTMETR:def 9
( the carrier of a2 = ISOM (RLMSpace a1) & ( for b1, b2 being Function st b1 in ISOM (RLMSpace a1) & b2 in ISOM (RLMSpace a1) holds
the mult of a2 . b1,b2 = b1 * b2 ) );
existence
ex b1 being strict HGrStr st
( the carrier of b1 = ISOM (RLMSpace c1) & ( for b2, b3 being Function st b2 in ISOM (RLMSpace c1) & b3 in ISOM (RLMSpace c1) holds
the mult of b1 . b2,b3 = b2 * b3 ) )
proof end;
uniqueness
for b1, b2 being strict HGrStr st the carrier of b1 = ISOM (RLMSpace c1) & ( for b3, b4 being Function st b3 in ISOM (RLMSpace c1) & b4 in ISOM (RLMSpace c1) holds
the mult of b1 . b3,b4 = b3 * b4 ) & the carrier of b2 = ISOM (RLMSpace c1) & ( for b3, b4 being Function st b3 in ISOM (RLMSpace c1) & b4 in ISOM (RLMSpace c1) holds
the mult of b2 . b3,b4 = b3 * b4 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def9 defines IsomGroup VECTMETR:def 9 :
for b1 being Nat
for b2 being strict HGrStr holds
( b2 = IsomGroup b1 iff ( the carrier of b2 = ISOM (RLMSpace b1) & ( for b3, b4 being Function st b3 in ISOM (RLMSpace b1) & b4 in ISOM (RLMSpace b1) holds
the mult of b2 . b3,b4 = b3 * b4 ) ) );

registration
let c1 be Nat;
cluster IsomGroup a1 -> non empty strict ;
coherence
not IsomGroup c1 is empty
proof end;
end;

registration
let c1 be Nat;
cluster IsomGroup a1 -> non empty strict Group-like associative ;
coherence
( IsomGroup c1 is associative & IsomGroup c1 is Group-like )
proof end;
end;

theorem Th10: :: VECTMETR:10
for b1 being Nat holds 1. (IsomGroup b1) = id (RLMSpace b1)
proof end;

theorem Th11: :: VECTMETR:11
for b1 being Nat
for b2 being Element of (IsomGroup b1)
for b3 being Function of (RLMSpace b1),(RLMSpace b1) st b2 = b3 holds
b2 " = b3 "
proof end;

definition
let c1 be Nat;
let c2 be Subgroup of IsomGroup c1;
func SubIsomGroupRel c2 -> Relation of the carrier of (RLMSpace a1) means :Def10: :: VECTMETR:def 10
for b1, b2 being Element of (RLMSpace a1) holds
( [b1,b2] in a3 iff ex b3 being Function st
( b3 in the carrier of a2 & b3 . b1 = b2 ) );
existence
ex b1 being Relation of the carrier of (RLMSpace c1) st
for b2, b3 being Element of (RLMSpace c1) holds
( [b2,b3] in b1 iff ex b4 being Function st
( b4 in the carrier of c2 & b4 . b2 = b3 ) )
proof end;
uniqueness
for b1, b2 being Relation of the carrier of (RLMSpace c1) st ( for b3, b4 being Element of (RLMSpace c1) holds
( [b3,b4] in b1 iff ex b5 being Function st
( b5 in the carrier of c2 & b5 . b3 = b4 ) ) ) & ( for b3, b4 being Element of (RLMSpace c1) holds
( [b3,b4] in b2 iff ex b5 being Function st
( b5 in the carrier of c2 & b5 . b3 = b4 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def10 defines SubIsomGroupRel VECTMETR:def 10 :
for b1 being Nat
for b2 being Subgroup of IsomGroup b1
for b3 being Relation of the carrier of (RLMSpace b1) holds
( b3 = SubIsomGroupRel b2 iff for b4, b5 being Element of (RLMSpace b1) holds
( [b4,b5] in b3 iff ex b6 being Function st
( b6 in the carrier of b2 & b6 . b4 = b5 ) ) );

registration
let c1 be Nat;
let c2 be Subgroup of IsomGroup c1;
cluster SubIsomGroupRel a2 -> symmetric transitive total ;
coherence
( SubIsomGroupRel c2 is total & SubIsomGroupRel c2 is symmetric & SubIsomGroupRel c2 is transitive )
proof end;
end;