:: COLLSP semantic presentation

definition
let X be set ;
mode Relation3 of c1 -> set means :Def1: :: COLLSP:def 1
it c= [:X,X,X:];
existence
ex b1 being set st b1 c= [:X,X,X:]
;
end;

:: deftheorem Def1 defines Relation3 COLLSP:def 1 :
for X, b2 being set holds
( b2 is Relation3 of X iff b2 c= [:X,X,X:] );

theorem Th1: :: COLLSP:1
canceled;

theorem Th2: :: COLLSP:2
for X being set holds
( X = {} or ex a being set st
( {a} = X or ex a, b being set st
( a <> b & a in X & b in X ) ) )
proof end;

definition
attr a1 is strict;
struct CollStr -> 1-sorted ;
aggr CollStr(# carrier, Collinearity #) -> CollStr ;
sel Collinearity c1 -> Relation3 of the carrier of a1;
end;

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

definition
let CS be non empty CollStr ;
let a be Point of CS;
let b be Point of CS;
let c be Point of CS;
pred c2,c3,c4 is_collinear means :Def2: :: COLLSP:def 2
[a,b,c] in the Collinearity of CS;
end;

:: deftheorem Def2 defines is_collinear COLLSP:def 2 :
for CS being non empty CollStr
for a, b, c being Point of CS holds
( a,b,c is_collinear iff [a,b,c] in the Collinearity of CS );

set Z = {1};

Lemma29: 1 in {1}
by TARSKI:def 1;

Lemma30: {[1,1,1]} c= [:{1},{1},{1}:]
proof end;

reconsider Z = {1} as non empty set by TARSKI:def 1;

reconsider RR = {[1,1,1]} as Relation3 of Z by , ;

reconsider CLS = CollStr(# Z,RR #) as non empty CollStr by STRUCT_0:def 1;

E34: now
E19: for z1, z2, z3 being Point of CLS holds [z1,z2,z3] in the Collinearity of CLS
proof
let z1 be Point of CLS, z2 be Point of CLS, z3 be Point of CLS;
( z1 = 1 & z2 = 1 & z3 = 1 ) by TARSKI:def 1;
hence [z1,z2,z3] in the Collinearity of CLS by TARSKI:def 1;
end;
let a be Point of CLS, b be Point of CLS, c be Point of CLS, p be Point of CLS, q be Point of CLS, r be Point of CLS;
thus ( ( a = b or a = c or b = c ) implies [a,b,c] in the Collinearity of CLS ) by ;
thus ( a <> b & [a,b,p] in the Collinearity of CLS & [a,b,q] in the Collinearity of CLS & [a,b,r] in the Collinearity of CLS implies [p,q,r] in the Collinearity of CLS ) by ;
end;

definition
let IT be non empty CollStr ;
attr a1 is reflexive means :Def3: :: COLLSP:def 3
for a, b, c being Point of Z st ( a = b or a = c or b = c ) holds
[a,b,c] in the Collinearity of Z;
end;

:: deftheorem Def3 defines reflexive COLLSP:def 3 :
for IT being non empty CollStr holds
( IT is reflexive iff for a, b, c being Point of IT st ( a = b or a = c or b = c ) holds
[a,b,c] in the Collinearity of IT );

definition
let IT be non empty CollStr ;
attr a1 is transitive means :Def4: :: COLLSP:def 4
for a, b, p, q, r being Point of Z st a <> b & [a,b,p] in the Collinearity of Z & [a,b,q] in the Collinearity of Z & [a,b,r] in the Collinearity of Z holds
[p,q,r] in the Collinearity of Z;
end;

:: deftheorem Def4 defines transitive COLLSP:def 4 :
for IT being non empty CollStr holds
( IT is transitive iff for a, b, p, q, r being Point of IT st a <> b & [a,b,p] in the Collinearity of IT & [a,b,q] in the Collinearity of IT & [a,b,r] in the Collinearity of IT holds
[p,q,r] in the Collinearity of IT );

registration
cluster non empty strict reflexive transitive CollStr ;
existence
ex b1 being non empty CollStr st
( b1 is strict & b1 is reflexive & b1 is transitive )
proof end;
end;

definition
mode CollSp is non empty reflexive transitive CollStr ;
end;

theorem Th3: :: COLLSP:3
canceled;

theorem Th4: :: COLLSP:4
canceled;

theorem Th5: :: COLLSP:5
canceled;

theorem Th6: :: COLLSP:6
canceled;

theorem Th7: :: COLLSP:7
for CLSP being CollSp
for a, b, c being Point of CLSP st ( a = b or a = c or b = c ) holds
a,b,c is_collinear
proof end;

theorem Th8: :: COLLSP:8
for CLSP being CollSp
for a, b, p, q, r being Point of CLSP st a <> b & a,b,p is_collinear & a,b,q is_collinear & a,b,r is_collinear holds
p,q,r is_collinear
proof end;

theorem Th9: :: COLLSP:9
for CLSP being CollSp
for a, b, c being Point of CLSP st a,b,c is_collinear holds
( b,a,c is_collinear & a,c,b is_collinear )
proof end;

theorem Th10: :: COLLSP:10
for CLSP being CollSp
for a, b being Point of CLSP holds a,b,a is_collinear by ;

theorem Th11: :: COLLSP:11
for CLSP being CollSp
for a, b, c, d being Point of CLSP st a <> b & a,b,c is_collinear & a,b,d is_collinear holds
a,c,d is_collinear
proof end;

theorem Th12: :: COLLSP:12
for CLSP being CollSp
for a, b, c being Point of CLSP st a,b,c is_collinear holds
b,a,c is_collinear by ;

theorem Th13: :: COLLSP:13
for CLSP being CollSp
for a, b, c being Point of CLSP st a,b,c is_collinear holds
b,c,a is_collinear
proof end;

theorem Th14: :: COLLSP:14
for CLSP being CollSp
for p, q, a, b, r being Point of CLSP st p <> q & a,b,p is_collinear & a,b,q is_collinear & p,q,r is_collinear holds
a,b,r is_collinear
proof end;

definition
let CLSP be CollSp;
let a be Point of CLSP;
let b be Point of CLSP;
func Line c2,c3 -> set equals :: COLLSP:def 5
{ p where p is Point of Z : Z,RR,p is_collinear } ;
correctness
coherence
{ p where p is Point of CLSP : a,b,p is_collinear } is set
;
;
end;

:: deftheorem Def5 defines Line COLLSP:def 5 :
for CLSP being CollSp
for a, b being Point of CLSP holds Line a,b = { p where p is Point of CLSP : a,b,p is_collinear } ;

theorem Th15: :: COLLSP:15
canceled;

theorem Th16: :: COLLSP:16
for CLSP being CollSp
for a, b being Point of CLSP holds
( a in Line a,b & b in Line a,b )
proof end;

theorem Th17: :: COLLSP:17
for CLSP being CollSp
for a, b, r being Point of CLSP holds
( a,b,r is_collinear iff r in Line a,b )
proof end;

set Z = {1,2,3};

set RR = { [i,j,k] where i is Element of NAT , j is Element of NAT , k is Element of NAT : ( ( i = j or j = k or k = i ) & i in {1,2,3} & j in {1,2,3} & k in {1,2,3} ) } ;

Lemma56: { [i,j,k] where i is Element of NAT , j is Element of NAT , k is Element of NAT : ( ( i = j or j = k or k = i ) & i in {1,2,3} & j in {1,2,3} & k in {1,2,3} ) } c= [:{1,2,3},{1,2,3},{1,2,3}:]
proof end;

reconsider Z = {1,2,3} as non empty set by ENUMSET1:def 1;

reconsider RR = { [i,j,k] where i is Element of NAT , j is Element of NAT , k is Element of NAT : ( ( i = j or j = k or k = i ) & i in {1,2,3} & j in {1,2,3} & k in {1,2,3} ) } as Relation3 of Z by , ;

reconsider CLS = CollStr(# Z,RR #) as non empty CollStr by STRUCT_0:def 1;

Lemma57: for a, b, c being Point of CLS holds
( [a,b,c] in RR iff ( ( a = b or b = c or c = a ) & a in Z & b in Z & c in Z ) )
proof end;

Lemma58: for a, b, c, p, q, r being Point of CLS st a <> b & [a,b,p] in the Collinearity of CLS & [a,b,q] in the Collinearity of CLS & [a,b,r] in the Collinearity of CLS holds
[p,q,r] in the Collinearity of CLS
proof end;

Lemma59: not for a, b, c being Point of CLS holds a,b,c is_collinear
proof end;

Lemma60: CLS is CollSp
proof end;

definition
let IT be non empty CollStr ;
attr a1 is proper means :Def6: :: COLLSP:def 6
not for a, b, c being Point of Z holds a,b,c is_collinear ;
end;

:: deftheorem Def6 defines proper COLLSP:def 6 :
for IT being non empty CollStr holds
( IT is proper iff not for a, b, c being Point of IT holds a,b,c is_collinear );

registration
cluster strict proper CollStr ;
existence
ex b1 being CollSp st
( b1 is strict & b1 is proper )
proof end;
end;

theorem Th18: :: COLLSP:18
canceled;

theorem Th19: :: COLLSP:19
for CLSP being proper CollSp
for p, q being Point of CLSP st p <> q holds
ex r being Point of CLSP st not p,q,r is_collinear
proof end;

definition
let CLSP be proper CollSp;
mode LINE of c1 -> set means :Def7: :: COLLSP:def 7
ex a, b being Point of Z st
( a <> b & it = Line a,b );
existence
ex b1 being set ex a, b being Point of CLSP st
( a <> b & b1 = Line a,b )
proof end;
end;

:: deftheorem Def7 defines LINE COLLSP:def 7 :
for CLSP being proper CollSp
for b2 being set holds
( b2 is LINE of CLSP iff ex a, b being Point of CLSP st
( a <> b & b2 = Line a,b ) );

theorem Th20: :: COLLSP:20
canceled;

theorem Th21: :: COLLSP:21
canceled;

theorem Th22: :: COLLSP:22
for CLSP being proper CollSp
for a, b being Point of CLSP st a = b holds
Line a,b = the carrier of CLSP
proof end;

theorem Th23: :: COLLSP:23
for CLSP being proper CollSp
for P being LINE of CLSP ex a, b being Point of CLSP st
( a <> b & a in P & b in P )
proof end;

theorem Th24: :: COLLSP:24
for CLSP being proper CollSp
for a, b being Point of CLSP st a <> b holds
ex P being LINE of CLSP st
( a in P & b in P )
proof end;

theorem Th25: :: COLLSP:25
for CLSP being proper CollSp
for p, q, r being Point of CLSP
for P being LINE of CLSP st p in P & q in P & r in P holds
p,q,r is_collinear
proof end;

Lemma70: for CLSP being proper CollSp
for P being LINE of CLSP
for x being set st x in P holds
x is Point of CLSP
proof end;

theorem Th26: :: COLLSP:26
for CLSP being proper CollSp
for P, Q being LINE of CLSP st P c= Q holds
P = Q
proof end;

theorem Th27: :: COLLSP:27
for CLSP being proper CollSp
for p, q being Point of CLSP
for P being LINE of CLSP st p <> q & p in P & q in P holds
Line p,q c= P
proof end;

theorem Th28: :: COLLSP:28
for CLSP being proper CollSp
for p, q being Point of CLSP
for P being LINE of CLSP st p <> q & p in P & q in P holds
Line p,q = P
proof end;

theorem Th29: :: COLLSP:29
for CLSP being proper CollSp
for p, q being Point of CLSP
for P, Q being LINE of CLSP st p <> q & p in P & q in P & p in Q & q in Q holds
P = Q
proof end;

theorem Th30: :: COLLSP:30
for CLSP being proper CollSp
for P, Q being LINE of CLSP holds
( P = Q or P misses Q or ex p being Point of CLSP st P /\ Q = {p} )
proof end;

theorem Th31: :: COLLSP:31
for CLSP being proper CollSp
for a, b being Point of CLSP st a <> b holds
Line a,b <> the carrier of CLSP
proof end;