:: DIRAF semantic presentation

definition
let c1 be non empty set ;
let c2 be Relation of [:c1,c1:];
func lambda c2 -> Relation of [:a1,a1:] means :Def1: :: DIRAF:def 1
for b1, b2, b3, b4 being Element of a1 holds
( [[b1,b2],[b3,b4]] in a3 iff ( [[b1,b2],[b3,b4]] in a2 or [[b1,b2],[b4,b3]] in a2 ) );
existence
ex b1 being Relation of [:c1,c1:] st
for b2, b3, b4, b5 being Element of c1 holds
( [[b2,b3],[b4,b5]] in b1 iff ( [[b2,b3],[b4,b5]] in c2 or [[b2,b3],[b5,b4]] in c2 ) )
proof end;
uniqueness
for b1, b2 being Relation of [:c1,c1:] st ( for b3, b4, b5, b6 being Element of c1 holds
( [[b3,b4],[b5,b6]] in b1 iff ( [[b3,b4],[b5,b6]] in c2 or [[b3,b4],[b6,b5]] in c2 ) ) ) & ( for b3, b4, b5, b6 being Element of c1 holds
( [[b3,b4],[b5,b6]] in b2 iff ( [[b3,b4],[b5,b6]] in c2 or [[b3,b4],[b6,b5]] in c2 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines lambda DIRAF:def 1 :
for b1 being non empty set
for b2, b3 being Relation of [:b1,b1:] holds
( b3 = lambda b2 iff for b4, b5, b6, b7 being Element of b1 holds
( [[b4,b5],[b6,b7]] in b3 iff ( [[b4,b5],[b6,b7]] in b2 or [[b4,b5],[b7,b6]] in b2 ) ) );

definition
let c1 be non empty AffinStruct ;
func Lambda c1 -> strict AffinStruct equals :: DIRAF:def 2
AffinStruct(# the carrier of a1,(lambda the CONGR of a1) #);
correctness
coherence
AffinStruct(# the carrier of c1,(lambda the CONGR of c1) #) is strict AffinStruct
;
;
end;

:: deftheorem Def2 defines Lambda DIRAF:def 2 :
for b1 being non empty AffinStruct holds Lambda b1 = AffinStruct(# the carrier of b1,(lambda the CONGR of b1) #);

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

theorem Th1: :: DIRAF:1
canceled;

theorem Th2: :: DIRAF:2
canceled;

theorem Th3: :: DIRAF:3
canceled;

theorem Th4: :: DIRAF:4
for b1 being OAffinSpace
for b2, b3 being Element of b1 holds b2,b3 // b2,b3
proof end;

Lemma3: for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2,b3 // b4,b5 holds
b4,b5 // b2,b3
proof end;

theorem Th5: :: DIRAF:5
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2,b3 // b4,b5 holds
( b3,b2 // b5,b4 & b4,b5 // b2,b3 & b5,b4 // b3,b2 )
proof end;

theorem Th6: :: DIRAF:6
for b1 being OAffinSpace
for b2, b3, b4, b5, b6, b7 being Element of b1 st b2 <> b3 & b4,b5 // b2,b3 & b2,b3 // b6,b7 holds
b4,b5 // b6,b7
proof end;

theorem Th7: :: DIRAF:7
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 holds
( b2,b2 // b3,b4 & b3,b4 // b2,b2 )
proof end;

theorem Th8: :: DIRAF:8
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2,b3 // b4,b5 & b2,b3 // b5,b4 & not b2 = b3 holds
b4 = b5
proof end;

theorem Th9: :: DIRAF:9
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 holds
( b2,b3 // b2,b4 iff ( b2,b3 // b3,b4 or b2,b4 // b4,b3 ) )
proof end;

definition
let c1 be non empty AffinStruct ;
let c2, c3, c4 be Element of c1;
pred Mid c2,c3,c4 means :Def3: :: DIRAF:def 3
a2,a3 // a3,a4;
end;

:: deftheorem Def3 defines Mid DIRAF:def 3 :
for b1 being non empty AffinStruct
for b2, b3, b4 being Element of b1 holds
( Mid b2,b3,b4 iff b2,b3 // b3,b4 );

theorem Th10: :: DIRAF:10
canceled;

theorem Th11: :: DIRAF:11
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 holds
( b2,b3 // b2,b4 iff ( Mid b2,b3,b4 or Mid b2,b4,b3 ) )
proof end;

theorem Th12: :: DIRAF:12
for b1 being OAffinSpace
for b2, b3 being Element of b1 st Mid b2,b3,b2 holds
b2 = b3
proof end;

theorem Th13: :: DIRAF:13
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 st Mid b2,b3,b4 holds
Mid b4,b3,b2
proof end;

theorem Th14: :: DIRAF:14
for b1 being OAffinSpace
for b2, b3 being Element of b1 holds
( Mid b2,b2,b3 & Mid b2,b3,b3 )
proof end;

theorem Th15: :: DIRAF:15
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st Mid b2,b3,b4 & Mid b2,b4,b5 holds
Mid b3,b4,b5
proof end;

theorem Th16: :: DIRAF:16
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2 <> b3 & Mid b4,b2,b3 & Mid b2,b3,b5 holds
Mid b4,b3,b5
proof end;

theorem Th17: :: DIRAF:17
for b1 being OAffinSpace
for b2, b3 being Element of b1 ex b4 being Element of b1 st
( Mid b2,b3,b4 & b3 <> b4 )
proof end;

theorem Th18: :: DIRAF:18
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 st Mid b2,b3,b4 & Mid b3,b2,b4 holds
b2 = b3
proof end;

theorem Th19: :: DIRAF:19
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2 <> b3 & Mid b2,b3,b4 & Mid b2,b3,b5 & not Mid b3,b4,b5 holds
Mid b3,b5,b4
proof end;

theorem Th20: :: DIRAF:20
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2 <> b3 & Mid b2,b3,b4 & Mid b2,b3,b5 & not Mid b2,b4,b5 holds
Mid b2,b5,b4
proof end;

theorem Th21: :: DIRAF:21
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st Mid b2,b3,b4 & Mid b2,b5,b4 & not Mid b2,b3,b5 holds
Mid b2,b5,b3
proof end;

definition
let c1 be non empty AffinStruct ;
let c2, c3, c4, c5 be Element of c1;
pred c2,c3 '||' c4,c5 means :Def4: :: DIRAF:def 4
( a2,a3 // a4,a5 or a2,a3 // a5,a4 );
end;

:: deftheorem Def4 defines '||' DIRAF:def 4 :
for b1 being non empty AffinStruct
for b2, b3, b4, b5 being Element of b1 holds
( b2,b3 '||' b4,b5 iff ( b2,b3 // b4,b5 or b2,b3 // b5,b4 ) );

theorem Th22: :: DIRAF:22
canceled;

theorem Th23: :: DIRAF:23
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 holds
( b2,b3 '||' b4,b5 iff [[b2,b3],[b4,b5]] in lambda the CONGR of b1 )
proof end;

theorem Th24: :: DIRAF:24
for b1 being OAffinSpace
for b2, b3 being Element of b1 holds
( b2,b3 '||' b3,b2 & b2,b3 '||' b2,b3 )
proof end;

theorem Th25: :: DIRAF:25
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 holds
( b2,b3 '||' b4,b4 & b4,b4 '||' b2,b3 )
proof end;

Lemma16: for b1 being OAffinSpace
for b2, b3, b4, b5, b6, b7 being Element of b1 st b2 <> b3 & b2,b3 '||' b4,b5 & b2,b3 '||' b6,b7 holds
b4,b5 '||' b6,b7
proof end;

theorem Th26: :: DIRAF:26
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 st b2,b3 '||' b2,b4 holds
b3,b2 '||' b3,b4
proof end;

theorem Th27: :: DIRAF:27
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2,b3 '||' b4,b5 holds
( b2,b3 '||' b5,b4 & b3,b2 '||' b4,b5 & b3,b2 '||' b5,b4 & b4,b5 '||' b2,b3 & b4,b5 '||' b3,b2 & b5,b4 '||' b2,b3 & b5,b4 '||' b3,b2 )
proof end;

theorem Th28: :: DIRAF:28
for b1 being OAffinSpace
for b2, b3, b4, b5, b6, b7 being Element of b1 st b2 <> b3 & ( ( b2,b3 '||' b4,b5 & b2,b3 '||' b6,b7 ) or ( b2,b3 '||' b4,b5 & b6,b7 '||' b2,b3 ) or ( b4,b5 '||' b2,b3 & b6,b7 '||' b2,b3 ) or ( b4,b5 '||' b2,b3 & b2,b3 '||' b6,b7 ) ) holds
b4,b5 '||' b6,b7
proof end;

theorem Th29: :: DIRAF:29
for b1 being OAffinSpace holds
not for b2, b3, b4 being Element of b1 holds b2,b3 '||' b2,b4
proof end;

theorem Th30: :: DIRAF:30
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b3 '||' b4,b5 & b4 <> b5 )
proof end;

theorem Th31: :: DIRAF:31
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b3 '||' b4,b5 & b2,b4 '||' b3,b5 )
proof end;

theorem Th32: :: DIRAF:32
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2,b3 '||' b3,b4 & b3 <> b2 holds
ex b6 being Element of b1 st
( b5,b3 '||' b3,b6 & b5,b2 '||' b4,b6 )
proof end;

definition
let c1 be non empty AffinStruct ;
let c2, c3, c4 be Element of c1;
pred LIN c2,c3,c4 means :Def5: :: DIRAF:def 5
a2,a3 '||' a2,a4;
end;

:: deftheorem Def5 defines LIN DIRAF:def 5 :
for b1 being non empty AffinStruct
for b2, b3, b4 being Element of b1 holds
( LIN b2,b3,b4 iff b2,b3 '||' b2,b4 );

notation
let c1 be non empty AffinStruct ;
let c2, c3, c4 be Element of c1;
synonym c2,c3,c4 is_collinear for LIN c2,c3,c4;
end;

theorem Th33: :: DIRAF:33
canceled;

theorem Th34: :: DIRAF:34
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 st Mid b2,b3,b4 holds
b2,b3,b4 is_collinear
proof end;

theorem Th35: :: DIRAF:35
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 holds
( not b2,b3,b4 is_collinear or Mid b2,b3,b4 or Mid b3,b2,b4 or Mid b2,b4,b3 )
proof end;

Lemma25: for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 st b2,b3,b4 is_collinear holds
( b2,b4,b3 is_collinear & b3,b2,b4 is_collinear )
proof end;

theorem Th36: :: DIRAF:36
for b1 being OAffinSpace
for b2, b3, b4 being Element of b1 st b2,b3,b4 is_collinear holds
( b2,b4,b3 is_collinear & b3,b2,b4 is_collinear & b3,b4,b2 is_collinear & b4,b2,b3 is_collinear & b4,b3,b2 is_collinear )
proof end;

theorem Th37: :: DIRAF:37
for b1 being OAffinSpace
for b2, b3 being Element of b1 holds
( b2,b2,b3 is_collinear & b2,b3,b3 is_collinear & b2,b3,b2 is_collinear )
proof end;

theorem Th38: :: DIRAF:38
for b1 being OAffinSpace
for b2, b3, b4, b5, b6 being Element of b1 st b2 <> b3 & b2,b3,b4 is_collinear & b2,b3,b5 is_collinear & b2,b3,b6 is_collinear holds
b4,b5,b6 is_collinear
proof end;

theorem Th39: :: DIRAF:39
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2 <> b3 & b2,b3,b4 is_collinear & b2,b3 '||' b4,b5 holds
b2,b3,b5 is_collinear
proof end;

theorem Th40: :: DIRAF:40
for b1 being OAffinSpace
for b2, b3, b4, b5 being Element of b1 st b2,b3,b4 is_collinear & b2,b3,b5 is_collinear holds
b2,b3 '||' b4,b5
proof end;

theorem Th41: :: DIRAF:41
for b1 being OAffinSpace
for b2, b3, b4, b5, b6 being Element of b1 st b2 <> b3 & b4,b5,b2 is_collinear & b4,b5,b3 is_collinear & b2,b3,b6 is_collinear holds
b4,b5,b6 is_collinear
proof end;

theorem Th42: :: DIRAF:42
for b1 being OAffinSpace holds
not for b2, b3, b4 being Element of b1 holds b2,b3,b4 is_collinear
proof end;

theorem Th43: :: DIRAF:43
for b1 being OAffinSpace
for b2, b3 being Element of b1 st b2 <> b3 holds
ex b4 being Element of b1 st not b2,b3,b4 is_collinear
proof end;

theorem Th44: :: DIRAF:44
canceled;

theorem Th45: :: DIRAF:45
for b1 being OAffinSpace
for b2 being non empty AffinStruct st b2 = Lambda b1 holds
for b3, b4, b5, b6 being Element of b1
for b7, b8, b9, b10 being Element of b2 st b3 = b7 & b4 = b8 & b5 = b9 & b6 = b10 holds
( b7,b8 // b9,b10 iff b3,b4 '||' b5,b6 )
proof end;

theorem Th46: :: DIRAF:46
for b1 being OAffinSpace
for b2 being non empty AffinStruct st b2 = Lambda b1 holds
( ex b3, b4 being Element of b2 st b3 <> b4 & ( for b3, b4, b5, b6, b7, b8 being Element of b2 holds
( b3,b4 // b4,b3 & b3,b4 // b5,b5 & ( b3 <> b4 & b3,b4 // b5,b6 & b3,b4 // b7,b8 implies b5,b6 // b7,b8 ) & ( b3,b4 // b3,b5 implies b4,b3 // b4,b5 ) ) ) & not for b3, b4, b5 being Element of b2 holds b3,b4 // b3,b5 & ( for b3, b4, b5 being Element of b2 ex b6 being Element of b2 st
( b3,b5 // b4,b6 & b4 <> b6 ) ) & ( for b3, b4, b5 being Element of b2 ex b6 being Element of b2 st
( b3,b4 // b5,b6 & b3,b5 // b4,b6 ) ) & ( for b3, b4, b5, b6 being Element of b2 st b5,b3 // b3,b6 & b3 <> b5 holds
ex b7 being Element of b2 st
( b4,b3 // b3,b7 & b4,b5 // b6,b7 ) ) )
proof end;

definition
let c1 be non empty AffinStruct ;
canceled;
attr a1 is AffinSpace-like means :Def7: :: DIRAF:def 7
( ( for b1, b2, b3, b4, b5, b6 being Element of a1 holds
( b1,b2 // b2,b1 & b1,b2 // b3,b3 & ( b1 <> b2 & b1,b2 // b3,b4 & b1,b2 // b5,b6 implies b3,b4 // b5,b6 ) & ( b1,b2 // b1,b3 implies b2,b1 // b2,b3 ) ) ) & not for b1, b2, b3 being Element of a1 holds b1,b2 // b1,b3 & ( for b1, b2, b3 being Element of a1 ex b4 being Element of a1 st
( b1,b3 // b2,b4 & b2 <> b4 ) ) & ( for b1, b2, b3 being Element of a1 ex b4 being Element of a1 st
( b1,b2 // b3,b4 & b1,b3 // b2,b4 ) ) & ( for b1, b2, b3, b4 being Element of a1 st b3,b1 // b1,b4 & b1 <> b3 holds
ex b5 being Element of a1 st
( b2,b1 // b1,b5 & b2,b3 // b4,b5 ) ) );
end;

:: deftheorem Def6 DIRAF:def 6 :
canceled;

:: deftheorem Def7 defines AffinSpace-like DIRAF:def 7 :
for b1 being non empty AffinStruct holds
( b1 is AffinSpace-like iff ( ( for b2, b3, b4, b5, b6, b7 being Element of b1 holds
( b2,b3 // b3,b2 & b2,b3 // b4,b4 & ( b2 <> b3 & b2,b3 // b4,b5 & b2,b3 // b6,b7 implies b4,b5 // b6,b7 ) & ( b2,b3 // b2,b4 implies b3,b2 // b3,b4 ) ) ) & not for b2, b3, b4 being Element of b1 holds b2,b3 // b2,b4 & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b4 // b3,b5 & b3 <> b5 ) ) & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b3 // b4,b5 & b2,b4 // b3,b5 ) ) & ( for b2, b3, b4, b5 being Element of b1 st b4,b2 // b2,b5 & b2 <> b4 holds
ex b6 being Element of b1 st
( b3,b2 // b2,b6 & b3,b4 // b5,b6 ) ) ) );

registration
cluster non empty non trivial strict AffinSpace-like AffinStruct ;
existence
ex b1 being non empty AffinStruct st
( b1 is strict & not b1 is trivial & b1 is AffinSpace-like )
proof end;
end;

definition
mode AffinSpace is non empty non trivial AffinSpace-like AffinStruct ;
end;

theorem Th47: :: DIRAF:47
for b1 being AffinSpace holds
( ex b2, b3 being Element of b1 st b2 <> b3 & ( for b2, b3, b4, b5, b6, b7 being Element of b1 holds
( b2,b3 // b3,b2 & b2,b3 // b4,b4 & ( b2 <> b3 & b2,b3 // b4,b5 & b2,b3 // b6,b7 implies b4,b5 // b6,b7 ) & ( b2,b3 // b2,b4 implies b3,b2 // b3,b4 ) ) ) & not for b2, b3, b4 being Element of b1 holds b2,b3 // b2,b4 & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b4 // b3,b5 & b3 <> b5 ) ) & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b3 // b4,b5 & b2,b4 // b3,b5 ) ) & ( for b2, b3, b4, b5 being Element of b1 st b4,b2 // b2,b5 & b2 <> b4 holds
ex b6 being Element of b1 st
( b3,b2 // b2,b6 & b3,b4 // b5,b6 ) ) ) by Def7, REALSET2:def 7;

theorem Th48: :: DIRAF:48
for b1 being OAffinSpace holds Lambda b1 is AffinSpace
proof end;

theorem Th49: :: DIRAF:49
for b1 being non empty AffinStruct holds
( ( ex b2, b3 being Element of b1 st b2 <> b3 & ( for b2, b3, b4, b5, b6, b7 being Element of b1 holds
( b2,b3 // b3,b2 & b2,b3 // b4,b4 & ( b2 <> b3 & b2,b3 // b4,b5 & b2,b3 // b6,b7 implies b4,b5 // b6,b7 ) & ( b2,b3 // b2,b4 implies b3,b2 // b3,b4 ) ) ) & not for b2, b3, b4 being Element of b1 holds b2,b3 // b2,b4 & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b4 // b3,b5 & b3 <> b5 ) ) & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b3 // b4,b5 & b2,b4 // b3,b5 ) ) & ( for b2, b3, b4, b5 being Element of b1 st b4,b2 // b2,b5 & b2 <> b4 holds
ex b6 being Element of b1 st
( b3,b2 // b2,b6 & b3,b4 // b5,b6 ) ) ) iff b1 is AffinSpace ) by Def7, REALSET2:def 7;

theorem Th50: :: DIRAF:50
for b1 being OAffinPlane
for b2, b3, b4, b5 being Element of b1 st not b2,b3 '||' b4,b5 holds
ex b6 being Element of b1 st
( b2,b3 '||' b2,b6 & b4,b5 '||' b4,b6 )
proof end;

theorem Th51: :: DIRAF:51
for b1 being non empty AffinStruct
for b2 being OAffinPlane st b1 = Lambda b2 holds
for b3, b4, b5, b6 being Element of b1 st not b3,b4 // b5,b6 holds
ex b7 being Element of b1 st
( b3,b4 // b3,b7 & b5,b6 // b5,b7 )
proof end;

definition
let c1 be non empty AffinStruct ;
attr a1 is 2-dimensional means :Def8: :: DIRAF:def 8
for b1, b2, b3, b4 being Element of a1 st not b1,b2 // b3,b4 holds
ex b5 being Element of a1 st
( b1,b2 // b1,b5 & b3,b4 // b3,b5 );
end;

:: deftheorem Def8 defines 2-dimensional DIRAF:def 8 :
for b1 being non empty AffinStruct holds
( b1 is 2-dimensional iff for b2, b3, b4, b5 being Element of b1 st not b2,b3 // b4,b5 holds
ex b6 being Element of b1 st
( b2,b3 // b2,b6 & b4,b5 // b4,b6 ) );

registration
cluster strict 2-dimensional AffinStruct ;
existence
ex b1 being AffinSpace st
( b1 is strict & b1 is 2-dimensional )
proof end;
end;

definition
mode AffinPlane is 2-dimensional AffinSpace;
end;

theorem Th52: :: DIRAF:52
canceled;

theorem Th53: :: DIRAF:53
for b1 being OAffinPlane holds Lambda b1 is AffinPlane
proof end;

theorem Th54: :: DIRAF:54
for b1 being non empty AffinStruct holds
( b1 is AffinPlane iff ( ex b2, b3 being Element of b1 st b2 <> b3 & ( for b2, b3, b4, b5, b6, b7 being Element of b1 holds
( b2,b3 // b3,b2 & b2,b3 // b4,b4 & ( b2 <> b3 & b2,b3 // b4,b5 & b2,b3 // b6,b7 implies b4,b5 // b6,b7 ) & ( b2,b3 // b2,b4 implies b3,b2 // b3,b4 ) ) ) & not for b2, b3, b4 being Element of b1 holds b2,b3 // b2,b4 & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b4 // b3,b5 & b3 <> b5 ) ) & ( for b2, b3, b4 being Element of b1 ex b5 being Element of b1 st
( b2,b3 // b4,b5 & b2,b4 // b3,b5 ) ) & ( for b2, b3, b4, b5 being Element of b1 st b4,b2 // b2,b5 & b2 <> b4 holds
ex b6 being Element of b1 st
( b3,b2 // b2,b6 & b3,b4 // b5,b6 ) ) & ( for b2, b3, b4, b5 being Element of b1 st not b2,b3 // b4,b5 holds
ex b6 being Element of b1 st
( b2,b3 // b2,b6 & b4,b5 // b4,b6 ) ) ) ) by Def7, Def8, REALSET2:def 7;