:: EUCLID_3 semantic presentation  Show TPTP formulae Show IDV graph for whole article:: Showing IDV graph ... (Click the Palm Trees again to close it)

definition
let z be Element of COMPLEX ;
func cpx2euc z -> Point of (TOP-REAL 2) equals :: EUCLID_3:def 1
|[(Re z),(Im z)]|;
correctness
coherence
|[(Re z),(Im z)]| is Point of (TOP-REAL 2)
;
;
end;

:: deftheorem defines cpx2euc EUCLID_3:def 1 :
for z being Element of COMPLEX holds cpx2euc z = |[(Re z),(Im z)]|;

definition
let p be Point of (TOP-REAL 2);
func euc2cpx p -> Element of COMPLEX equals :: EUCLID_3:def 2
[*(p `1 ),(p `2 )*];
correctness
coherence
[*(p `1 ),(p `2 )*] is Element of COMPLEX
;
;
end;

:: deftheorem defines euc2cpx EUCLID_3:def 2 :
for p being Point of (TOP-REAL 2) holds euc2cpx p = [*(p `1 ),(p `2 )*];

theorem Th1: :: EUCLID_3:1  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX holds euc2cpx (cpx2euc z) = z
proof end;

theorem Th2: :: EUCLID_3:2  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds cpx2euc (euc2cpx p) = p
proof end;

theorem :: EUCLID_3:3  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) ex z being Element of COMPLEX st p = cpx2euc z
proof end;

theorem :: EUCLID_3:4  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX ex p being Point of (TOP-REAL 2) st z = euc2cpx p
proof end;

theorem :: EUCLID_3:5  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z1, z2 being Element of COMPLEX st cpx2euc z1 = cpx2euc z2 holds
z1 = z2
proof end;

theorem Th6: :: EUCLID_3:6  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) st euc2cpx p1 = euc2cpx p2 holds
p1 = p2
proof end;

theorem Th7: :: EUCLID_3:7  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX holds
( (cpx2euc z) `1 = Re z & (cpx2euc z) `2 = Im z ) by EUCLID:56;

theorem Th8: :: EUCLID_3:8  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds
( Re (euc2cpx p) = p `1 & Im (euc2cpx p) = p `2 )
proof end;

theorem Th9: :: EUCLID_3:9  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x1, x2 being Real holds cpx2euc [*x1,x2*] = |[x1,x2]|
proof end;

theorem Th10: :: EUCLID_3:10  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z1, z2 being Element of COMPLEX holds |[(Re (z1 + z2)),(Im (z1 + z2))]| = |[((Re z1) + (Re z2)),((Im z1) + (Im z2))]|
proof end;

theorem Th11: :: EUCLID_3:11  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z1, z2 being Element of COMPLEX holds cpx2euc (z1 + z2) = (cpx2euc z1) + (cpx2euc z2)
proof end;

theorem Th12: :: EUCLID_3:12  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) holds [*((p1 + p2) `1 ),((p1 + p2) `2 )*] = [*((p1 `1 ) + (p2 `1 )),((p1 `2 ) + (p2 `2 ))*]
proof end;

theorem Th13: :: EUCLID_3:13  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) holds euc2cpx (p1 + p2) = (euc2cpx p1) + (euc2cpx p2)
proof end;

theorem Th14: :: EUCLID_3:14  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX holds |[(Re (- z)),(Im (- z))]| = |[(- (Re z)),(- (Im z))]|
proof end;

theorem Th15: :: EUCLID_3:15  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX holds cpx2euc (- z) = - (cpx2euc z)
proof end;

theorem Th16: :: EUCLID_3:16  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds [*((- p) `1 ),((- p) `2 )*] = [*(- (p `1 )),(- (p `2 ))*]
proof end;

theorem Th17: :: EUCLID_3:17  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds euc2cpx (- p) = - (euc2cpx p)
proof end;

theorem :: EUCLID_3:18  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z1, z2 being Element of COMPLEX holds cpx2euc (z1 - z2) = (cpx2euc z1) - (cpx2euc z2)
proof end;

theorem Th19: :: EUCLID_3:19  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) holds euc2cpx (p1 - p2) = (euc2cpx p1) - (euc2cpx p2)
proof end;

theorem Th20: :: EUCLID_3:20  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
cpx2euc 0c = 0.REAL 2 by COMPLEX1:12, EUCLID:58;

theorem Th21: :: EUCLID_3:21  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
euc2cpx (0.REAL 2) = 0c by Th1, Th20;

theorem :: EUCLID_3:22  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) st euc2cpx p = 0c holds
p = 0.REAL 2 by Th2, Th20;

theorem :: EUCLID_3:23  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX
for r being Real holds cpx2euc ([*r,0*] * z) = r * (cpx2euc z)
proof end;

theorem :: EUCLID_3:24  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for r, r1, r2 being Real holds (r + (0 * <i> )) * (r1 + (r2 * <i> )) = (r * r1) + ((r * r2) * <i> ) ;

theorem :: EUCLID_3:25  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for r being Real
for p being Point of (TOP-REAL 2) holds euc2cpx (r * p) = [*r,0*] * (euc2cpx p)
proof end;

theorem Th26: :: EUCLID_3:26  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds |.(euc2cpx p).| = sqrt (((p `1 ) ^2 ) + ((p `2 ) ^2 ))
proof end;

theorem Th27: :: EUCLID_3:27  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being FinSequence of REAL st len f = 2 holds
|.f.| = sqrt (((f . 1) ^2 ) + ((f . 2) ^2 ))
proof end;

theorem :: EUCLID_3:28  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being FinSequence of REAL
for p being Point of (TOP-REAL 2) st len f = 2 & p = f holds
|.p.| = |.f.|
proof end;

theorem Th29: :: EUCLID_3:29  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX holds |.(cpx2euc z).| = sqrt (((Re z) ^2 ) + ((Im z) ^2 ))
proof end;

theorem :: EUCLID_3:30  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX holds |.(cpx2euc z).| = |.z.|
proof end;

theorem Th31: :: EUCLID_3:31  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds |.(euc2cpx p).| = |.p.|
proof end;

definition
let p be Point of (TOP-REAL 2);
func Arg p -> Real equals :: EUCLID_3:def 3
Arg (euc2cpx p);
correctness
coherence
Arg (euc2cpx p) is Real
;
;
end;

:: deftheorem defines Arg EUCLID_3:def 3 :
for p being Point of (TOP-REAL 2) holds Arg p = Arg (euc2cpx p);

theorem :: EUCLID_3:32  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for z being Element of COMPLEX
for p being Point of (TOP-REAL 2) st ( z = euc2cpx p or p = cpx2euc z ) holds
Arg z = Arg p
proof end;

theorem :: EUCLID_3:33  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds
( 0 <= Arg p & Arg p < 2 * PI ) by COMPTRIG:52;

theorem :: EUCLID_3:34  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x1, x2 being Real
for p being Point of (TOP-REAL 2) st x1 = |.p.| * (cos (Arg p)) & x2 = |.p.| * (sin (Arg p)) holds
p = |[x1,x2]|
proof end;

theorem :: EUCLID_3:35  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
Arg (0.REAL 2) = 0 by Th21, COMPLEX2:20;

theorem :: EUCLID_3:36  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) st p <> 0.REAL 2 holds
( ( Arg p < PI implies Arg (- p) = (Arg p) + PI ) & ( Arg p >= PI implies Arg (- p) = (Arg p) - PI ) )
proof end;

theorem :: EUCLID_3:37  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) st Arg p = 0 holds
( p = |[|.p.|,0]| & p `2 = 0 )
proof end;

theorem Th38: :: EUCLID_3:38  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) st p <> 0.REAL 2 holds
( Arg p < PI iff Arg (- p) >= PI )
proof end;

theorem :: EUCLID_3:39  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) st ( p1 <> p2 or p1 - p2 <> 0.REAL 2 ) holds
( Arg (p1 - p2) < PI iff Arg (p2 - p1) >= PI )
proof end;

theorem :: EUCLID_3:40  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) holds
( Arg p in ].0,PI .[ iff p `2 > 0 )
proof end;

theorem :: EUCLID_3:41  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being Point of (TOP-REAL 2) st Arg p <> 0 holds
( Arg p < PI iff sin (Arg p) > 0 ) by COMPLEX2:28;

theorem :: EUCLID_3:42  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) st Arg p1 < PI & Arg p2 < PI holds
Arg (p1 + p2) < PI
proof end;

definition
let p1, p2, p3 be Point of (TOP-REAL 2);
func angle p1,p2,p3 -> Real equals :: EUCLID_3:def 4
angle (euc2cpx p1),(euc2cpx p2),(euc2cpx p3);
correctness
coherence
angle (euc2cpx p1),(euc2cpx p2),(euc2cpx p3) is Real
;
by XREAL_0:def 1;
end;

:: deftheorem defines angle EUCLID_3:def 4 :
for p1, p2, p3 being Point of (TOP-REAL 2) holds angle p1,p2,p3 = angle (euc2cpx p1),(euc2cpx p2),(euc2cpx p3);

theorem :: EUCLID_3:43  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) holds
( 0 <= angle p1,p2,p3 & angle p1,p2,p3 < 2 * PI ) by COMPLEX2:84;

theorem :: EUCLID_3:44  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) holds angle p1,p2,p3 = angle (p1 - p2),(0.REAL 2),(p3 - p2)
proof end;

theorem :: EUCLID_3:45  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st angle p1,p2,p3 = 0 holds
( Arg (p1 - p2) = Arg (p3 - p2) & angle p3,p2,p1 = 0 )
proof end;

theorem :: EUCLID_3:46  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st angle p1,p2,p3 <> 0 holds
angle p3,p2,p1 = (2 * PI ) - (angle p1,p2,p3)
proof end;

theorem :: EUCLID_3:47  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st angle p3,p2,p1 <> 0 holds
angle p3,p2,p1 = (2 * PI ) - (angle p1,p2,p3)
proof end;

theorem Th48: :: EUCLID_3:48  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, y being Element of COMPLEX holds Re (x .|. y) = ((Re x) * (Re y)) + ((Im x) * (Im y))
proof end;

theorem Th49: :: EUCLID_3:49  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, y being Element of COMPLEX holds Im (x .|. y) = (- ((Re x) * (Im y))) + ((Im x) * (Re y))
proof end;

theorem Th50: :: EUCLID_3:50  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p, q being Point of (TOP-REAL 2) holds |(p,q)| = ((p `1 ) * (q `1 )) + ((p `2 ) * (q `2 ))
proof end;

theorem Th51: :: EUCLID_3:51  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) holds |(p1,p2)| = Re ((euc2cpx p1) .|. (euc2cpx p2))
proof end;

theorem :: EUCLID_3:52  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st p1 <> 0.REAL 2 & p2 <> 0.REAL 2 holds
( |(p1,p2)| = 0 iff ( angle p1,(0.REAL 2),p2 = PI / 2 or angle p1,(0.REAL 2),p2 = (3 / 2) * PI ) )
proof end;

theorem :: EUCLID_3:53  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2 being Point of (TOP-REAL 2) st p1 <> 0.REAL 2 & p2 <> 0.REAL 2 holds
( ( ( not (- ((p1 `1 ) * (p2 `2 ))) + ((p1 `2 ) * (p2 `1 )) = |.p1.| * |.p2.| & not (- ((p1 `1 ) * (p2 `2 ))) + ((p1 `2 ) * (p2 `1 )) = - (|.p1.| * |.p2.|) ) or angle p1,(0.REAL 2),p2 = PI / 2 or angle p1,(0.REAL 2),p2 = (3 / 2) * PI ) & ( ( not angle p1,(0.REAL 2),p2 = PI / 2 & not angle p1,(0.REAL 2),p2 = (3 / 2) * PI ) or (- ((p1 `1 ) * (p2 `2 ))) + ((p1 `2 ) * (p2 `1 )) = |.p1.| * |.p2.| or (- ((p1 `1 ) * (p2 `2 ))) + ((p1 `2 ) * (p2 `1 )) = - (|.p1.| * |.p2.|) ) )
proof end;

theorem :: EUCLID_3:54  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st p1 <> p2 & p3 <> p2 holds
( |((p1 - p2),(p3 - p2))| = 0 iff ( angle p1,p2,p3 = PI / 2 or angle p1,p2,p3 = (3 / 2) * PI ) )
proof end;

theorem :: EUCLID_3:55  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st p1 <> p2 & p3 <> p2 & ( angle p1,p2,p3 = PI / 2 or angle p1,p2,p3 = (3 / 2) * PI ) holds
(|.(p1 - p2).| ^2 ) + (|.(p3 - p2).| ^2 ) = |.(p1 - p3).| ^2
proof end;

theorem :: EUCLID_3:56  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st p2 <> p1 & p1 <> p3 & p3 <> p2 & angle p2,p1,p3 < PI & angle p1,p3,p2 < PI & angle p3,p2,p1 < PI holds
((angle p2,p1,p3) + (angle p1,p3,p2)) + (angle p3,p2,p1) = PI
proof end;

definition
let n be Nat;
let p1, p2, p3 be Point of (TOP-REAL n);
func Triangle p1,p2,p3 -> Subset of (TOP-REAL n) equals :: EUCLID_3:def 5
((LSeg p1,p2) \/ (LSeg p2,p3)) \/ (LSeg p3,p1);
correctness
coherence
((LSeg p1,p2) \/ (LSeg p2,p3)) \/ (LSeg p3,p1) is Subset of (TOP-REAL n)
;
;
end;

:: deftheorem defines Triangle EUCLID_3:def 5 :
for n being Nat
for p1, p2, p3 being Point of (TOP-REAL n) holds Triangle p1,p2,p3 = ((LSeg p1,p2) \/ (LSeg p2,p3)) \/ (LSeg p3,p1);

definition
let n be Nat;
let p1, p2, p3 be Point of (TOP-REAL n);
func closed_inside_of_triangle p1,p2,p3 -> Subset of (TOP-REAL n) equals :: EUCLID_3:def 6
{ p where p is Point of (TOP-REAL n) : ex a1, a2, a3 being Real st
( 0 <= a1 & 0 <= a2 & 0 <= a3 & (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
}
;
correctness
coherence
{ p where p is Point of (TOP-REAL n) : ex a1, a2, a3 being Real st
( 0 <= a1 & 0 <= a2 & 0 <= a3 & (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
}
is Subset of (TOP-REAL n)
;
proof end;
end;

:: deftheorem defines closed_inside_of_triangle EUCLID_3:def 6 :
for n being Nat
for p1, p2, p3 being Point of (TOP-REAL n) holds closed_inside_of_triangle p1,p2,p3 = { p where p is Point of (TOP-REAL n) : ex a1, a2, a3 being Real st
( 0 <= a1 & 0 <= a2 & 0 <= a3 & (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
}
;

definition
let n be Nat;
let p1, p2, p3 be Point of (TOP-REAL n);
func inside_of_triangle p1,p2,p3 -> Subset of (TOP-REAL n) equals :: EUCLID_3:def 7
(closed_inside_of_triangle p1,p2,p3) \ (Triangle p1,p2,p3);
correctness
coherence
(closed_inside_of_triangle p1,p2,p3) \ (Triangle p1,p2,p3) is Subset of (TOP-REAL n)
;
;
end;

:: deftheorem defines inside_of_triangle EUCLID_3:def 7 :
for n being Nat
for p1, p2, p3 being Point of (TOP-REAL n) holds inside_of_triangle p1,p2,p3 = (closed_inside_of_triangle p1,p2,p3) \ (Triangle p1,p2,p3);

definition
let n be Nat;
let p1, p2, p3 be Point of (TOP-REAL n);
func outside_of_triangle p1,p2,p3 -> Subset of (TOP-REAL n) equals :: EUCLID_3:def 8
{ p where p is Point of (TOP-REAL n) : ex a1, a2, a3 being Real st
( ( 0 > a1 or 0 > a2 or 0 > a3 ) & (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
}
;
correctness
coherence
{ p where p is Point of (TOP-REAL n) : ex a1, a2, a3 being Real st
( ( 0 > a1 or 0 > a2 or 0 > a3 ) & (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
}
is Subset of (TOP-REAL n)
;
proof end;
end;

:: deftheorem defines outside_of_triangle EUCLID_3:def 8 :
for n being Nat
for p1, p2, p3 being Point of (TOP-REAL n) holds outside_of_triangle p1,p2,p3 = { p where p is Point of (TOP-REAL n) : ex a1, a2, a3 being Real st
( ( 0 > a1 or 0 > a2 or 0 > a3 ) & (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
}
;

definition
let n be Nat;
let p1, p2, p3 be Point of (TOP-REAL n);
func plane p1,p2,p3 -> Subset of (TOP-REAL n) equals :: EUCLID_3:def 9
(outside_of_triangle p1,p2,p3) \/ (closed_inside_of_triangle p1,p2,p3);
correctness
coherence
(outside_of_triangle p1,p2,p3) \/ (closed_inside_of_triangle p1,p2,p3) is Subset of (TOP-REAL n)
;
;
end;

:: deftheorem defines plane EUCLID_3:def 9 :
for n being Nat
for p1, p2, p3 being Point of (TOP-REAL n) holds plane p1,p2,p3 = (outside_of_triangle p1,p2,p3) \/ (closed_inside_of_triangle p1,p2,p3);

theorem Th57: :: EUCLID_3:57  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for p1, p2, p3, p being Point of (TOP-REAL n) st p in plane p1,p2,p3 holds
ex a1, a2, a3 being Real st
( (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
proof end;

theorem :: EUCLID_3:58  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for p1, p2, p3 being Point of (TOP-REAL n) holds Triangle p1,p2,p3 c= closed_inside_of_triangle p1,p2,p3
proof end;

definition
let n be Nat;
let q1, q2 be Point of (TOP-REAL n);
pred q1,q2 are_lindependent2 means :Def10: :: EUCLID_3:def 10
for a1, a2 being Real st (a1 * q1) + (a2 * q2) = 0.REAL n holds
( a1 = 0 & a2 = 0 );
end;

:: deftheorem Def10 defines are_lindependent2 EUCLID_3:def 10 :
for n being Nat
for q1, q2 being Point of (TOP-REAL n) holds
( q1,q2 are_lindependent2 iff for a1, a2 being Real st (a1 * q1) + (a2 * q2) = 0.REAL n holds
( a1 = 0 & a2 = 0 ) );

notation
let n be Nat;
let q1, q2 be Point of (TOP-REAL n);
antonym q1,q2 are_ldependent2 for q1,q2 are_lindependent2 ;
end;

theorem Th59: :: EUCLID_3:59  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for q1, q2 being Point of (TOP-REAL n) st q1,q2 are_lindependent2 holds
( q1 <> q2 & q1 <> 0.REAL n & q2 <> 0.REAL n )
proof end;

theorem Th60: :: EUCLID_3:60  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for p1, p2, p3, p0 being Point of (TOP-REAL n) st p2 - p1,p3 - p1 are_lindependent2 & p0 in plane p1,p2,p3 holds
ex a1, a2, a3 being Real st
( p0 = ((a1 * p1) + (a2 * p2)) + (a3 * p3) & (a1 + a2) + a3 = 1 & ( for b1, b2, b3 being Real st p0 = ((b1 * p1) + (b2 * p2)) + (b3 * p3) & (b1 + b2) + b3 = 1 holds
( b1 = a1 & b2 = a2 & b3 = a3 ) ) )
proof end;

theorem Th61: :: EUCLID_3:61  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for p1, p2, p3, p0 being Point of (TOP-REAL n) st ex a1, a2, a3 being Real st
( p0 = ((a1 * p1) + (a2 * p2)) + (a3 * p3) & (a1 + a2) + a3 = 1 ) holds
p0 in plane p1,p2,p3
proof end;

theorem :: EUCLID_3:62  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for p1, p2, p3 being Point of (TOP-REAL n) holds plane p1,p2,p3 = { p where p is Point of (TOP-REAL n) : ex a1, a2, a3 being Real st
( (a1 + a2) + a3 = 1 & p = ((a1 * p1) + (a2 * p2)) + (a3 * p3) )
}
proof end;

theorem Th63: :: EUCLID_3:63  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st p2 - p1,p3 - p1 are_lindependent2 holds
plane p1,p2,p3 = REAL 2
proof end;

definition
let n be Nat;
let p1, p2, p3, p be Point of (TOP-REAL n);
assume A1: ( p2 - p1,p3 - p1 are_lindependent2 & p in plane p1,p2,p3 ) ;
func tricord1 p1,p2,p3,p -> Real means :Def11: :: EUCLID_3:def 11
ex a2, a3 being Real st
( (it + a2) + a3 = 1 & p = ((it * p1) + (a2 * p2)) + (a3 * p3) );
existence
ex b1, a2, a3 being Real st
( (b1 + a2) + a3 = 1 & p = ((b1 * p1) + (a2 * p2)) + (a3 * p3) )
proof end;
uniqueness
for b1, b2 being Real st ex a2, a3 being Real st
( (b1 + a2) + a3 = 1 & p = ((b1 * p1) + (a2 * p2)) + (a3 * p3) ) & ex a2, a3 being Real st
( (b2 + a2) + a3 = 1 & p = ((b2 * p1) + (a2 * p2)) + (a3 * p3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def11 defines tricord1 EUCLID_3:def 11 :
for n being Nat
for p1, p2, p3, p being Point of (TOP-REAL n) st p2 - p1,p3 - p1 are_lindependent2 & p in plane p1,p2,p3 holds
for b6 being Real holds
( b6 = tricord1 p1,p2,p3,p iff ex a2, a3 being Real st
( (b6 + a2) + a3 = 1 & p = ((b6 * p1) + (a2 * p2)) + (a3 * p3) ) );

definition
let n be Nat;
let p1, p2, p3, p be Point of (TOP-REAL n);
assume A1: ( p2 - p1,p3 - p1 are_lindependent2 & p in plane p1,p2,p3 ) ;
func tricord2 p1,p2,p3,p -> Real means :Def12: :: EUCLID_3:def 12
ex a1, a3 being Real st
( (a1 + it) + a3 = 1 & p = ((a1 * p1) + (it * p2)) + (a3 * p3) );
existence
ex b1, a1, a3 being Real st
( (a1 + b1) + a3 = 1 & p = ((a1 * p1) + (b1 * p2)) + (a3 * p3) )
proof end;
uniqueness
for b1, b2 being Real st ex a1, a3 being Real st
( (a1 + b1) + a3 = 1 & p = ((a1 * p1) + (b1 * p2)) + (a3 * p3) ) & ex a1, a3 being Real st
( (a1 + b2) + a3 = 1 & p = ((a1 * p1) + (b2 * p2)) + (a3 * p3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def12 defines tricord2 EUCLID_3:def 12 :
for n being Nat
for p1, p2, p3, p being Point of (TOP-REAL n) st p2 - p1,p3 - p1 are_lindependent2 & p in plane p1,p2,p3 holds
for b6 being Real holds
( b6 = tricord2 p1,p2,p3,p iff ex a1, a3 being Real st
( (a1 + b6) + a3 = 1 & p = ((a1 * p1) + (b6 * p2)) + (a3 * p3) ) );

definition
let n be Nat;
let p1, p2, p3, p be Point of (TOP-REAL n);
assume A1: ( p2 - p1,p3 - p1 are_lindependent2 & p in plane p1,p2,p3 ) ;
func tricord3 p1,p2,p3,p -> Real means :Def13: :: EUCLID_3:def 13
ex a1, a2 being Real st
( (a1 + a2) + it = 1 & p = ((a1 * p1) + (a2 * p2)) + (it * p3) );
existence
ex b1, a1, a2 being Real st
( (a1 + a2) + b1 = 1 & p = ((a1 * p1) + (a2 * p2)) + (b1 * p3) )
proof end;
uniqueness
for b1, b2 being Real st ex a1, a2 being Real st
( (a1 + a2) + b1 = 1 & p = ((a1 * p1) + (a2 * p2)) + (b1 * p3) ) & ex a1, a2 being Real st
( (a1 + a2) + b2 = 1 & p = ((a1 * p1) + (a2 * p2)) + (b2 * p3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def13 defines tricord3 EUCLID_3:def 13 :
for n being Nat
for p1, p2, p3, p being Point of (TOP-REAL n) st p2 - p1,p3 - p1 are_lindependent2 & p in plane p1,p2,p3 holds
for b6 being Real holds
( b6 = tricord3 p1,p2,p3,p iff ex a1, a2 being Real st
( (a1 + a2) + b6 = 1 & p = ((a1 * p1) + (a2 * p2)) + (b6 * p3) ) );

definition
let p1, p2, p3 be Point of (TOP-REAL 2);
func trcmap1 p1,p2,p3 -> Function of (TOP-REAL 2),R^1 means :: EUCLID_3:def 14
for p being Point of (TOP-REAL 2) holds it . p = tricord1 p1,p2,p3,p;
existence
ex b1 being Function of (TOP-REAL 2),R^1 st
for p being Point of (TOP-REAL 2) holds b1 . p = tricord1 p1,p2,p3,p
proof end;
uniqueness
for b1, b2 being Function of (TOP-REAL 2),R^1 st ( for p being Point of (TOP-REAL 2) holds b1 . p = tricord1 p1,p2,p3,p ) & ( for p being Point of (TOP-REAL 2) holds b2 . p = tricord1 p1,p2,p3,p ) holds
b1 = b2
proof end;
end;

:: deftheorem defines trcmap1 EUCLID_3:def 14 :
for p1, p2, p3 being Point of (TOP-REAL 2)
for b4 being Function of (TOP-REAL 2),R^1 holds
( b4 = trcmap1 p1,p2,p3 iff for p being Point of (TOP-REAL 2) holds b4 . p = tricord1 p1,p2,p3,p );

definition
let p1, p2, p3 be Point of (TOP-REAL 2);
func trcmap2 p1,p2,p3 -> Function of (TOP-REAL 2),R^1 means :: EUCLID_3:def 15
for p being Point of (TOP-REAL 2) holds it . p = tricord2 p1,p2,p3,p;
existence
ex b1 being Function of (TOP-REAL 2),R^1 st
for p being Point of (TOP-REAL 2) holds b1 . p = tricord2 p1,p2,p3,p
proof end;
uniqueness
for b1, b2 being Function of (TOP-REAL 2),R^1 st ( for p being Point of (TOP-REAL 2) holds b1 . p = tricord2 p1,p2,p3,p ) & ( for p being Point of (TOP-REAL 2) holds b2 . p = tricord2 p1,p2,p3,p ) holds
b1 = b2
proof end;
end;

:: deftheorem defines trcmap2 EUCLID_3:def 15 :
for p1, p2, p3 being Point of (TOP-REAL 2)
for b4 being Function of (TOP-REAL 2),R^1 holds
( b4 = trcmap2 p1,p2,p3 iff for p being Point of (TOP-REAL 2) holds b4 . p = tricord2 p1,p2,p3,p );

definition
let p1, p2, p3 be Point of (TOP-REAL 2);
func trcmap3 p1,p2,p3 -> Function of (TOP-REAL 2),R^1 means :: EUCLID_3:def 16
for p being Point of (TOP-REAL 2) holds it . p = tricord3 p1,p2,p3,p;
existence
ex b1 being Function of (TOP-REAL 2),R^1 st
for p being Point of (TOP-REAL 2) holds b1 . p = tricord3 p1,p2,p3,p
proof end;
uniqueness
for b1, b2 being Function of (TOP-REAL 2),R^1 st ( for p being Point of (TOP-REAL 2) holds b1 . p = tricord3 p1,p2,p3,p ) & ( for p being Point of (TOP-REAL 2) holds b2 . p = tricord3 p1,p2,p3,p ) holds
b1 = b2
proof end;
end;

:: deftheorem defines trcmap3 EUCLID_3:def 16 :
for p1, p2, p3 being Point of (TOP-REAL 2)
for b4 being Function of (TOP-REAL 2),R^1 holds
( b4 = trcmap3 p1,p2,p3 iff for p being Point of (TOP-REAL 2) holds b4 . p = tricord3 p1,p2,p3,p );

theorem :: EUCLID_3:64  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3, p being Point of (TOP-REAL 2) st p2 - p1,p3 - p1 are_lindependent2 holds
( p in outside_of_triangle p1,p2,p3 iff ( tricord1 p1,p2,p3,p < 0 or tricord2 p1,p2,p3,p < 0 or tricord3 p1,p2,p3,p < 0 ) )
proof end;

theorem Th65: :: EUCLID_3:65  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3, p being Point of (TOP-REAL 2) st p2 - p1,p3 - p1 are_lindependent2 holds
( p in Triangle p1,p2,p3 iff ( tricord1 p1,p2,p3,p >= 0 & tricord2 p1,p2,p3,p >= 0 & tricord3 p1,p2,p3,p >= 0 & ( tricord1 p1,p2,p3,p = 0 or tricord2 p1,p2,p3,p = 0 or tricord3 p1,p2,p3,p = 0 ) ) )
proof end;

theorem :: EUCLID_3:66  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3, p being Point of (TOP-REAL 2) st p2 - p1,p3 - p1 are_lindependent2 holds
( p in Triangle p1,p2,p3 iff ( ( tricord1 p1,p2,p3,p = 0 & tricord2 p1,p2,p3,p >= 0 & tricord3 p1,p2,p3,p >= 0 ) or ( tricord1 p1,p2,p3,p >= 0 & tricord2 p1,p2,p3,p = 0 & tricord3 p1,p2,p3,p >= 0 ) or ( tricord1 p1,p2,p3,p >= 0 & tricord2 p1,p2,p3,p >= 0 & tricord3 p1,p2,p3,p = 0 ) ) ) by Th65;

theorem Th67: :: EUCLID_3:67  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3, p being Point of (TOP-REAL 2) st p2 - p1,p3 - p1 are_lindependent2 holds
( p in inside_of_triangle p1,p2,p3 iff ( tricord1 p1,p2,p3,p > 0 & tricord2 p1,p2,p3,p > 0 & tricord3 p1,p2,p3,p > 0 ) )
proof end;

theorem :: EUCLID_3:68  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p1, p2, p3 being Point of (TOP-REAL 2) st p2 - p1,p3 - p1 are_lindependent2 holds
not inside_of_triangle p1,p2,p3 is empty
proof end;