:: GEOMTRAP semantic presentation

definition
let c1 be RealLinearSpace;
let c2, c3, c4, c5 be VECTOR of c1;
pred c2,c3 '||' c4,c5 means :Def1: :: GEOMTRAP:def 1
( a2,a3 // a4,a5 or a2,a3 // a5,a4 );
end;

:: deftheorem Def1 defines '||' GEOMTRAP:def 1 :
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 holds
( b2,b3 '||' b4,b5 iff ( b2,b3 // b4,b5 or b2,b3 // b5,b4 ) );

theorem Th1: :: GEOMTRAP:1
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
OASpace b1 is OAffinSpace
proof end;

theorem Th2: :: GEOMTRAP:2
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1
for b6, b7, b8, b9 being Element of (OASpace b1) st b6 = b2 & b7 = b3 & b8 = b4 & b9 = b5 holds
( b6,b7 // b8,b9 iff b2,b3 // b4,b5 )
proof end;

theorem Th3: :: GEOMTRAP:3
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 st Gen b2,b3 holds
for b8, b9, b10, b11 being Element of the carrier of (Lambda (OASpace b1)) st b8 = b4 & b9 = b5 & b10 = b6 & b11 = b7 holds
( b8,b9 // b10,b11 iff b4,b5 '||' b6,b7 )
proof end;

theorem Th4: :: GEOMTRAP:4
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1
for b8, b9, b10, b11 being Element of the carrier of (AMSpace b1,b2,b3) st b8 = b4 & b9 = b5 & b10 = b6 & b11 = b7 holds
( b8,b9 // b10,b11 iff b4,b5 '||' b6,b7 )
proof end;

definition
let c1 be RealLinearSpace;
let c2, c3 be VECTOR of c1;
func c2 # c3 -> VECTOR of a1 means :Def2: :: GEOMTRAP:def 2
a4 + a4 = a2 + a3;
existence
ex b1 being VECTOR of c1 st b1 + b1 = c2 + c3
proof end;
uniqueness
for b1, b2 being VECTOR of c1 st b1 + b1 = c2 + c3 & b2 + b2 = c2 + c3 holds
b1 = b2
proof end;
commutativity
for b1, b2, b3 being VECTOR of c1 st b1 + b1 = b2 + b3 holds
b1 + b1 = b3 + b2
;
idempotence
for b1 being VECTOR of c1 holds b1 + b1 = b1 + b1
;
end;

:: deftheorem Def2 defines # GEOMTRAP:def 2 :
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 holds
( b4 = b2 # b3 iff b4 + b4 = b2 + b3 );

theorem Th5: :: GEOMTRAP:5
canceled;

theorem Th6: :: GEOMTRAP:6
canceled;

theorem Th7: :: GEOMTRAP:7
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 ex b4 being VECTOR of b1 st b2 # b4 = b3
proof end;

theorem Th8: :: GEOMTRAP:8
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 holds (b2 # b3) # (b4 # b5) = (b2 # b4) # (b3 # b5)
proof end;

theorem Th9: :: GEOMTRAP:9
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 st b2 # b3 = b2 # b4 holds
b3 = b4
proof end;

theorem Th10: :: GEOMTRAP:10
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 holds b2,b3 // b4 # b2,b4 # b3
proof end;

theorem Th11: :: GEOMTRAP:11
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 holds b2,b3 '||' b4 # b2,b4 # b3
proof end;

theorem Th12: :: GEOMTRAP:12
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 holds
( 2 * ((b2 # b3) - b2) = b3 - b2 & 2 * (b3 - (b2 # b3)) = b3 - b2 )
proof end;

theorem Th13: :: GEOMTRAP:13
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 holds b2,b2 # b3 // b2 # b3,b3
proof end;

theorem Th14: :: GEOMTRAP:14
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 holds
( b2,b3 // b2,b2 # b3 & b2,b3 // b2 # b3,b3 )
proof end;

Lemma14: for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 st b2,b3 // b3,b4 holds
( b4,b3 // b3,b2 & b2,b3 // b2,b4 & b3,b4 // b2,b4 )
proof end;

theorem Th15: :: GEOMTRAP:15
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 st b2,b3 // b3,b4 holds
b2 # b3,b3 // b3,b3 # b4
proof end;

theorem Th16: :: GEOMTRAP:16
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st b2,b3 // b4,b5 holds
b2,b3 // b2 # b4,b3 # b5
proof end;

Lemma17: for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st b2,b3 // b4,b5 holds
b2,b3 '||' b2 # b5,b3 # b4
proof end;

Lemma18: for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st b2 # b3 = b4 # b5 holds
b4 - b2 = - (b5 - b3)
proof end;

Lemma19: for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_Ort_wrt b2,b3 holds
( b6,b7,b4,b5 are_Ort_wrt b2,b3 & b4,b5,b7,b6 are_Ort_wrt b2,b3 )
proof end;

Lemma20: for b1 being RealLinearSpace
for b2, b3, b4, b5, b6 being VECTOR of b1 st Gen b2,b3 holds
b4,b5,b6,b6 are_Ort_wrt b2,b3
proof end;

Lemma21: for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_Ort_wrt b2,b3 & b4,b5,b6,b8 are_Ort_wrt b2,b3 holds
b4,b5,b7,b8 are_Ort_wrt b2,b3
proof end;

Lemma22: for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st Gen b2,b3 & b4,b5,b4,b5 are_Ort_wrt b2,b3 holds
b4 = b5
proof end;

Lemma23: for b1 being RealLinearSpace
for b2, b3, b4, b5, b6 being VECTOR of b1 st Gen b2,b3 holds
( b4,b5,b6,b6 are_Ort_wrt b2,b3 & b6,b6,b4,b5 are_Ort_wrt b2,b3 )
proof end;

Lemma24: for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8, b9 being VECTOR of b1 st Gen b2,b3 & ( b4,b5 '||' b6,b7 or b6,b7 '||' b4,b5 ) & ( b8,b9,b6,b7 are_Ort_wrt b2,b3 or b6,b7,b8,b9 are_Ort_wrt b2,b3 ) & b6 <> b7 holds
( b4,b5,b8,b9 are_Ort_wrt b2,b3 & b8,b9,b4,b5 are_Ort_wrt b2,b3 )
proof end;

definition
let c1 be RealLinearSpace;
let c2, c3, c4, c5, c6, c7 be VECTOR of c1;
pred c4,c5,c6,c7 are_DTr_wrt c2,c3 means :Def3: :: GEOMTRAP:def 3
( a4,a5 // a6,a7 & a4,a5,a4 # a5,a6 # a7 are_Ort_wrt a2,a3 & a6,a7,a4 # a5,a6 # a7 are_Ort_wrt a2,a3 );
end;

:: deftheorem Def3 defines are_DTr_wrt GEOMTRAP:def 3 :
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 holds
( b4,b5,b6,b7 are_DTr_wrt b2,b3 iff ( b4,b5 // b6,b7 & b4,b5,b4 # b5,b6 # b7 are_Ort_wrt b2,b3 & b6,b7,b4 # b5,b6 # b7 are_Ort_wrt b2,b3 ) );

theorem Th17: :: GEOMTRAP:17
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st Gen b2,b3 holds
b4,b4,b5,b5 are_DTr_wrt b2,b3
proof end;

theorem Th18: :: GEOMTRAP:18
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st Gen b2,b3 holds
b4,b5,b4,b5 are_DTr_wrt b2,b3
proof end;

theorem Th19: :: GEOMTRAP:19
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st b2,b3,b3,b2 are_DTr_wrt b4,b5 holds
b2 = b3
proof end;

theorem Th20: :: GEOMTRAP:20
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6 being VECTOR of b1 st Gen b2,b3 & b4,b5,b5,b6 are_DTr_wrt b2,b3 holds
( b4 = b5 & b5 = b6 )
proof end;

theorem Th21: :: GEOMTRAP:21
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8, b9 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_DTr_wrt b2,b3 & b4,b5,b8,b9 are_DTr_wrt b2,b3 & b4 <> b5 holds
b6,b7,b8,b9 are_DTr_wrt b2,b3
proof end;

theorem Th22: :: GEOMTRAP:22
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6 being VECTOR of b1 st Gen b2,b3 holds
ex b7 being VECTOR of b1 st
( b4,b5,b6,b7 are_DTr_wrt b2,b3 or b4,b5,b7,b6 are_DTr_wrt b2,b3 )
proof end;

theorem Th23: :: GEOMTRAP:23
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_DTr_wrt b2,b3 holds
b6,b7,b4,b5 are_DTr_wrt b2,b3
proof end;

theorem Th24: :: GEOMTRAP:24
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_DTr_wrt b2,b3 holds
b5,b4,b7,b6 are_DTr_wrt b2,b3
proof end;

Lemma32: for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8, b9 being VECTOR of b1 st Gen b2,b3 & b4 <> b5 & b4,b5 '||' b4,b6 & b4,b5 '||' b4,b7 & b4,b5 '||' b4,b8 & b4,b5 '||' b4,b9 holds
b6,b7 '||' b8,b9
proof end;

theorem Th25: :: GEOMTRAP:25
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6 being VECTOR of b1 st Gen b2,b3 & b4,b5,b4,b6 are_DTr_wrt b2,b3 holds
b5 = b6
proof end;

theorem Th26: :: GEOMTRAP:26
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_DTr_wrt b2,b3 & b4,b5,b6,b8 are_DTr_wrt b2,b3 & not b4 = b5 holds
b7 = b8
proof end;

theorem Th27: :: GEOMTRAP:27
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8 being VECTOR of b1 st Gen b2,b3 & b4 <> b5 & b4,b5,b6,b7 are_DTr_wrt b2,b3 & ( b4,b5,b6,b8 are_DTr_wrt b2,b3 or b4,b5,b8,b6 are_DTr_wrt b2,b3 ) holds
b7 = b8
proof end;

theorem Th28: :: GEOMTRAP:28
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_DTr_wrt b2,b3 holds
b4,b5,b4 # b6,b5 # b7 are_DTr_wrt b2,b3
proof end;

theorem Th29: :: GEOMTRAP:29
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 st Gen b2,b3 & b4,b5,b6,b7 are_DTr_wrt b2,b3 & not b4,b5,b4 # b7,b5 # b6 are_DTr_wrt b2,b3 holds
b4,b5,b5 # b6,b4 # b7 are_DTr_wrt b2,b3
proof end;

theorem Th30: :: GEOMTRAP:30
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12 being VECTOR of b1 st Gen b2,b3 & b4 = b5 # b9 & b4 = b6 # b10 & b4 = b7 # b11 & b4 = b8 # b12 & b5,b6,b7,b8 are_DTr_wrt b2,b3 holds
b9,b10,b11,b12 are_DTr_wrt b2,b3
proof end;

Lemma39: for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1
for b6, b7, b8, b9 being Real st b2 = (b6 * b3) + (b7 * b4) & b5 = (b8 * b3) + (b9 * b4) holds
( b2 + b5 = ((b6 + b8) * b3) + ((b7 + b9) * b4) & b2 - b5 = ((b6 - b8) * b3) + ((b7 - b9) * b4) )
proof end;

Lemma40: for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1
for b5, b6, b7 being Real st b2 = (b5 * b3) + (b6 * b4) holds
b7 * b2 = ((b7 * b5) * b3) + ((b7 * b6) * b4)
proof end;

Lemma41: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7 being Real st Gen b2,b3 & (b4 * b2) + (b5 * b3) = (b6 * b2) + (b7 * b3) holds
( b4 = b6 & b5 = b7 )
proof end;

definition
let c1 be RealLinearSpace;
let c2, c3, c4 be VECTOR of c1;
assume E42: Gen c2,c3 ;
func pr1 c2,c3,c4 -> Real means :Def4: :: GEOMTRAP:def 4
ex b1 being Real st a4 = (a5 * a2) + (b1 * a3);
existence
ex b1, b2 being Real st c4 = (b1 * c2) + (b2 * c3)
by E42, ANALMETR:def 1;
uniqueness
for b1, b2 being Real st ex b3 being Real st c4 = (b1 * c2) + (b3 * c3) & ex b3 being Real st c4 = (b2 * c2) + (b3 * c3) holds
b1 = b2
by E42, Lemma41;
end;

:: deftheorem Def4 defines pr1 GEOMTRAP:def 4 :
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 st Gen b2,b3 holds
for b5 being Real holds
( b5 = pr1 b2,b3,b4 iff ex b6 being Real st b4 = (b5 * b2) + (b6 * b3) );

definition
let c1 be RealLinearSpace;
let c2, c3, c4 be VECTOR of c1;
assume E43: Gen c2,c3 ;
func pr2 c2,c3,c4 -> Real means :Def5: :: GEOMTRAP:def 5
ex b1 being Real st a4 = (b1 * a2) + (a5 * a3);
existence
ex b1, b2 being Real st c4 = (b2 * c2) + (b1 * c3)
proof end;
uniqueness
for b1, b2 being Real st ex b3 being Real st c4 = (b3 * c2) + (b1 * c3) & ex b3 being Real st c4 = (b3 * c2) + (b2 * c3) holds
b1 = b2
by E43, Lemma41;
end;

:: deftheorem Def5 defines pr2 GEOMTRAP:def 5 :
for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 st Gen b2,b3 holds
for b5 being Real holds
( b5 = pr2 b2,b3,b4 iff ex b6 being Real st b4 = (b6 * b2) + (b5 * b3) );

Lemma44: for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1 st Gen b2,b3 holds
b4 = ((pr1 b2,b3,b4) * b2) + ((pr2 b2,b3,b4) * b3)
proof end;

Lemma45: for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1
for b5, b6 being Real st Gen b2,b3 & b4 = (b5 * b2) + (b6 * b3) holds
( b5 = pr1 b2,b3,b4 & b6 = pr2 b2,b3,b4 )
proof end;

Lemma46: for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1
for b6 being Real st Gen b2,b3 holds
( pr1 b2,b3,(b4 + b5) = (pr1 b2,b3,b4) + (pr1 b2,b3,b5) & pr2 b2,b3,(b4 + b5) = (pr2 b2,b3,b4) + (pr2 b2,b3,b5) & pr1 b2,b3,(b4 - b5) = (pr1 b2,b3,b4) - (pr1 b2,b3,b5) & pr2 b2,b3,(b4 - b5) = (pr2 b2,b3,b4) - (pr2 b2,b3,b5) & pr1 b2,b3,(b6 * b4) = b6 * (pr1 b2,b3,b4) & pr2 b2,b3,(b6 * b4) = b6 * (pr2 b2,b3,b4) )
proof end;

Lemma47: for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 st Gen b2,b3 holds
( 2 * (pr1 b2,b3,(b4 # b5)) = (pr1 b2,b3,b4) + (pr1 b2,b3,b5) & 2 * (pr2 b2,b3,(b4 # b5)) = (pr2 b2,b3,b4) + (pr2 b2,b3,b5) )
proof end;

Lemma48: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 holds (- b2) + (- b3) = - (b2 + b3)
proof end;

Lemma49: for b1 being RealLinearSpace
for b2, b3, b4 being VECTOR of b1
for b5, b6 being Real holds (b2 + (b5 * b3)) - (b4 + (b6 * b3)) = (b2 - b4) + ((b5 - b6) * b3)
proof end;

definition
let c1 be RealLinearSpace;
let c2, c3, c4, c5 be VECTOR of c1;
func PProJ c2,c3,c4,c5 -> Real equals :: GEOMTRAP:def 6
((pr1 a2,a3,a4) * (pr1 a2,a3,a5)) + ((pr2 a2,a3,a4) * (pr2 a2,a3,a5));
correctness
coherence
((pr1 c2,c3,c4) * (pr1 c2,c3,c5)) + ((pr2 c2,c3,c4) * (pr2 c2,c3,c5)) is Real
;
;
end;

:: deftheorem Def6 defines PProJ GEOMTRAP:def 6 :
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 holds PProJ b2,b3,b4,b5 = ((pr1 b2,b3,b4) * (pr1 b2,b3,b5)) + ((pr2 b2,b3,b4) * (pr2 b2,b3,b5));

theorem Th31: :: GEOMTRAP:31
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1 holds PProJ b2,b3,b4,b5 = PProJ b2,b3,b5,b4 ;

theorem Th32: :: GEOMTRAP:32
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6 being VECTOR of b1 holds
( PProJ b2,b3,b4,(b5 + b6) = (PProJ b2,b3,b4,b5) + (PProJ b2,b3,b4,b6) & PProJ b2,b3,b4,(b5 - b6) = (PProJ b2,b3,b4,b5) - (PProJ b2,b3,b4,b6) & PProJ b2,b3,(b5 - b6),b4 = (PProJ b2,b3,b5,b4) - (PProJ b2,b3,b6,b4) & PProJ b2,b3,(b5 + b6),b4 = (PProJ b2,b3,b5,b4) + (PProJ b2,b3,b6,b4) )
proof end;

theorem Th33: :: GEOMTRAP:33
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5 being VECTOR of b1
for b6 being Real holds
( PProJ b2,b3,(b6 * b4),b5 = b6 * (PProJ b2,b3,b4,b5) & PProJ b2,b3,b4,(b6 * b5) = b6 * (PProJ b2,b3,b4,b5) & PProJ b2,b3,(b6 * b4),b5 = (PProJ b2,b3,b4,b5) * b6 & PProJ b2,b3,b4,(b6 * b5) = (PProJ b2,b3,b4,b5) * b6 )
proof end;

theorem Th34: :: GEOMTRAP:34
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5 being VECTOR of b1 holds
( b4,b5 are_Ort_wrt b2,b3 iff PProJ b2,b3,b4,b5 = 0 )
proof end;

theorem Th35: :: GEOMTRAP:35
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6, b7 being VECTOR of b1 holds
( b4,b5,b6,b7 are_Ort_wrt b2,b3 iff PProJ b2,b3,(b5 - b4),(b7 - b6) = 0 )
proof end;

theorem Th36: :: GEOMTRAP:36
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6 being VECTOR of b1 holds 2 * (PProJ b2,b3,b4,(b5 # b6)) = (PProJ b2,b3,b4,b5) + (PProJ b2,b3,b4,b6)
proof end;

theorem Th37: :: GEOMTRAP:37
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5 being VECTOR of b1 st b4 <> b5 holds
PProJ b2,b3,(b4 - b5),(b4 - b5) <> 0
proof end;

theorem Th38: :: GEOMTRAP:38
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6, b7, b8 being VECTOR of b1
for b9 being Real st b4,b5,b6,b7 are_DTr_wrt b2,b3 & b4 <> b5 & b9 = ((PProJ b2,b3,(b4 - b5),(b4 + b5)) - (2 * (PProJ b2,b3,(b4 - b5),b6))) * ((PProJ b2,b3,(b4 - b5),(b4 - b5)) " ) & b8 = b6 + (b9 * (b4 - b5)) holds
b7 = b8
proof end;

Lemma57: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6, b7, b8, b9 being VECTOR of b1
for b10, b11 being Real st b4 <> b5 & b10 = ((PProJ b2,b3,(b4 - b5),(b4 + b5)) - (2 * (PProJ b2,b3,(b4 - b5),b6))) * ((PProJ b2,b3,(b4 - b5),(b4 - b5)) " ) & b11 = ((PProJ b2,b3,(b4 - b5),(b4 + b5)) - (2 * (PProJ b2,b3,(b4 - b5),b7))) * ((PProJ b2,b3,(b4 - b5),(b4 - b5)) " ) & b8 = b6 + (b10 * (b4 - b5)) & b9 = b7 + (b11 * (b4 - b5)) holds
( b9 - b8 = (b7 - b6) + ((b11 - b10) * (b4 - b5)) & b11 - b10 = ((- 2) * (PProJ b2,b3,(b4 - b5),(b7 - b6))) * ((PProJ b2,b3,(b4 - b5),(b4 - b5)) " ) )
proof end;

theorem Th39: :: GEOMTRAP:39
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6, b7, b8, b9, b10, b11, b12, b13 being VECTOR of b1 st b4 <> b5 & b4,b5,b6,b10 are_DTr_wrt b2,b3 & b4,b5,b7,b11 are_DTr_wrt b2,b3 & b4,b5,b8,b12 are_DTr_wrt b2,b3 & b4,b5,b9,b13 are_DTr_wrt b2,b3 & b6,b7 // b8,b9 holds
b10,b11 // b12,b13
proof end;

theorem Th40: :: GEOMTRAP:40
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6, b7, b8, b9, b10, b11 being VECTOR of b1 st b4 <> b5 & b4,b5,b6,b9 are_DTr_wrt b2,b3 & b4,b5,b7,b10 are_DTr_wrt b2,b3 & b4,b5,b8,b11 are_DTr_wrt b2,b3 & b8 = b6 # b7 holds
b11 = b9 # b10
proof end;

theorem Th41: :: GEOMTRAP:41
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6, b7, b8, b9 being VECTOR of b1 st b4 <> b5 & b4,b5,b6,b8 are_DTr_wrt b2,b3 & b4,b5,b7,b9 are_DTr_wrt b2,b3 holds
b4,b5,b6 # b7,b8 # b9 are_DTr_wrt b2,b3
proof end;

theorem Th42: :: GEOMTRAP:42
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
for b4, b5, b6, b7, b8, b9, b10, b11, b12, b13 being VECTOR of b1 st b4 <> b5 & b4,b5,b6,b10 are_DTr_wrt b2,b3 & b4,b5,b7,b11 are_DTr_wrt b2,b3 & b4,b5,b8,b12 are_DTr_wrt b2,b3 & b4,b5,b9,b13 are_DTr_wrt b2,b3 & b6,b7,b8,b9 are_Ort_wrt b2,b3 holds
b10,b11,b12,b13 are_Ort_wrt b2,b3
proof end;

theorem Th43: :: GEOMTRAP:43
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13 being VECTOR of b1 st Gen b2,b3 & b4 <> b5 & b4,b5,b6,b10 are_DTr_wrt b2,b3 & b4,b5,b7,b11 are_DTr_wrt b2,b3 & b4,b5,b8,b12 are_DTr_wrt b2,b3 & b4,b5,b9,b13 are_DTr_wrt b2,b3 & b6,b7,b8,b9 are_DTr_wrt b2,b3 holds
b10,b11,b12,b13 are_DTr_wrt b2,b3
proof end;

definition
let c1 be RealLinearSpace;
let c2, c3 be VECTOR of c1;
func DTrapezium c1,c2,c3 -> Relation of [:the carrier of a1,the carrier of a1:] means :Def7: :: GEOMTRAP:def 7
for b1, b2 being set holds
( [b1,b2] in a4 iff ex b3, b4, b5, b6 being VECTOR of a1 st
( b1 = [b3,b4] & b2 = [b5,b6] & b3,b4,b5,b6 are_DTr_wrt a2,a3 ) );
existence
ex b1 being Relation of [:the carrier of c1,the carrier of c1:] st
for b2, b3 being set holds
( [b2,b3] in b1 iff ex b4, b5, b6, b7 being VECTOR of c1 st
( b2 = [b4,b5] & b3 = [b6,b7] & b4,b5,b6,b7 are_DTr_wrt c2,c3 ) )
proof end;
uniqueness
for b1, b2 being Relation of [:the carrier of c1,the carrier of c1:] st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ex b5, b6, b7, b8 being VECTOR of c1 st
( b3 = [b5,b6] & b4 = [b7,b8] & b5,b6,b7,b8 are_DTr_wrt c2,c3 ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ex b5, b6, b7, b8 being VECTOR of c1 st
( b3 = [b5,b6] & b4 = [b7,b8] & b5,b6,b7,b8 are_DTr_wrt c2,c3 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def7 defines DTrapezium GEOMTRAP:def 7 :
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4 being Relation of [:the carrier of b1,the carrier of b1:] holds
( b4 = DTrapezium b1,b2,b3 iff for b5, b6 being set holds
( [b5,b6] in b4 iff ex b7, b8, b9, b10 being VECTOR of b1 st
( b5 = [b7,b8] & b6 = [b9,b10] & b7,b8,b9,b10 are_DTr_wrt b2,b3 ) ) );

theorem Th44: :: GEOMTRAP:44
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1 holds
( [[b2,b3],[b4,b5]] in DTrapezium b1,b6,b7 iff b2,b3,b4,b5 are_DTr_wrt b6,b7 )
proof end;

definition
let c1 be RealLinearSpace;
func MidPoint c1 -> BinOp of the carrier of a1 means :Def8: :: GEOMTRAP:def 8
for b1, b2 being VECTOR of a1 holds a2 . b1,b2 = b1 # b2;
existence
ex b1 being BinOp of the carrier of c1 st
for b2, b3 being VECTOR of c1 holds b1 . b2,b3 = b2 # b3
proof end;
uniqueness
for b1, b2 being BinOp of the carrier of c1 st ( for b3, b4 being VECTOR of c1 holds b1 . b3,b4 = b3 # b4 ) & ( for b3, b4 being VECTOR of c1 holds b2 . b3,b4 = b3 # b4 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def8 defines MidPoint GEOMTRAP:def 8 :
for b1 being RealLinearSpace
for b2 being BinOp of the carrier of b1 holds
( b2 = MidPoint b1 iff for b3, b4 being VECTOR of b1 holds b2 . b3,b4 = b3 # b4 );

definition
attr a1 is strict;
struct AfMidStruct -> AffinStruct , MidStr ;
aggr AfMidStruct(# carrier, MIDPOINT, CONGR #) -> AfMidStruct ;
end;

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

definition
let c1 be RealLinearSpace;
let c2, c3 be VECTOR of c1;
func DTrSpace c1,c2,c3 -> strict AfMidStruct equals :: GEOMTRAP:def 9
AfMidStruct(# the carrier of a1,(MidPoint a1),(DTrapezium a1,a2,a3) #);
correctness
coherence
AfMidStruct(# the carrier of c1,(MidPoint c1),(DTrapezium c1,c2,c3) #) is strict AfMidStruct
;
;
end;

:: deftheorem Def9 defines DTrSpace GEOMTRAP:def 9 :
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 holds DTrSpace b1,b2,b3 = AfMidStruct(# the carrier of b1,(MidPoint b1),(DTrapezium b1,b2,b3) #);

registration
let c1 be RealLinearSpace;
let c2, c3 be VECTOR of c1;
cluster DTrSpace a1,a2,a3 -> non empty strict ;
coherence
not DTrSpace c1,c2,c3 is empty
proof end;
end;

definition
let c1 be AfMidStruct ;
func Af c1 -> strict AffinStruct equals :: GEOMTRAP:def 10
AffinStruct(# the carrier of a1,the CONGR of a1 #);
correctness
coherence
AffinStruct(# the carrier of c1,the CONGR of c1 #) is strict AffinStruct
;
;
end;

:: deftheorem Def10 defines Af GEOMTRAP:def 10 :
for b1 being AfMidStruct holds Af b1 = AffinStruct(# the carrier of b1,the CONGR of b1 #);

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

definition
let c1 be non empty AfMidStruct ;
let c2, c3 be Element of c1;
canceled;
func c2 # c3 -> Element of a1 equals :: GEOMTRAP:def 12
the MIDPOINT of a1 . a2,a3;
correctness
coherence
the MIDPOINT of c1 . c2,c3 is Element of c1
;
;
end;

:: deftheorem Def11 GEOMTRAP:def 11 :
canceled;

:: deftheorem Def12 defines # GEOMTRAP:def 12 :
for b1 being non empty AfMidStruct
for b2, b3 being Element of b1 holds b2 # b3 = the MIDPOINT of b1 . b2,b3;

theorem Th45: :: GEOMTRAP:45
canceled;

theorem Th46: :: GEOMTRAP:46
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4 being set holds
( b4 is Element of the carrier of (DTrSpace b1,b2,b3) iff b4 is VECTOR of b1 ) ;

theorem Th47: :: GEOMTRAP:47
for b1 being RealLinearSpace
for b2, b3, b4, b5, b6, b7 being VECTOR of b1
for b8, b9, b10, b11 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4 = b8 & b5 = b9 & b6 = b10 & b7 = b11 holds
( b8,b9 // b10,b11 iff b4,b5,b6,b7 are_DTr_wrt b2,b3 )
proof end;

theorem Th48: :: GEOMTRAP:48
for b1 being RealLinearSpace
for b2, b3, b4, b5 being VECTOR of b1
for b6, b7 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4 = b6 & b5 = b7 holds
b4 # b5 = b6 # b7 by Def8;

Lemma67: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4,b5 // b5,b6 holds
( b4 = b5 & b5 = b6 )
proof end;

Lemma68: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7, b8, b9 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4,b5 // b6,b7 & b4,b5 // b8,b9 & b4 <> b5 holds
b6,b7 // b8,b9
proof end;

Lemma69: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4,b5 // b6,b7 holds
( b6,b7 // b4,b5 & b5,b4 // b7,b6 )
proof end;

Lemma70: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 holds
ex b7 being Element of (DTrSpace b1,b2,b3) st
( b4,b5 // b6,b7 or b4,b5 // b7,b6 )
proof end;

Lemma71: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7, b8 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4,b5 // b6,b7 & b4,b5 // b6,b8 & not b4 = b5 holds
b7 = b8
proof end;

Lemma72: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 holds
b4 # b5 = b5 # b4
proof end;

Lemma73: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 holds
b4 # b4 = b4
proof end;

Lemma74: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 holds
(b4 # b5) # (b6 # b7) = (b4 # b6) # (b5 # b7)
proof end;

Lemma75: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 holds
ex b6 being Element of (DTrSpace b1,b2,b3) st b6 # b4 = b5
proof end;

Lemma76: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4 # b5 = b4 # b6 holds
b5 = b6
proof end;

Lemma77: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4,b5 // b6,b7 holds
b4,b5 // b4 # b6,b5 # b7
proof end;

Lemma78: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4,b5 // b6,b7 & not b4,b5 // b4 # b7,b5 # b6 holds
b4,b5 // b5 # b6,b4 # b7
proof end;

Lemma79: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7, b8, b9, b10, b11, b12 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4,b5 // b6,b7 & b4 # b8 = b9 & b5 # b10 = b9 & b6 # b11 = b9 & b7 # b12 = b9 holds
b8,b10 // b11,b12
proof end;

Lemma80: for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1
for b4, b5, b6, b7, b8, b9, b10, b11, b12, b13 being Element of (DTrSpace b1,b2,b3) st Gen b2,b3 & b4 <> b5 & b4,b5 // b6,b7 & b4,b5 // b8,b9 & b4,b5 // b10,b11 & b4,b5 // b12,b13 & b6,b8 // b10,b12 holds
b7,b9 // b11,b13
proof end;

definition
let c1 be non empty AfMidStruct ;
attr a1 is MidOrdTrapSpace-like means :Def13: :: GEOMTRAP:def 13
for b1, b2, b3, b4, b5, b6, b7, b8, b9, b10 being Element of a1 holds
( b1 # b2 = b2 # b1 & b1 # b1 = b1 & (b1 # b2) # (b3 # b4) = (b1 # b3) # (b2 # b4) & ex b11 being Element of a1 st b11 # b1 = b2 & ( b1 # b2 = b1 # b3 implies b2 = b3 ) & ( b1,b2 // b3,b4 implies b1,b2 // b1 # b3,b2 # b4 ) & ( not b1,b2 // b3,b4 or b1,b2 // b1 # b4,b2 # b3 or b1,b2 // b2 # b3,b1 # b4 ) & ( b1,b2 // b3,b4 & b1 # b5 = b9 & b2 # b6 = b9 & b3 # b7 = b9 & b4 # b8 = b9 implies b5,b6 // b7,b8 ) & ( b9 <> b10 & b9,b10 // b1,b5 & b9,b10 // b2,b6 & b9,b10 // b3,b7 & b9,b10 // b4,b8 & b1,b2 // b3,b4 implies b5,b6 // b7,b8 ) & ( b1,b2 // b2,b3 implies ( b1 = b2 & b2 = b3 ) ) & ( b1,b2 // b5,b6 & b1,b2 // b7,b8 & b1 <> b2 implies b5,b6 // b7,b8 ) & ( b1,b2 // b3,b4 implies ( b3,b4 // b1,b2 & b2,b1 // b4,b3 ) ) & ex b11 being Element of a1 st
( b1,b2 // b3,b11 or b1,b2 // b11,b3 ) & ( b1,b2 // b3,b9 & b1,b2 // b3,b10 & not b1 = b2 implies b9 = b10 ) );
end;

:: deftheorem Def13 defines MidOrdTrapSpace-like GEOMTRAP:def 13 :
for b1 being non empty AfMidStruct holds
( b1 is MidOrdTrapSpace-like iff for b2, b3, b4, b5, b6, b7, b8, b9, b10, b11 being Element of b1 holds
( b2 # b3 = b3 # b2 & b2 # b2 = b2 & (b2 # b3) # (b4 # b5) = (b2 # b4) # (b3 # b5) & ex b12 being Element of b1 st b12 # b2 = b3 & ( b2 # b3 = b2 # b4 implies b3 = b4 ) & ( b2,b3 // b4,b5 implies b2,b3 // b2 # b4,b3 # b5 ) & ( not b2,b3 // b4,b5 or b2,b3 // b2 # b5,b3 # b4 or b2,b3 // b3 # b4,b2 # b5 ) & ( b2,b3 // b4,b5 & b2 # b6 = b10 & b3 # b7 = b10 & b4 # b8 = b10 & b5 # b9 = b10 implies b6,b7 // b8,b9 ) & ( b10 <> b11 & b10,b11 // b2,b6 & b10,b11 // b3,b7 & b10,b11 // b4,b8 & b10,b11 // b5,b9 & b2,b3 // b4,b5 implies b6,b7 // b8,b9 ) & ( b2,b3 // b3,b4 implies ( b2 = b3 & b3 = b4 ) ) & ( b2,b3 // b6,b7 & b2,b3 // b8,b9 & b2 <> b3 implies b6,b7 // b8,b9 ) & ( b2,b3 // b4,b5 implies ( b4,b5 // b2,b3 & b3,b2 // b5,b4 ) ) & ex b12 being Element of b1 st
( b2,b3 // b4,b12 or b2,b3 // b12,b4 ) & ( b2,b3 // b4,b10 & b2,b3 // b4,b11 & not b2 = b3 implies b10 = b11 ) ) );

registration
cluster non empty strict MidOrdTrapSpace-like AfMidStruct ;
existence
ex b1 being non empty AfMidStruct st
( b1 is strict & b1 is MidOrdTrapSpace-like )
proof end;
end;

definition
mode MidOrdTrapSpace is non empty MidOrdTrapSpace-like AfMidStruct ;
end;

theorem Th49: :: GEOMTRAP:49
for b1 being RealLinearSpace
for b2, b3 being VECTOR of b1 st Gen b2,b3 holds
DTrSpace b1,b2,b3 is MidOrdTrapSpace
proof end;

consider c1 being MidOrdTrapSpace;

set c2 = Af c1;

E82: now
let c3, c4, c5, c6, c7, c8, c9, c10, c11, c12 be Element of (Af c1);
E83: now
let c13, c14, c15, c16 be Element of (Af c1);
let c17, c18, c19, c20 be Element of the carrier of c1;
assume E84: ( c13 = c17 & c14 = c18 & c15 = c19 & c16 = c20 ) ;
E85: now
assume c13,c14 // c15,c16 ;
then [[c13,c14],[c15,c16]] in the CONGR of c1 by ANALOAF:def 2;
hence c17,c18 // c19,c20 by E84, ANALOAF:def 2;
end;
now
assume c17,c18 // c19,c20 ;
then [[c13,c14],[c15,c16]] in the CONGR of c1 by E84, ANALOAF:def 2;
hence c13,c14 // c15,c16 by ANALOAF:def 2;
end;
hence ( c13,c14 // c15,c16 iff c17,c18 // c19,c20 ) by E85;
end;
reconsider c13 = c3, c14 = c4, c15 = c5, c16 = c6, c17 = c7, c18 = c8, c19 = c9, c20 = c10, c21 = c11, c22 = c12 as Element of c1 ;
E84: now
assume c3,c4 // c4,c5 ;
then c13,c14 // c14,c15 by E83;
hence ( c3 = c4 & c4 = c5 ) by Def13;
end;
E85: now
assume ( c3,c4 // c7,c8 & c3,c4 // c9,c10 & c3 <> c4 ) ;
then ( c13,c14 // c17,c18 & c13,c14 // c19,c20 & c13 <> c14 ) by E83;
then c17,c18 // c19,c20 by Def13;
hence c7,c8 // c9,c10 by E83;
end;
E86: now
assume c3,c4 // c5,c6 ;
then c13,c14 // c15,c16 by E83;
then ( c15,c16 // c13,c14 & c14,c13 // c16,c15 ) by Def13;
hence ( c5,c6 // c3,c4 & c4,c3 // c6,c5 ) by E83;
end;
E87: ex b1 being Element of (Af c1) st
( c3,c4 // c5,b1 or c3,c4 // b1,c5 )
proof
consider c23 being Element of c1 such that
E88: ( c13,c14 // c15,c23 or c13,c14 // c23,c15 ) by Def13;
reconsider c24 = c23 as Element of (Af c1) ;
take c24 ;
thus ( c3,c4 // c5,c24 or c3,c4 // c24,c5 ) by E83, E88;
end;
now
assume ( c3,c4 // c5,c11 & c3,c4 // c5,c12 ) ;
then ( c13,c14 // c15,c21 & c13,c14 // c15,c22 ) by E83;
hence ( c3 = c4 or c11 = c12 ) by Def13;
end;
hence ( ( c3,c4 // c4,c5 implies ( c3 = c4 & c4 = c5 ) ) & ( c3,c4 // c7,c8 & c3,c4 // c9,c10 & c3 <> c4 implies c7,c8 // c9,c10 ) & ( c3,c4 // c5,c6 implies ( c5,c6 // c3,c4 & c4,c3 // c6,c5 ) ) & ex b1 being Element of (Af c1) st
( c3,c4 // c5,b1 or c3,c4 // b1,c5 ) & ( c3,c4 // c5,c11 & c3,c4 // c5,c12 & not c3 = c4 implies c11 = c12 ) ) by E84, E85, E86, E87;
end;

definition
let c3 be non empty AffinStruct ;
attr a1 is OrdTrapSpace-like means :Def14: :: GEOMTRAP:def 14
for b1, b2, b3, b4, b5, b6, b7, b8, b9, b10 being Element of a1 holds
( ( b1,b2 // b2,b3 implies ( b1 = b2 & b2 = b3 ) ) & ( b1,b2 // b5,b6 & b1,b2 // b7,b8 & b1 <> b2 implies b5,b6 // b7,b8 ) & ( b1,b2 // b3,b4 implies ( b3,b4 // b1,b2 & b2,b1 // b4,b3 ) ) & ex b11 being Element of a1 st
( b1,b2 // b3,b11 or b1,b2 // b11,b3 ) & ( b1,b2 // b3,b9 & b1,b2 // b3,b10 & not b1 = b2 implies b9 = b10 ) );
end;

:: deftheorem Def14 defines OrdTrapSpace-like GEOMTRAP:def 14 :
for b1 being non empty AffinStruct holds
( b1 is OrdTrapSpace-like iff for b2, b3, b4, b5, b6, b7, b8, b9, b10, b11 being Element of b1 holds
( ( b2,b3 // b3,b4 implies ( b2 = b3 & b3 = b4 ) ) & ( b2,b3 // b6,b7 & b2,b3 // b8,b9 & b2 <> b3 implies b6,b7 // b8,b9 ) & ( b2,b3 // b4,b5 implies ( b4,b5 // b2,b3 & b3,b2 // b5,b4 ) ) & ex b12 being Element of b1 st
( b2,b3 // b4,b12 or b2,b3 // b12,b4 ) & ( b2,b3 // b4,b10 & b2,b3 // b4,b11 & not b2 = b3 implies b10 = b11 ) ) );

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

definition
mode OrdTrapSpace is non empty OrdTrapSpace-like AffinStruct ;
end;

registration
let c3 be MidOrdTrapSpace;
cluster Af a1 -> non empty strict OrdTrapSpace-like ;
coherence
Af c3 is OrdTrapSpace-like
proof end;
end;

theorem Th50: :: GEOMTRAP:50
for b1 being OrdTrapSpace
for b2 being set holds
( b2 is Element of b1 iff b2 is Element of (Lambda b1) )
proof end;

theorem Th51: :: GEOMTRAP:51
for b1 being OrdTrapSpace
for b2, b3, b4, b5 being Element of b1
for b6, b7, b8, b9 being Element of (Lambda b1) st b2 = b6 & b3 = b7 & b4 = b8 & b5 = b9 holds
( b6,b7 // b8,b9 iff ( b2,b3 // b4,b5 or b2,b3 // b5,b4 ) )
proof end;

Lemma86: for b1 being OrdTrapSpace
for b2, b3, b4 being Element of (Lambda b1) ex b5 being Element of (Lambda b1) st b2,b3 // b4,b5
proof end;

Lemma87: for b1 being OrdTrapSpace
for b2, b3, b4, b5 being Element of (Lambda b1) st b2,b3 // b4,b5 holds
b4,b5 // b2,b3
proof end;

Lemma88: for b1 being OrdTrapSpace
for b2, b3, b4, b5, b6, b7 being Element of (Lambda b1) st b2 <> b3 & b2,b3 // b4,b5 & b2,b3 // b6,b7 holds
b4,b5 // b6,b7
proof end;

Lemma89: for b1 being OrdTrapSpace
for b2, b3, b4, b5, b6 being Element of (Lambda b1) st b2,b3 // b4,b5 & b2,b3 // b4,b6 & not b2 = b3 holds
b5 = b6
proof end;

Lemma90: for b1 being OrdTrapSpace
for b2, b3 being Element of b1 holds b2,b3 // b2,b3
proof end;

Lemma91: for b1 being OrdTrapSpace
for b2, b3 being Element of (Lambda b1) holds b2,b3 // b3,b2
proof end;

definition
let c3 be non empty AffinStruct ;
attr a1 is TrapSpace-like means :Def15: :: GEOMTRAP:def 15
for b1, b2, b3, b4, b5, b6 being Element of a1 holds
( b1,b2 // b2,b1 & ( b1,b2 // b3,b4 & b1,b2 // b3,b6 & not b1 = b2 implies b4 = b6 ) & ( b5 <> b6 & b5,b6 // b1,b2 & b5,b6 // b3,b4 implies b1,b2 // b3,b4 ) & ( b1,b2 // b3,b4 implies b3,b4 // b1,b2 ) & ex b7 being Element of a1 st b1,b2 // b3,b7 );
end;

:: deftheorem Def15 defines TrapSpace-like GEOMTRAP:def 15 :
for b1 being non empty AffinStruct holds
( b1 is TrapSpace-like iff for b2, b3, b4, b5, b6, b7 being Element of b1 holds
( b2,b3 // b3,b2 & ( b2,b3 // b4,b5 & b2,b3 // b4,b7 & not b2 = b3 implies b5 = b7 ) & ( b6 <> b7 & b6,b7 // b2,b3 & b6,b7 // b4,b5 implies b2,b3 // b4,b5 ) & ( b2,b3 // b4,b5 implies b4,b5 // b2,b3 ) & ex b8 being Element of b1 st b2,b3 // b4,b8 ) );

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

definition
mode TrapSpace is non empty TrapSpace-like AffinStruct ;
end;

registration
let c3 be OrdTrapSpace;
cluster Lambda a1 -> TrapSpace-like ;
correctness
coherence
Lambda c3 is TrapSpace-like
;
proof end;
end;

definition
let c3 be non empty AffinStruct ;
attr a1 is Regular means :Def16: :: GEOMTRAP:def 16
for b1, b2, b3, b4, b5, b6, b7, b8, b9, b10 being Element of a1 st b1 <> b2 & b1,b2 // b3,b4 & b1,b2 // b5,b6 & b1,b2 // b7,b8 & b1,b2 // b9,b10 & b3,b5 // b7,b9 holds
b4,b6 // b8,b10;
end;

:: deftheorem Def16 defines Regular GEOMTRAP:def 16 :
for b1 being non empty AffinStruct holds
( b1 is Regular iff for b2, b3, b4, b5, b6, b7, b8, b9, b10, b11 being Element of b1 st b2 <> b3 & b2,b3 // b4,b5 & b2,b3 // b6,b7 & b2,b3 // b8,b9 & b2,b3 // b10,b11 & b4,b6 // b8,b10 holds
b5,b7 // b9,b11 );

registration
cluster non empty strict Regular AffinStruct ;
existence
ex b1 being non empty OrdTrapSpace st
( b1 is strict & b1 is Regular )
proof end;
end;

registration
let c3 be MidOrdTrapSpace;
cluster Af a1 -> non empty strict OrdTrapSpace-like Regular ;
correctness
coherence
Af c3 is Regular
;
proof end;
end;