(* ========================================================================= *) (* HOL Light Hilbert geometry axiomatic proofs *) (* *) (* (c) Copyright, Bill Richter 2013 *) (* Distributed under the same license as HOL Light *) (* *) (* High school students can learn rigorous axiomatic geometry proofs, as in *) (* http://www.math.northwestern.edu/~richter/hilbert.pdf, using Hilbert's *) (* axioms, and code up readable formal proofs like these here. Thanks to the *) (* Mizar folks for their influential language, Freek Wiedijk for his dialect *) (* miz3 of HOL Light, John Harrison for explaining how to port Mizar code to *) (* miz3 and writing the first 100+ lines of code here, the hol-info list for *) (* explaining features of HOL, and Benjamin Kordesh for carefully reading *) (* much of the paper and the code. Formal proofs are given for the first 7 *) (* sections of the paper, the results cited there from Greenberg's book, and *) (* most of Euclid's book I propositions up to Proposition I.29, following *) (* Hartshorne, whose book seems the most exciting axiomatic geometry text. *) (* A proof assistant is an valuable tool to help read it, as Hartshorne's *) (* proofs are often sketchy and even have gaps. *) (* *) (* M. Greenberg, Euclidean and non-Euclidean geometries, Freeman, 1974. *) (* R. Hartshorne, Geometry, Euclid and Beyond, UTM series, Springer, 2000. *) (* ========================================================================= *) needs "RichterHilbertAxiomGeometry/readable.ml";; new_type("point",0);; new_type_abbrev("point_set",`:point->bool`);; NewConstant("Between",`:point->point->point->bool`);; NewConstant("Line",`:point_set->bool`);; NewConstant("â¡",`:point_set->point_set->bool`);; ParseAsInfix("â ",(12, "right"));; ParseAsInfix("same_side",(12, "right"));; ParseAsInfix("â¡",(12, "right"));; ParseAsInfix("<__",(12, "right"));; ParseAsInfix("<_ang",(12, "right"));; ParseAsInfix("suppl",(12, "right"));; ParseAsInfix("â",(11, "right"));; ParseAsInfix("â¥",(12, "right"));; let NOTIN = NewDefinition `;âa l. a â l â ¬(a â l)`;; let Interval_DEF = NewDefinition `;â A B. open (A,B) = {X | Between A X B}`;; let Collinear_DEF = NewDefinition `;Collinear A B C â â l. Line l ⧠A â l ⧠B â l ⧠C â l`;; let SameSide_DEF = NewDefinition `;A,B same_side l â Line l ⧠¬ â X. (X â l) ⧠X â open (A,B)`;; let Ray_DEF = NewDefinition `;â A B. ray A B = {X | ¬(A = B) ⧠Collinear A B X ⧠A â open (X,B)}`;; let Ordered_DEF = NewDefinition `;ordered A B C D â B â open (A,C) ⧠B â open (A,D) ⧠C â open (A,D) ⧠C â open (B,D)`;; let InteriorAngle_DEF = NewDefinition `;â A O B. int_angle A O B = {P | ¬Collinear A O B ⧠â a b. Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b ⧠B â b ⧠P â a ⧠P â b ⧠P,B same_side a ⧠P,A same_side b}`;; let InteriorTriangle_DEF = NewDefinition `;â A B C. int_triangle A B C = {P | P â int_angle A B C ⧠P â int_angle B C A ⧠P â int_angle C A B}`;; let Tetralateral_DEF = NewDefinition `;Tetralateral A B C D â ¬(A = B) ⧠¬(A = C) ⧠¬(A = D) ⧠¬(B = C) ⧠¬(B = D) ⧠¬(C = D) ⧠¬Collinear A B C ⧠¬Collinear B C D ⧠¬Collinear C D A ⧠¬Collinear D A B`;; let Quadrilateral_DEF = NewDefinition `;Quadrilateral A B C D â Tetralateral A B C D ⧠open (A,B) â© open (C,D) = â ⧠open (B,C) â© open (D,A) = â `;; let ConvexQuad_DEF = NewDefinition `;ConvexQuadrilateral A B C D â Quadrilateral A B C D ⧠A â int_angle B C D ⧠B â int_angle C D A ⧠C â int_angle D A B ⧠D â int_angle A B C`;; let Segment_DEF = NewDefinition `;seg A B = {A, B} ⪠open (A,B)`;; let SEGMENT = NewDefinition `;Segment s â â A B. s = seg A B ⧠¬(A = B)`;; let SegmentOrdering_DEF = NewDefinition `;s <__ t â Segment s ⧠â C D X. t = seg C D ⧠X â open (C,D) ⧠s â¡ seg C X`;; let Angle_DEF = NewDefinition `;â¡ A O B = ray O A ⪠ray O B`;; let ANGLE = NewDefinition `;Angle α â â A O B. α = â¡ A O B ⧠¬Collinear A O B`;; let AngleOrdering_DEF = NewDefinition `;α <_ang β â Angle α ⧠â A O B G. ¬Collinear A O B ⧠β = â¡ A O B ⧠G â int_angle A O B ⧠α â¡ â¡ A O G`;; let RAY = NewDefinition `;Ray r â â O A. ¬(O = A) ⧠r = ray O A`;; let TriangleCong_DEF = NewDefinition `;â A B C A' B' C'. (A, B, C) â (A', B', C') â ¬Collinear A B C ⧠¬Collinear A' B' C' ⧠seg A B â¡ seg A' B' ⧠seg A C â¡ seg A' C' ⧠seg B C â¡ seg B' C' ⧠⡠A B C â¡ â¡ A' B' C' ⧠⡠B C A â¡ â¡ B' C' A' ⧠⡠C A B â¡ â¡ C' A' B'`;; let SupplementaryAngles_DEF = NewDefinition `;â α β. α suppl β â â A O B A'. ¬Collinear A O B ⧠O â open (A,A') ⧠α = â¡ A O B ⧠β = â¡ B O A'`;; let RightAngle_DEF = NewDefinition `;â α. Right α â â β. α suppl β ⧠α ⡠β`;; let PlaneComplement_DEF = NewDefinition `;â α:point_set. complement α = {P | P â α}`;; let CONVEX = NewDefinition `;Convex α â â A B. A â α ⧠B â α â open (A,B) â α`;; let PARALLEL = NewDefinition `;â l k. l ⥠k â Line l ⧠Line k ⧠l â© k = â `;; let Parallelogram_DEF = NewDefinition `;â A B C D. Parallelogram A B C D â Quadrilateral A B C D ⧠â a b c d. Line a ⧠A â a ⧠B â a ⧠Line b ⧠B â b ⧠C â b ⧠Line c ⧠C â c ⧠D â d ⧠Line d ⧠D â d ⧠A â d ⧠a ⥠c ⧠b ⥠d`;; let InteriorCircle_DEF = NewDefinition `;â O R. int_circle O R = {P | ¬(O = R) ⧠(P = O ⨠seg O P <__ seg O R)} `;; (* ------------------------------------------------------------------------- *) (* Hilbert's geometry axioms, except the parallel axiom P, defined later. *) (* ------------------------------------------------------------------------- *) let I1 = NewAxiom `;â A B. ¬(A = B) â â! l. Line l ⧠A â l ⧠B â l`;; let I2 = NewAxiom `;â l. Line l â â A B. A â l ⧠B â l ⧠¬(A = B)`;; let I3 = NewAxiom `;â A B C. ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠¬Collinear A B C`;; let B1 = NewAxiom `;â A B C. Between A B C â ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠Between C B A ⧠Collinear A B C`;; let B2 = NewAxiom `;â A B. ¬(A = B) â â C. Between A B C`;; let B3 = NewAxiom `;â A B C. ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠Collinear A B C â (Between A B C ⨠Between B C A ⨠Between C A B) ⧠¬(Between A B C ⧠Between B C A) ⧠¬(Between A B C ⧠Between C A B) ⧠¬(Between B C A ⧠Between C A B)`;; let B4 = NewAxiom `;â l A B C. Line l ⧠¬Collinear A B C ⧠A â l ⧠B â l ⧠C â l ⧠(â X. X â l ⧠Between A X C) â (â Y. Y â l ⧠Between A Y B) ⨠(â Y. Y â l ⧠Between B Y C)`;; let C1 = NewAxiom `;â s O Z. Segment s ⧠¬(O = Z) â â! P. P â ray O Z â O ⧠seg O P â¡ s`;; let C2Reflexive = NewAxiom `;Segment s â s â¡ s`;; let C2Symmetric = NewAxiom `;Segment s ⧠Segment t ⧠s â¡ t â t â¡ s`;; let C2Transitive = NewAxiom `;Segment s ⧠Segment t ⧠Segment u ⧠s â¡ t ⧠t â¡ u â s â¡ u`;; let C3 = NewAxiom `;â A B C A' B' C'. B â open (A,C) ⧠B' â open (A',C') ⧠seg A B â¡ seg A' B' ⧠seg B C â¡ seg B' C' â seg A C â¡ seg A' C'`;; let C4 = NewAxiom `;â α O A l Y. Angle α ⧠¬(O = A) ⧠Line l ⧠O â l ⧠A â l ⧠Y â l â â! r. Ray r ⧠â B. ¬(O = B) ⧠r = ray O B ⧠B â l ⧠B,Y same_side l ⧠⡠A O B ⡠α`;; let C5Reflexive = NewAxiom `;Angle α â α ⡠α`;; let C5Symmetric = NewAxiom `;Angle α ⧠Angle β ⧠α ⡠β â β ⡠α`;; let C5Transitive = NewAxiom `;Angle α ⧠Angle β ⧠Angle γ ⧠α ⡠β ⧠β ⡠γ â α ⡠γ`;; let C6 = NewAxiom `;â A B C A' B' C'. ¬Collinear A B C ⧠¬Collinear A' B' C' ⧠seg B A â¡ seg B' A' ⧠seg B C â¡ seg B' C' ⧠⡠A B C â¡ â¡ A' B' C' â â¡ B C A â¡ â¡ B' C' A'`;; (* ----------------------------------------------------------------- *) (* Theorems. *) (* ----------------------------------------------------------------- *) let IN_Interval = theorem `; â A B X. X â open (A,B) â Between A X B proof REWRITE_TAC Interval_DEF IN_ELIM_THM; qed; `;; let IN_Ray = theorem `; â A B X. X â ray A B â ¬(A = B) ⧠Collinear A B X ⧠A â open (X,B) proof REWRITE_TAC Ray_DEF IN_ELIM_THM; qed; `;; let IN_InteriorAngle = theorem `; â A O B P. P â int_angle A O B â ¬Collinear A O B ⧠â a b. Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b ⧠B â b ⧠P â a ⧠P â b ⧠P,B same_side a ⧠P,A same_side b proof REWRITE_TAC InteriorAngle_DEF IN_ELIM_THM; qed; `;; let IN_InteriorTriangle = theorem `; â A B C P. P â int_triangle A B C â P â int_angle A B C ⧠P â int_angle B C A ⧠P â int_angle C A B proof REWRITE_TAC InteriorTriangle_DEF IN_ELIM_THM; qed; `;; let IN_PlaneComplement = theorem `; â α:point_set. â P. P â complement α â P â α proof REWRITE_TAC PlaneComplement_DEF IN_ELIM_THM; qed; `;; let IN_InteriorCircle = theorem `; â O R P. P â int_circle O R â ¬(O = R) ⧠(P = O ⨠seg O P <__ seg O R) proof REWRITE_TAC InteriorCircle_DEF IN_ELIM_THM; qed; `;; let B1' = theorem `; â A B C. B â open (A,C) â ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠B â open (C,A) ⧠Collinear A B C proof fol IN_Interval B1; qed; `;; let B2' = theorem `; â A B. ¬(A = B) â â C. B â open (A,C) proof fol IN_Interval B2; qed; `;; let B3' = theorem `; â A B C. ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠Collinear A B C â (B â open (A,C) ⨠C â open (B,A) ⨠A â open (C,B)) ⧠¬(B â open (A,C) ⧠C â open (B,A)) ⧠¬(B â open (A,C) ⧠A â open (C,B)) ⧠¬(C â open (B,A) ⧠A â open (C,B)) proof fol IN_Interval B3; qed; `;; let B4' = theorem `; â l A B C. Line l ⧠¬Collinear A B C ⧠A â l ⧠B â l ⧠C â l ⧠(â X. X â l ⧠X â open (A,C)) â (â Y. Y â l ⧠Y â open (A,B)) ⨠(â Y. Y â l ⧠Y â open (B,C)) proof REWRITE_TAC IN_Interval B4; qed; `;; let B4'' = theorem `; â l A B C. Line l ⧠¬Collinear A B C ⧠A â l ⧠B â l ⧠C â l ⧠A,B same_side l ⧠B,C same_side l â A,C same_side l proof REWRITE_TAC SameSide_DEF; fol B4'; qed; `;; let DisjointOneNotOther = theorem `; â l m. (â x:A. x â m â x â l) â l â© m = â proof REWRITE_TAC â; set_RULE; qed; `;; let EquivIntersectionHelp = theorem `; â e x:A. â l m:A->bool. (l â© m = {x} ⨠m â© l = {x}) ⧠e â m â x â e â l proof REWRITE_TAC â; set_RULE; qed; `;; let CollinearSymmetry = theorem `; â A B C. Collinear A B C â Collinear A C B ⧠Collinear B A C ⧠Collinear B C A ⧠Collinear C A B ⧠Collinear C B A proof intro_TAC âA B C, H1; consider l such that Line l ⧠A â l ⧠B â l ⧠C â l [l_line] by fol H1 Collinear_DEF; fol - Collinear_DEF; qed; `;; let ExistsNewPointOnLine = theorem `; âP. Line l ⧠P â l â â Q. Q â l ⧠¬(P = Q) proof intro_TAC âP, H1; consider A B such that A â l ⧠B â l ⧠¬(A = B) [l_line] by fol H1 I2; case_split PA | notPA by fol; suppose P = A; fol - l_line; end; suppose ¬(P = A); fol - l_line; end; qed; `;; let ExistsPointOffLine = theorem `; âl. Line l â â Q. Q â l proof intro_TAC âl, H1; consider A B C such that ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠¬Collinear A B C [Distinct] by fol I3; case_split one_off | all_on by fol - â; suppose A â l ⨠B â l ⨠C â l; fol -; end; suppose (A â l) ⧠(B â l) ⧠(C â l); Collinear A B C [] by fol H1 - Collinear_DEF; fol - Distinct; end; qed; `;; let BetweenLinear = theorem `; â A B C m. Line m ⧠A â m ⧠C â m ⧠(B â open (A,C) ⨠C â open (B,A) ⨠A â open (C,B)) â B â m proof intro_TAC â A B C m, H1m H1A H1C H2; ¬(A = C) ⧠(Collinear A B C ⨠Collinear B C A ⨠Collinear C A B) [X1] by fol H2 B1'; consider l such that Line l ⧠A â l ⧠B â l ⧠C â l [X2] by fol - Collinear_DEF; l = m [] by fol X1 - H2 H1m H1A H1C I1; fol - X2; qed; `;; let CollinearLinear = theorem `; âA B C m. Line m ⧠A â m ⧠C â m ⧠(Collinear A B C ⨠Collinear B C A ⨠Collinear C A B) ⧠¬(A = C) â B â m proof intro_TAC âA B C m, H1m H1A H1C H2 H3; consider l such that Line l ⧠A â l ⧠B â l ⧠C â l [X1] by fol H2 Collinear_DEF; l = m [] by fol H3 - H1m H1A H1C I1; fol - X1; qed; `;; let NonCollinearImpliesDistinct = theorem `; â A B C. ¬Collinear A B C â ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) proof intro_TAC âA B C, H1; case_split equal | mixed | allDiff by fol; suppose A = B ⧠B = C; consider Q such that ¬(Q = A) [notQA] by fol I3; fol - equal H1 I1 Collinear_DEF; end; suppose (A = B ⧠¬(A = C)) ⨠(A = C ⧠¬(A = B)) ⨠(B = C ⧠¬(A = B)); fol - H1 I1 Collinear_DEF; end; suppose ¬(A = B) ⧠¬(A = C) ⧠¬(B = C); fol -; end; qed; `;; let NonCollinearRaa = theorem `; â A B C l. ¬(A = C) â Line l ⧠A â l ⧠C â l â B â l â ¬Collinear A B C proof intro_TAC â A B C l, Distinct, l_line, notBl; raa Collinear A B C [ANCcol] by fol -; consider m such that Line m ⧠A â m ⧠B â m ⧠C â m [m_line] by fol - Collinear_DEF; m = l [] by fol - l_line Distinct I1; B â l [] by fol m_line -; fol - notBl â; qed; `;; let TwoSidesTriangle1Intersection = theorem `; âA B C Y. ¬Collinear A B C ⧠Collinear B C Y ⧠Collinear A C Y â Y = C proof intro_TAC âA B C Y, ABCcol BCYcol ACYcol; raa ¬(C = Y) [notCY] by fol -; consider l such that Line l ⧠C â l ⧠Y â l [l_line] by fol - I1; B â l ⧠A â l [BAl] by fol - BCYcol ACYcol Collinear_DEF notCY I1; fol - l_line Collinear_DEF ABCcol; qed; `;; let OriginInRay = theorem `; â O Q. ¬(Q = O) â O â ray O Q proof intro_TAC â O Q, H1; O â open (O,Q) [OOQ] by fol B1' â; Collinear O Q O [] by fol H1 I1 Collinear_DEF; fol H1 - OOQ IN_Ray; qed; `;; let EndpointInRay = theorem `; â O Q. ¬(Q = O) â Q â ray O Q proof intro_TAC â O Q, H1; O â open (Q,Q) [notOQQ] by fol B1' â; Collinear O Q Q [] by fol H1 I1 Collinear_DEF; fol H1 - notOQQ IN_Ray; qed; `;; let I1Uniqueness = theorem `; â X l m. Line l ⧠Line m ⧠¬(l = m) ⧠X â l ⧠X â m â l â© m = {X} proof intro_TAC â X l m, H0l H0m H1 H2l H2m; raa ¬(l â© m = {X}) [H3] by fol -; X â l â© m [] by fol H2l H2m IN_INTER; consider A such that A â l â© m ⧠¬(A = X) [X1] by set - H3; A â l ⧠X â l ⧠A â m ⧠X â m [] by fol H0l H0m - H2l H2m IN_INTER; l = m [] by fol H0l H0m - X1 I1; fol - H1; qed; `;; let EquivIntersection = theorem `; â A B X l m. Line l ⧠Line m ⧠l â© m = {X} ⧠A â m â X ⧠B â m â X ⧠X â open (A,B) â A,B same_side l proof intro_TAC â A B X l m, H0l H0m H1 H2l H2m H3; raa ¬(A,B same_side l) [Con] by fol -; A â m ⧠B â m ⧠¬(A = X) ⧠¬(B = X) [H2'] by fol H2l H2m IN_DELETE; ¬(open (A,B) â© l = â ) [nonempty] by set H0l H0m Con SameSide_DEF; open (A,B) â m [ABm] by fol H0l H0m H2' BetweenLinear SUBSET; open (A,B) â© l â {X} [] by set - H1; X â open (A,B) â© l [] by set nonempty -; fol - H3 IN_INTER â; qed; `;; let RayLine = theorem `; â O P l. Line l ⧠O â l ⧠P â l â ray O P â l proof fol IN_Ray CollinearLinear SUBSET; qed; `;; let RaySameSide = theorem `; â l O A P. Line l ⧠O â l ⧠A â l ⧠P â ray O A â O â P â l ⧠P,A same_side l proof intro_TAC â l O A P, l_line Ol notAl PrOA; ¬(O = A) [notOA] by fol l_line Ol notAl â; consider d such that Line d ⧠O â d ⧠A â d [d_line] by fol notOA I1; ¬(l = d) [] by fol - notAl â; l â© d = {O} [ldO] by fol l_line Ol d_line - I1Uniqueness; A â d â O [Ad_O] by fol d_line notOA IN_DELETE; ray O A â d [] by fol d_line RayLine; P â d â O [Pd_O] by fol PrOA - SUBSET IN_DELETE; P â l [notPl] by fol ldO - EquivIntersectionHelp; O â open (P,A) [] by fol PrOA IN_DELETE IN_Ray; P,A same_side l [] by fol l_line Ol d_line ldO Ad_O Pd_O - EquivIntersection; fol notPl -; qed; `;; let IntervalRayEZ = theorem `; â A B C. B â open (A,C) â B â ray A C â A ⧠C â ray A B â A proof intro_TAC â A B C, H1; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠Collinear A B C [ABC] by fol H1 B1'; A â open (B,C) ⧠A â open (C,B) [] by fol - H1 B3' B1' â; fol ABC - CollinearSymmetry IN_Ray IN_DELETE â; qed; `;; let NoncollinearityExtendsToLine = theorem `; â A O B X. ¬Collinear A O B â Collinear O B X ⧠¬(X = O) â ¬Collinear A O X proof intro_TAC â A O B X, H1, H2; ¬(A = O) ⧠¬(A = B) ⧠¬(O = B) [Distinct] by fol H1 NonCollinearImpliesDistinct; consider b such that Line b ⧠O â b ⧠B â b [b_line] by fol Distinct I1; A â b [notAb] by fol b_line H1 Collinear_DEF â; X â b [] by fol H2 b_line Distinct I1 Collinear_DEF; fol b_line - H2 notAb I1 Collinear_DEF â; qed; `;; let SameSideReflexive = theorem `; â l A. Line l ⧠A â l â A,A same_side l proof fol B1' SameSide_DEF; qed; `;; let SameSideSymmetric = theorem `; â l A B. Line l ⧠A â l ⧠B â l â A,B same_side l â B,A same_side l proof fol SameSide_DEF B1'; qed; `;; let SameSideTransitive = theorem `; â l A B C. Line l â A â l ⧠B â l ⧠C â l â A,B same_side l â B,C same_side l â A,C same_side l proof intro_TAC â l A B C, l_line, notABCl, Asim_lB, Bsim_lC; case_split Case1 | Distinct by fol; suppose ¬Collinear A B C ⨠A = B ⨠A = C ⨠B = C; fol - l_line notABCl Asim_lB Bsim_lC B4'' SameSideReflexive; end; suppose Collinear A B C ⧠¬(A = B) ⧠¬(A = C) ⧠¬(B = C); consider m such that Line m ⧠A â m ⧠C â m [m_line] by fol Distinct I1; B â m [Bm] by fol - Distinct CollinearLinear; case_split Disjoint | Intersect by fol; suppose m â© l = â ; set - m_line l_line BetweenLinear SameSide_DEF; end; suppose ¬(m â© l = â ); consider X such that X â l ⧠X â m [Xlm] by fol - MEMBER_NOT_EMPTY IN_INTER; Collinear A X B ⧠Collinear B A C ⧠Collinear A B C [ABXcol] by fol m_line Bm - Collinear_DEF; consider E such that E â l ⧠¬(E = X) [El_X] by fol l_line Xlm ExistsNewPointOnLine; ¬Collinear E A X [EAXncol] by fol l_line El_X Xlm notABCl I1 Collinear_DEF â; consider B' such that ¬(B = E) ⧠B â open (E,B') [EBB'] by fol notABCl El_X â B2'; ¬(B' = E) ⧠¬(B' = B) ⧠Collinear B E B' [EBB'col] by fol - B1' CollinearSymmetry; ¬Collinear A B B' ⧠¬Collinear B' B A ⧠¬Collinear B' A B [ABB'ncol] by fol EAXncol ABXcol Distinct - NoncollinearityExtendsToLine CollinearSymmetry; ¬Collinear B' B C ⧠¬Collinear B' A C ⧠¬Collinear A B' C [AB'Cncol] by fol ABB'ncol ABXcol Distinct NoncollinearityExtendsToLine CollinearSymmetry; B' â ray E B â E ⧠B â ray E B' â E [] by fol EBB' IntervalRayEZ; B' â l ⧠B',B same_side l ⧠B,B' same_side l [notB'l] by fol l_line El_X notABCl - RaySameSide; A,B' same_side l ⧠B',C same_side l [] by fol l_line ABB'ncol notABCl notB'l Asim_lB - AB'Cncol Bsim_lC B4''; fol l_line AB'Cncol notABCl notB'l - B4''; end; end; qed; `;; let ConverseCrossbar = theorem `; â O A B G. ¬Collinear A O B ⧠G â open (A,B) â G â int_angle A O B proof intro_TAC â O A B G, H1 H2; ¬(A = O) ⧠¬(A = B) ⧠¬(O = B) [Distinct] by fol H1 NonCollinearImpliesDistinct; consider a such that Line a ⧠O â a ⧠A â a [a_line] by fol - I1; consider b such that Line b ⧠O â b ⧠B â b [b_line] by fol Distinct I1; consider l such that Line l ⧠A â l ⧠B â l [l_line] by fol Distinct I1; B â a ⧠A â b [] by fol H1 a_line b_line Collinear_DEF â; ¬(a = l) ⧠¬(b = l) [] by fol - l_line â; a â© l = {A} ⧠b â© l = {B} [alA] by fol - a_line l_line b_line I1Uniqueness; ¬(A = G) ⧠¬(A = B) ⧠¬(G = B) [AGB] by fol H2 B1'; A â open (G,B) ⧠B â open (G,A) [notGAB] by fol H2 B3' B1' â; G â l [Gl] by fol l_line H2 BetweenLinear; G â a ⧠G â b [notGa] by fol alA Gl AGB IN_DELETE EquivIntersectionHelp; G â l â A ⧠B â l â A ⧠G â l â B ⧠A â l â B [] by fol Gl l_line AGB IN_DELETE; G,B same_side a ⧠G,A same_side b [] by fol a_line l_line alA - notGAB b_line EquivIntersection; fol H1 a_line b_line notGa - IN_InteriorAngle; qed; `;; let InteriorUse = theorem `; â A O B P a b. Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b ⧠B â b â P â int_angle A O B â P â a ⧠P â b ⧠P,B same_side a ⧠P,A same_side b proof intro_TAC â A O B P a b, aOAbOB, P_AOB; consider α β such that ¬Collinear A O B ⧠Line α ⧠O â α ⧠A â α ⧠Line β ⧠O â β â§B â β ⧠P â α ⧠P â β ⧠P,B same_side α ⧠P,A same_side β [exists] by fol P_AOB IN_InteriorAngle; ¬(A = O) ⧠¬(A = B) ⧠¬(O = B) [Distinct] by fol - NonCollinearImpliesDistinct; α = a ⧠β = b [] by fol - aOAbOB exists I1; fol - exists; qed; `;; let InteriorEZHelp = theorem `; â A O B P. P â int_angle A O B â ¬(P = A) ⧠¬(P = O) ⧠¬(P = B) ⧠¬Collinear A O P proof intro_TAC â A O B P, P_AOB; consider a b such that ¬Collinear A O B ⧠Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b â§B â b ⧠P â a ⧠P â b [def_int] by fol P_AOB IN_InteriorAngle; ¬(P = A) ⧠¬(P = O) ⧠¬(P = B) [PnotAOB] by fol - â; ¬(A = O) [notAO] by fol def_int NonCollinearImpliesDistinct; ¬Collinear A O P [] by fol def_int notAO - NonCollinearRaa CollinearSymmetry; fol PnotAOB -; qed; `;; let InteriorAngleSymmetry = theorem `; â A O B P: point. P â int_angle A O B â P â int_angle B O A proof fol IN_InteriorAngle CollinearSymmetry; qed; `;; let InteriorWellDefined = theorem `; â A O B X P. P â int_angle A O B ⧠X â ray O B â O â P â int_angle A O X proof intro_TAC â A O B X P, H1 H2; consider a b such that ¬Collinear A O B ⧠Line a ⧠O â a ⧠A â a ⧠P â a ⧠Line b ⧠O â b ⧠B â b ⧠P â b ⧠P,B same_side a ⧠P,A same_side b [def_int] by fol H1 IN_InteriorAngle; ¬(X = O) ⧠¬(O = B) ⧠Collinear O B X [H2'] by fol H2 IN_DELETE IN_Ray; B â a [notBa] by fol def_int Collinear_DEF â; ¬Collinear A O X [AOXnoncol] by fol def_int H2' NoncollinearityExtendsToLine; X â b [Xb] by fol def_int H2' CollinearLinear; X â a ⧠B,X same_side a [] by fol def_int notBa H2 RaySameSide SameSideSymmetric; P,X same_side a [] by fol def_int - notBa SameSideTransitive; fol AOXnoncol def_int Xb - IN_InteriorAngle; qed; `;; let WholeRayInterior = theorem `; â A O B X P. X â int_angle A O B ⧠P â ray O X â O â P â int_angle A O B proof intro_TAC â A O B X P, XintAOB PrOX; consider a b such that ¬Collinear A O B ⧠Line a ⧠O â a ⧠A â a ⧠X â a ⧠Line b ⧠O â b ⧠B â b ⧠X â b ⧠X,B same_side a ⧠X,A same_side b [def_int] by fol XintAOB IN_InteriorAngle; P â a ⧠P,X same_side a ⧠P â b ⧠P,X same_side b [Psim_abX] by fol def_int PrOX RaySameSide; P,B same_side a ⧠P,A same_side b [] by fol - def_int Collinear_DEF SameSideTransitive â; fol def_int Psim_abX - IN_InteriorAngle; qed; `;; let AngleOrdering = theorem `; â O A P Q a. ¬(O = A) â Line a ⧠O â a ⧠A â a â P â a ⧠Q â a â P,Q same_side a â ¬Collinear P O Q â P â int_angle Q O A ⨠Q â int_angle P O A proof intro_TAC â O A P Q a, H1, H2, H3, H4, H5; ¬(P = O) ⧠¬(P = Q) ⧠¬(O = Q) [Distinct] by fol H5 NonCollinearImpliesDistinct; consider q such that Line q ⧠O â q ⧠Q â q [q_line] by fol Distinct I1; P â q [notPq] by fol - H5 Collinear_DEF â; assume ¬(P â int_angle Q O A) [notPintQOA] by fol -; ¬Collinear Q O A ⧠¬Collinear P O A [POAncol] by fol H1 H2 H3 I1 Collinear_DEF â; ¬(P,A same_side q) [] by fol - H2 q_line H3 notPq H4 notPintQOA IN_InteriorAngle; consider G such that G â q ⧠G â open (P,A) [existG] by fol q_line - SameSide_DEF; G â int_angle P O A [G_POA] by fol POAncol existG ConverseCrossbar; G â a ⧠G,P same_side a ⧠¬(G = O) [Gsim_aP] by fol - H1 H2 IN_InteriorAngle I1 â; G,Q same_side a [] by fol H2 Gsim_aP H3 H4 SameSideTransitive; O â open (Q,G) [notQOG] by fol - H2 SameSide_DEF B1' â; Collinear O G Q [] by fol q_line existG Collinear_DEF; Q â ray O G â O [] by fol Gsim_aP - notQOG Distinct IN_Ray IN_DELETE; fol G_POA - WholeRayInterior; qed; `;; let InteriorsDisjointSupplement = theorem `; â A O B A'. ¬Collinear A O B ⧠O â open (A,A') â int_angle B O A' â© int_angle A O B = â proof intro_TAC â A O B A', H1 H2; â D. D â int_angle A O B â D â int_angle B O A' [] proof intro_TAC â D, H3; ¬(A = O) ⧠¬(O = B) [] by fol H1 NonCollinearImpliesDistinct; consider a b such that Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b ⧠B â b ⧠A' â a [ab_line] by fol - H2 I1 BetweenLinear; ¬Collinear B O A' [] by fol H1 H2 CollinearSymmetry B1' NoncollinearityExtendsToLine; A â b ⧠A' â b [notAb] by fol ab_line H1 - Collinear_DEF â; ¬(A',A same_side b) [A'nsim_bA] by fol ab_line H2 B1' SameSide_DEF; D â b ⧠D,A same_side b [DintAOB] by fol ab_line H3 InteriorUse; ¬(D,A' same_side b) [] by fol ab_line notAb DintAOB A'nsim_bA SameSideSymmetric SameSideTransitive; fol ab_line - InteriorUse â; qed; fol - DisjointOneNotOther; qed; `;; let InteriorReflectionInterior = theorem `; â A O B D A'. O â open (A,A') ⧠D â int_angle A O B â B â int_angle D O A' proof intro_TAC â A O B D A', H1 H2; consider a b such that ¬Collinear A O B ⧠Line a ⧠O â a ⧠A â a ⧠D â a ⧠Line b ⧠O â b ⧠B â b ⧠D â b ⧠D,B same_side a [DintAOB] by fol H2 IN_InteriorAngle; ¬(O = B) ⧠¬(O = A') ⧠B â a [Distinct] by fol - H1 NonCollinearImpliesDistinct B1' Collinear_DEF â; ¬Collinear D O B [DOB_ncol] by fol DintAOB - NonCollinearRaa CollinearSymmetry; A' â a [A'a] by fol H1 DintAOB BetweenLinear; D â int_angle B O A' [] by fol DintAOB H1 H2 InteriorsDisjointSupplement DisjointOneNotOther; fol Distinct DintAOB A'a DOB_ncol - AngleOrdering â; qed; `;; let Crossbar_THM = theorem `; â O A B D. D â int_angle A O B â â G. G â open (A,B) ⧠G â ray O D â O proof intro_TAC â O A B D, H1; consider a b such that ¬Collinear A O B ⧠Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b ⧠B â b ⧠D â a ⧠D â b ⧠D,B same_side a ⧠D,A same_side b [DintAOB] by fol H1 IN_InteriorAngle; B â a [notBa] by fol DintAOB Collinear_DEF â; ¬(A = O) ⧠¬(A = B) ⧠¬(O = B) ⧠¬(D = O) [Distinct] by fol DintAOB NonCollinearImpliesDistinct â; consider l such that Line l ⧠O â l ⧠D â l [l_line] by fol - I1; consider A' such that O â open (A,A') [AOA'] by fol Distinct B2'; A' â a ⧠Collinear A O A' ⧠¬(A' = O) [A'a] by fol DintAOB - BetweenLinear B1'; ¬(A,A' same_side l) [Ansim_lA'] by fol l_line AOA' SameSide_DEF; B â int_angle D O A' [] by fol H1 AOA' InteriorReflectionInterior; B,A' same_side l [Bsim_lA'] by fol l_line DintAOB A'a - InteriorUse; ¬Collinear A O D ⧠¬Collinear B O D [AODncol] by fol H1 InteriorEZHelp InteriorAngleSymmetry; ¬Collinear D O A' [] by fol - A'a CollinearSymmetry NoncollinearityExtendsToLine; A â l ⧠B â l ⧠A' â l [] by fol l_line AODncol - Collinear_DEF â; ¬(A,B same_side l) [] by fol l_line - Bsim_lA' Ansim_lA' SameSideTransitive; consider G such that G â open (A,B) ⧠G â l [AGB] by fol l_line - SameSide_DEF; Collinear O D G [ODGcol] by fol - l_line Collinear_DEF; G â int_angle A O B [] by fol DintAOB AGB ConverseCrossbar; G â a ⧠G,B same_side a ⧠¬(G = O) [Gsim_aB] by fol DintAOB - InteriorUse â; B,D same_side a [] by fol DintAOB notBa SameSideSymmetric; G,D same_side a [Gsim_aD] by fol DintAOB Gsim_aB notBa - SameSideTransitive; O â open (G,D) [] by fol DintAOB - SameSide_DEF â; G â ray O D â O [] by fol Distinct ODGcol - Gsim_aB IN_Ray IN_DELETE; fol AGB -; qed; `;; let AlternateConverseCrossbar = theorem `; â O A B G. Collinear A G B ⧠G â int_angle A O B â G â open (A,B) proof intro_TAC â O A B G, H1; consider a b such that ¬Collinear A O B ⧠Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b ⧠B â b ⧠G,B same_side a ⧠G,A same_side b [GintAOB] by fol H1 IN_InteriorAngle; ¬(A = B) ⧠¬(G = A) ⧠¬(G = B) ⧠A â open (G,B) ⧠B â open (G,A) [] by fol - H1 NonCollinearImpliesDistinct InteriorEZHelp SameSide_DEF â; fol - H1 B1' B3' â; qed; `;; let InteriorOpposite = theorem `; â A O B P p. P â int_angle A O B â Line p ⧠O â p ⧠P â p â ¬(A,B same_side p) proof intro_TAC â A O B P p, PintAOB, p_line; consider G such that G â open (A,B) ⧠G â ray O P [Gexists] by fol PintAOB Crossbar_THM IN_DELETE; G â p [] by fol p_line - RayLine SUBSET; fol p_line - Gexists SameSide_DEF; qed; `;; let IntervalTransitivity = theorem `; â O P Q R m. Line m ⧠O â m â P â m â O ⧠Q â m â O ⧠R â m â O â O â open (P,Q) ⧠O â open (Q,R) â O â open (P,R) proof intro_TAC â O P Q R m, H0, H2, H3; consider E such that E â m ⧠¬(O = E) [notEm] by fol H0 ExistsPointOffLine â; consider l such that Line l ⧠O â l ⧠E â l [l_line] by fol - I1; ¬(m = l) [] by fol notEm - â; l â© m = {O} [lmO] by fol l_line H0 - l_line I1Uniqueness; P â l ⧠Q â l ⧠R â l [notPQRl] by fol - H2 EquivIntersectionHelp; P,Q same_side l ⧠Q,R same_side l [] by fol l_line H0 lmO H2 H3 EquivIntersection; P,R same_side l [Psim_lR] by fol l_line notPQRl - SameSideTransitive; fol l_line - SameSide_DEF â; qed; `;; let RayWellDefinedHalfway = theorem `; â O P Q. ¬(Q = O) ⧠P â ray O Q â O â ray O P â ray O Q proof intro_TAC â O P Q, H1 H2; consider m such that Line m ⧠O â m ⧠Q â m [OQm] by fol H1 I1; P â ray O Q ⧠¬(P = O) ⧠O â open (P,Q) [H2'] by fol H2 IN_DELETE IN_Ray; P â m ⧠P â m â O ⧠Q â m â O [PQm_O] by fol OQm H2' RayLine SUBSET H2' OQm H1 IN_DELETE; O â open (P,Q) [notPOQ] by fol H2' IN_Ray; â X. X â ray O P â X â ray O Q [] proof intro_TAC â X, XrayOP; X â m ⧠O â open (X,P) [XrOP] by fol OQm PQm_O H2' - RayLine SUBSET IN_Ray; Collinear O Q X [OQXcol] by fol OQm - Collinear_DEF; case_split XO | notXO by fol; suppose X = O; fol H1 - OriginInRay; end; suppose ¬(X = O); X â m â O [] by fol XrOP - IN_DELETE; O â open (X,Q) [] by fol OQm - PQm_O XrOP H2' IntervalTransitivity; fol H1 OQXcol - IN_Ray; end; qed; fol - SUBSET; qed; `;; let RayWellDefined = theorem `; â O P Q. ¬(Q = O) ⧠P â ray O Q â O â ray O P = ray O Q proof intro_TAC â O P Q, H1 H2; ray O P â ray O Q [PsubsetQ] by fol H1 H2 RayWellDefinedHalfway; ¬(P = O) ⧠Collinear O Q P ⧠O â open (P,Q) [H2'] by fol H2 IN_DELETE IN_Ray; Q â ray O P â O [] by fol H2' B1' â CollinearSymmetry IN_Ray H1 IN_DELETE; ray O Q â ray O P [QsubsetP] by fol H2' - RayWellDefinedHalfway; fol PsubsetQ QsubsetP SUBSET_ANTISYM; qed; `;; let OppositeRaysIntersect1pointHelp = theorem `; â A O B X. O â open (A,B) ⧠X â ray O B â O â X â ray O A ⧠O â open (X,A) proof intro_TAC â A O B X, H1 H2; ¬(A = O) ⧠¬(A = B) ⧠¬(O = B) ⧠Collinear A O B [AOB] by fol H1 B1'; ¬(X = O) ⧠Collinear O B X ⧠O â open (X,B) [H2'] by fol H2 IN_DELETE IN_Ray; consider m such that Line m ⧠A â m ⧠B â m [m_line] by fol AOB I1; O â m ⧠X â m [Om] by fol m_line H2' AOB CollinearLinear; A â m â O ⧠X â m â O ⧠B â m â O [] by fol m_line - H2' AOB IN_DELETE; O â open (X,A) [] by fol H1 m_line Om - H2' IntervalTransitivity â B1'; fol - IN_Ray â; qed; `;; let OppositeRaysIntersect1point = theorem `; â A O B. O â open (A,B) â ray O A â© ray O B = {O} proof intro_TAC â A O B, H1; ¬(A = O) ⧠¬(O = B) [] by fol H1 B1'; {O} â ray O A â© ray O B [Osubset_rOA] by fol - OriginInRay IN_INTER SING_SUBSET; â X. ¬(X = O) ⧠X â ray O B â X â ray O A [] by fol IN_DELETE H1 OppositeRaysIntersect1pointHelp; ray O A â© ray O B â {O} [] by fol - IN_INTER IN_SING SUBSET â; fol - Osubset_rOA SUBSET_ANTISYM; qed; `;; let IntervalRay = theorem `; â A B C. B â open (A,C) â ray A B = ray A C proof fol B1' IntervalRayEZ RayWellDefined; qed; `;; let Reverse4Order = theorem `; â A B C D. ordered A B C D â ordered D C B A proof REWRITE_TAC Ordered_DEF; fol B1'; qed; `;; let TransitivityBetweennessHelp = theorem `; â A B C D. B â open (A,C) ⧠C â open (B,D) â B â open (A,D) proof intro_TAC â A B C D, H1; D â ray B C â B [] by fol H1 IntervalRayEZ; fol H1 - OppositeRaysIntersect1pointHelp B1'; qed; `;; let TransitivityBetweenness = theorem `; â A B C D. B â open (A,C) ⧠C â open (B,D) â ordered A B C D proof intro_TAC â A B C D, H1; B â open (A,D) [ABD] by fol H1 TransitivityBetweennessHelp; C â open (D,B) ⧠B â open (C,A) [] by fol H1 B1'; C â open (D,A) [] by fol - TransitivityBetweennessHelp; fol H1 ABD - B1' Ordered_DEF; qed; `;; let IntervalsAreConvex = theorem `; â A B C. B â open (A,C) â open (A,B) â open (A,C) proof intro_TAC â A B C, H1; â X. X â open (A,B) â X â open (A,C) [] proof intro_TAC â X, AXB; X â ray B A â B [] by fol AXB B1' IntervalRayEZ; B â open (X,C) [] by fol H1 B1' - OppositeRaysIntersect1pointHelp; fol AXB - TransitivityBetweennessHelp; qed; fol - SUBSET; qed; `;; let TransitivityBetweennessVariant = theorem `; â A X B C. X â open (A,B) ⧠B â open (A,C) â ordered A X B C proof intro_TAC â A X B C, H1; X â ray B A â B [] by fol H1 B1' IntervalRayEZ; B â open (X,C) [] by fol H1 B1' - OppositeRaysIntersect1pointHelp; fol H1 - TransitivityBetweenness; qed; `;; let Interval2sides2aLineHelp = theorem `; â A B C X. B â open (A,C) â X â open (A,B) ⨠X â open (B,C) proof intro_TAC â A B C X, H1; assume ¬(X â open (A,B)) [AXB] by fol -; ordered A X B C [] by fol - â H1 TransitivityBetweennessVariant; B â open (X,C) [] by fol - Ordered_DEF; X â open (C,B) [] by fol - B1' B3' â; fol - B1' â; qed; `;; let Interval2sides2aLine = theorem `; â A B C X. Collinear A B C â X â open (A,B) ⨠X â open (A,C) ⨠X â open (B,C) proof intro_TAC â A B C X, H1; case_split Nondistinct | Distinct by fol; suppose A = B ⨠A = C ⨠B = C; fol - B1' â; end; suppose ¬(A = B) ⧠¬(A = C) ⧠¬(B = C); B â open (A,C) ⨠C â open (B,A) ⨠A â open (C,B) [] by fol - H1 B3'; fol - Interval2sides2aLineHelp B1' â; end; qed; `;; let TwosidesTriangle2aLine = theorem `; â A B C Y l m. Line l ⧠¬Collinear A B C â A â l ⧠B â l ⧠C â l â Line m ⧠A â m ⧠C â m â Y â l ⧠Y â m â ¬(A,B same_side l) ⧠¬(B,C same_side l) â A,C same_side l proof intro_TAC â A B C Y l m, H1, off_l, m_line, Ylm, H2; consider X Z such that X â l ⧠X â open (A,B) ⧠Z â l ⧠Z â open (C,B) [H2'] by fol H1 H2 SameSide_DEF B1'; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠Y â m â A ⧠Y â m â C ⧠C â m â A ⧠A â m â C [Distinct] by fol H1 NonCollinearImpliesDistinct Ylm off_l â m_line IN_DELETE; consider p such that Line p ⧠B â p ⧠A â p [p_line] by fol Distinct I1; consider q such that Line q ⧠B â q ⧠C â q [q_line] by fol Distinct I1; X â p ⧠Z â q [Xp] by fol p_line H2' BetweenLinear q_line H2'; A â q ⧠B â m ⧠C â p [vertex_off_line] by fol q_line m_line p_line H1 Collinear_DEF â; X â q ⧠X,A same_side q ⧠Z â p ⧠Z,C same_side p [Xsim_qA] by fol q_line p_line - H2' B1' IntervalRayEZ RaySameSide; ¬(m = p) ⧠¬(m = q) [] by fol m_line vertex_off_line â; p â© m = {A} ⧠q â© m = {C} [pmA] by fol p_line m_line q_line H1 - Xp H2' I1Uniqueness; Y â p ⧠Y â q [notYpq] by fol - Distinct EquivIntersectionHelp; X â ray A B â A ⧠Z â ray C B â C [] by fol H2' IntervalRayEZ H2' B1'; X â m ⧠Z â m ⧠X,B same_side m ⧠B,Z same_side m [notXZm] by fol m_line vertex_off_line - RaySameSide SameSideSymmetric; X,Z same_side m [] by fol m_line - vertex_off_line SameSideTransitive; Collinear X Y Z ⧠Y â open (X,Z) ⧠¬(Y = X) ⧠¬(Y = Z) ⧠¬(X = Z) [] by fol H1 H2' Ylm Collinear_DEF m_line - SameSide_DEF notXZm Xsim_qA Xp â; Z â open (X,Y) ⨠X â open (Z,Y) [] by fol - B3' â B1'; case_split ZXY | XZY by fol -; suppose X â open (Z,Y); ¬(Z,Y same_side p) [] by fol p_line Xp - SameSide_DEF; ¬(C,Y same_side p) [] by fol p_line Xsim_qA vertex_off_line notYpq - SameSideTransitive; A â open (C,Y) [] by fol p_line m_line pmA Distinct - EquivIntersection â; fol H1 Ylm off_l - B1' IntervalRayEZ RaySameSide; end; suppose Z â open (X,Y); ¬(X,Y same_side q) [] by fol q_line Xp - SameSide_DEF; ¬(A,Y same_side q) [] by fol q_line Xsim_qA vertex_off_line notYpq - SameSideTransitive; C â open (Y,A) [] by fol q_line m_line pmA Distinct - EquivIntersection â B1'; fol H1 Ylm off_l - IntervalRayEZ RaySameSide; end; qed; `;; let LineUnionOf2Rays = theorem `; â A O B l. Line l ⧠A â l ⧠B â l â O â open (A,B) â l = ray O A ⪠ray O B proof intro_TAC â A O B l, H1, H2; ¬(A = O) ⧠¬(O = B) ⧠O â l [Distinct] by fol H2 B1' H1 BetweenLinear; ray O A ⪠ray O B â l [AOBsub_l] by fol H1 - RayLine UNION_SUBSET; â X. X â l â X â ray O A ⨠X â ray O B [] proof intro_TAC â X, Xl; assume ¬(X â ray O B) [notXrOB] by fol -; Collinear O B X ⧠Collinear X A B ⧠Collinear O A X [XABcol] by fol Distinct H1 Xl Collinear_DEF; O â open (X,B) [] by fol notXrOB Distinct - IN_Ray â; O â open (X,A) [] by fol â B1' XABcol - H2 Interval2sides2aLine; fol Distinct XABcol - IN_Ray; qed; l â ray O A ⪠ray O B [] by fol - IN_UNION SUBSET; fol - AOBsub_l SUBSET_ANTISYM; qed; `;; let AtMost2Sides = theorem `; â A B C l. Line l â A â l ⧠B â l ⧠C â l â A,B same_side l ⨠A,C same_side l ⨠B,C same_side l proof intro_TAC â A B C l, H1, H2; case_split AC | notAC by fol -; suppose A = C; fol - H1 H2 SameSideReflexive; end; suppose ¬(A = C); consider m such that Line m ⧠A â m ⧠C â m [m_line] by fol notAC I1; case_split Empty | nonEmpty by fol -; suppose m â© l = â ; A,C same_side l [] by set m_line H1 - BetweenLinear SameSide_DEF; fol -; end; suppose ¬(m â© l = â ); consider Y such that Y â l ⧠Y â m [Ylm] by fol - IN_INTER MEMBER_NOT_EMPTY; case_split nonCol | ABCcol by fol -; suppose ¬Collinear A B C; fol H1 - H2 m_line Ylm TwosidesTriangle2aLine; end; suppose Collinear A B C; B â m [Bm] by fol - m_line notAC I1 Collinear_DEF; ¬(Y = A) ⧠¬(Y = B) ⧠¬(Y = C) [YnotABC] by fol Ylm H2 â; Y â open (A,B) ⨠Y â open (A,C) ⨠Y â open (B,C) [] by fol ABCcol Interval2sides2aLine; A â ray Y B â Y ⨠A â ray Y C â Y ⨠B â ray Y C â Y [] by fol YnotABC m_line Bm Ylm Collinear_DEF - IN_Ray IN_DELETE; fol H1 Ylm H2 - RaySameSide; end; end; end; qed; `;; let FourPointsOrder = theorem `; â A B C X l. Line l ⧠A â l ⧠B â l ⧠C â l ⧠X â l â ¬(X = A) ⧠¬(X = B) ⧠¬(X = C) â B â open (A,C) â ordered X A B C ⨠ordered A X B C ⨠ordered A B X C ⨠ordered A B C X proof intro_TAC â A B C X l, H1, H2, H3; A â open (X,B) ⨠X â open (A,B) ⨠X â open (B,C) ⨠C â open (B,X) [] proof ¬(A = B) ⧠¬(B = C) [ABCdistinct] by fol H3 B1'; Collinear A B X ⧠Collinear A C X ⧠Collinear C B X [ACXcol] by fol H1 Collinear_DEF; A â open (X,B) ⨠X â open (A,B) ⨠B â open (A,X) [] by fol H2 ABCdistinct - B3' B1'; case_split 2pos | ABX by fol -; suppose A â open (X,B) ⨠X â open (A,B); fol -; end; suppose B â open (A,X); B â open (C,X) [] by fol ACXcol H3 - Interval2sides2aLine â; fol H2 ABCdistinct ACXcol - B3' B1' â; end; qed; fol - H3 B1' TransitivityBetweenness TransitivityBetweennessVariant Reverse4Order; qed; `;; let HilbertAxiomRedundantByMoore = theorem `; â A B C D l. Line l ⧠A â l ⧠B â l ⧠C â l ⧠D â l â ¬(A = B) ⧠¬(A = C) ⧠¬(A = D) ⧠¬(B = C) ⧠¬(B = D) ⧠¬(C = D) â ordered D A B C ⨠ordered A D B C ⨠ordered A B D C ⨠ordered A B C D ⨠ordered D A C B ⨠ordered A D C B ⨠ordered A C D B ⨠ordered A C B D ⨠ordered D C A B ⨠ordered C D A B ⨠ordered C A D B ⨠ordered C A B D proof intro_TAC â A B C D l, H1, H2; Collinear A B C [] by fol H1 Collinear_DEF; B â open (A,C) ⨠C â open (A,B) ⨠A â open (C,B) [] by fol H2 - B3' B1'; fol - H1 H2 FourPointsOrder; qed; `;; let InteriorTransitivity = theorem `; â A O B M G. G â int_angle A O B ⧠M â int_angle A O G â M â int_angle A O B proof intro_TAC â A O B M G, GintAOB MintAOG; ¬Collinear A O B [AOBncol] by fol GintAOB IN_InteriorAngle; consider G' such that G' â open (A,B) ⧠G' â ray O G â O [CrossG] by fol GintAOB Crossbar_THM; M â int_angle A O G' [] by fol MintAOG - InteriorWellDefined; consider M' such that M' â open (A,G') ⧠M' â ray O M â O [CrossM] by fol - Crossbar_THM; ¬(M' = O) ⧠¬(M = O) ⧠Collinear O M M' ⧠O â open (M',M) [] by fol - IN_DELETE IN_Ray; M â ray O M' â O [MrOM'] by fol - CollinearSymmetry B1' â IN_Ray IN_DELETE; open (A,G') â open (A,B) ⧠M' â open (A,B) [] by fol CrossG IntervalsAreConvex CrossM SUBSET; M' â int_angle A O B [] by fol AOBncol - ConverseCrossbar; fol - MrOM' WholeRayInterior; qed; `;; let HalfPlaneConvexNonempty = theorem `; â l H A. Line l ⧠A â l â H = {X | X â l ⧠X,A same_side l} â ¬(H = â ) ⧠H â complement l ⧠Convex H proof intro_TAC â l H A, l_line, HalfPlane; â X. X â H â X â l ⧠X,A same_side l [Hdef] by set HalfPlane; H â complement l [Hsub] by fol - IN_PlaneComplement SUBSET; A,A same_side l ⧠A â H [] by fol l_line SameSideReflexive Hdef; ¬(H = â ) [Hnonempty] by fol - MEMBER_NOT_EMPTY; â P Q X. P â H ⧠Q â H ⧠X â open (P,Q) â X â H [] proof intro_TAC â P Q X, PXQ; P â l ⧠P,A same_side l ⧠Q â l ⧠Q,A same_side l [PQinH] by fol - Hdef; P,Q same_side l [Psim_lQ] by fol l_line - SameSideSymmetric SameSideTransitive; X â l [notXl] by fol - PXQ SameSide_DEF â; open (X,P) â open (P,Q) [] by fol PXQ IntervalsAreConvex B1' SUBSET; X,P same_side l [] by fol l_line - SUBSET Psim_lQ SameSide_DEF; X,A same_side l [] by fol l_line notXl PQinH - Psim_lQ PQinH SameSideTransitive; fol - notXl Hdef; qed; Convex H [] by fol - SUBSET CONVEX; fol Hnonempty Hsub -; qed; `;; let PlaneSeparation = theorem `; â l. Line l â â H1 H2:point_set. H1 â© H2 = â ⧠¬(H1 = â ) ⧠¬(H2 = â ) ⧠Convex H1 ⧠Convex H2 ⧠complement l = H1 ⪠H2 ⧠â P Q. P â H1 ⧠Q â H2 â ¬(P,Q same_side l) proof intro_TAC â l, l_line; consider A such that A â l [notAl] by fol l_line ExistsPointOffLine; consider E such that E â l ⧠¬(A = E) [El] by fol l_line I2 - â; consider B such that E â open (A,B) ⧠¬(E = B) ⧠Collinear A E B [AEB] by fol - B2' B1'; B â l [notBl] by fol - l_line El â notAl NonCollinearRaa CollinearSymmetry; ¬(A,B same_side l) [Ansim_lB] by fol l_line El AEB SameSide_DEF; consider H1 H2 such that H1 = {X | X â l ⧠X,A same_side l} ⧠H2 = {X | X â l ⧠X,B same_side l} [H12sets] by fol; â X. (X â H1 â X â l ⧠X,A same_side l) ⧠(X â H2 â X â l ⧠X,B same_side l) [H12def] by set -; â X. X â H1 â X â l ⧠X,A same_side l [H1def] by set H12sets; â X. X â H2 â X â l ⧠X,B same_side l [H2def] by set H12sets; H1 â© H2 = â [H12disjoint] proof assume ¬(H1 â© H2 = â ) [nonempty] by fol -; consider V such that V â H1 ⧠V â H2 [VinH12] by fol - MEMBER_NOT_EMPTY IN_INTER; V â l ⧠V,A same_side l ⧠V â l ⧠V,B same_side l [] by fol - H12def; A,B same_side l [] by fol l_line - notAl notBl SameSideSymmetric SameSideTransitive; fol - Ansim_lB; qed; ¬(H1 = â ) ⧠¬(H2 = â ) ⧠H1 â complement l ⧠H2 â complement l ⧠Convex H1 ⧠Convex H2 [H12convex_nonempty] by fol l_line notAl notBl H12sets HalfPlaneConvexNonempty; H1 ⪠H2 â complement l [H12sub] by fol H12convex_nonempty UNION_SUBSET; â C. C â complement l â C â H1 ⪠H2 [] proof intro_TAC â C, compl; C â l [notCl] by fol - IN_PlaneComplement; C,A same_side l ⨠C,B same_side l [] by fol l_line notAl notBl - Ansim_lB AtMost2Sides; C â H1 ⨠C â H2 [] by fol notCl - H12def; fol - IN_UNION; qed; complement l â H1 ⪠H2 [] by fol - SUBSET; complement l = H1 ⪠H2 [compl_H1unionH2] by fol H12sub - SUBSET_ANTISYM; â P Q. P â H1 ⧠Q â H2 â ¬(P,Q same_side l) [opp_sides] proof intro_TAC â P Q, both; P â l ⧠P,A same_side l ⧠Q â l ⧠Q,B same_side l [PH1_QH2] by fol - H12def IN; fol l_line - notAl SameSideSymmetric notBl Ansim_lB SameSideTransitive; qed; fol H12disjoint H12convex_nonempty compl_H1unionH2 opp_sides; qed; `;; let TetralateralSymmetry = theorem `; â A B C D. Tetralateral A B C D â Tetralateral B C D A ⧠Tetralateral A B D C proof intro_TAC â A B C D, H1; ¬Collinear A B D ⧠¬Collinear B D C ⧠¬Collinear D C A ⧠¬Collinear C A B [TetraABCD] by fol H1 Tetralateral_DEF CollinearSymmetry; SIMP_TAC H1 - Tetralateral_DEF; fol H1 Tetralateral_DEF; qed; `;; let EasyEmptyIntersectionsTetralateralHelp = theorem `; â A B C D. Tetralateral A B C D â open (A,B) â© open (B,C) = â proof intro_TAC â A B C D, H1; â X. X â open (B,C) â X â open (A,B) [] proof intro_TAC â X, BXC; ¬Collinear A B C ⧠Collinear B X C ⧠¬(X = B) [] by fol H1 Tetralateral_DEF - B1'; ¬Collinear A X B [] by fol - CollinearSymmetry B1' NoncollinearityExtendsToLine; fol - B1' â; qed; fol - DisjointOneNotOther; qed; `;; let EasyEmptyIntersectionsTetralateral = theorem `; â A B C D. Tetralateral A B C D â open (A,B) â© open (B,C) = â ⧠open (B,C) â© open (C,D) = â ⧠open (C,D) â© open (D,A) = â ⧠open (D,A) â© open (A,B) = â proof intro_TAC â A B C D, H1; Tetralateral B C D A ⧠Tetralateral C D A B ⧠Tetralateral D A B C [] by fol H1 TetralateralSymmetry; fol H1 - EasyEmptyIntersectionsTetralateralHelp; qed; `;; let SegmentSameSideOppositeLine = theorem `; â A B C D a c. Quadrilateral A B C D â Line a ⧠A â a ⧠B â a â Line c ⧠C â c ⧠D â c â A,B same_side c ⨠C,D same_side a proof intro_TAC â A B C D a c, H1, a_line, c_line; assume ¬(C,D same_side a) [CDnsim_a] by fol -; consider G such that G â a ⧠G â open (C,D) [CGD] by fol - a_line SameSide_DEF; G â c ⧠Collinear G B A [Gc] by fol c_line - BetweenLinear a_line Collinear_DEF; ¬Collinear B C D ⧠¬Collinear C D A ⧠open (A,B) â© open (C,D) = â [quadABCD] by fol H1 Quadrilateral_DEF Tetralateral_DEF; A â c ⧠B â c ⧠¬(A = G) ⧠¬(B = G) [Distinct] by fol - c_line Collinear_DEF â Gc; G â open (A,B) [] by fol quadABCD CGD DisjointOneNotOther; A â ray G B â G [] by fol Distinct Gc - IN_Ray IN_DELETE; fol c_line Gc Distinct - RaySameSide; qed; `;; let ConvexImpliesQuad = theorem `; â A B C D. Tetralateral A B C D â C â int_angle D A B ⧠D â int_angle A B C â Quadrilateral A B C D proof intro_TAC â A B C D, H1, H2; ¬(A = B) ⧠¬(B = C) ⧠¬(A = D) [TetraABCD] by fol H1 Tetralateral_DEF; consider a such that Line a ⧠A â a ⧠B â a [a_line] by fol TetraABCD I1; consider b such that Line b ⧠B â b ⧠C â b [b_line] by fol TetraABCD I1; consider d such that Line d ⧠D â d ⧠A â d [d_line] by fol TetraABCD I1; open (B,C) â b ⧠open (A,B) â a [BCbABa] by fol b_line a_line BetweenLinear SUBSET; D,A same_side b ⧠C,D same_side a [] by fol H2 a_line b_line d_line InteriorUse; b â© open (D,A) = â ⧠a â© open (C,D) = â [] by set - b_line SameSide_DEF; open (B,C) â© open (D,A) = â ⧠open (A,B) â© open (C,D) = â [] by set BCbABa -; fol H1 - Quadrilateral_DEF; qed; `;; let DiagonalsIntersectImpliesConvexQuad = theorem `; â A B C D G. ¬Collinear B C D â G â open (A,C) ⧠G â open (B,D) â ConvexQuadrilateral A B C D proof intro_TAC â A B C D G, BCDncol, DiagInt; ¬(B = C) ⧠¬(B = D) ⧠¬(C = D) ⧠¬(C = A) ⧠¬(A = G) ⧠¬(D = G) ⧠¬(B = G) [Distinct] by fol BCDncol NonCollinearImpliesDistinct DiagInt B1'; Collinear A G C ⧠Collinear B G D [Gcols] by fol DiagInt B1'; ¬Collinear C D G ⧠¬Collinear B C G [Gncols] by fol BCDncol CollinearSymmetry Distinct Gcols NoncollinearityExtendsToLine; ¬Collinear C D A [CDAncol] by fol - CollinearSymmetry Distinct Gcols NoncollinearityExtendsToLine; ¬Collinear A B C ⧠¬Collinear D A G [ABCncol] by fol Gncols - CollinearSymmetry Distinct Gcols NoncollinearityExtendsToLine; ¬Collinear D A B [DABncol] by fol - CollinearSymmetry Distinct Gcols NoncollinearityExtendsToLine; ¬(A = B) ⧠¬(A = D) [] by fol DABncol NonCollinearImpliesDistinct; Tetralateral A B C D [TetraABCD] by fol Distinct - BCDncol CDAncol DABncol ABCncol Tetralateral_DEF; A â ray C G â C ⧠B â ray D G â D ⧠C â ray A G â A ⧠D â ray B G â B [ArCG] by fol DiagInt B1' IntervalRayEZ; G â int_angle B C D ⧠G â int_angle C D A ⧠G â int_angle D A B ⧠G â int_angle A B C [] by fol BCDncol CDAncol DABncol ABCncol DiagInt B1' ConverseCrossbar; A â int_angle B C D ⧠B â int_angle C D A ⧠C â int_angle D A B ⧠D â int_angle A B C [] by fol - ArCG WholeRayInterior; fol TetraABCD - ConvexImpliesQuad ConvexQuad_DEF; qed; `;; let DoubleNotSimImpliesDiagonalsIntersect = theorem `; â A B C D l m. Line l ⧠A â l ⧠C â l â Line m ⧠B â m ⧠D â m â Tetralateral A B C D â ¬(B,D same_side l) â ¬(A,C same_side m) â (â G. G â open (A,C) â© open (B,D)) ⧠ConvexQuadrilateral A B C D proof intro_TAC â A B C D l m, l_line, m_line, H1, H2, H3; ¬Collinear A B C ⧠¬Collinear B C D ⧠¬Collinear C D A ⧠¬Collinear D A B [TetraABCD] by fol H1 Tetralateral_DEF; consider G such that G â open (A,C) ⧠G â m [AGC] by fol H3 m_line SameSide_DEF; G â l [Gl] by fol l_line - BetweenLinear; A â m ⧠B â l ⧠D â l [] by fol TetraABCD m_line l_line Collinear_DEF â; ¬(l = m) ⧠B â m â G ⧠D â m â G [BDm_G] by fol - l_line â m_line Gl IN_DELETE; l â© m = {G} [] by fol l_line m_line - Gl AGC I1Uniqueness; G â open (B,D) [] by fol l_line m_line - BDm_G H2 EquivIntersection â; fol AGC - IN_INTER TetraABCD DiagonalsIntersectImpliesConvexQuad; qed; `;; let ConvexQuadImpliesDiagonalsIntersect = theorem `; â A B C D l m. Line l ⧠A â l ⧠C â l â Line m ⧠B â m ⧠D â m â ConvexQuadrilateral A B C D â ¬(B,D same_side l) ⧠¬(A,C same_side m) ⧠(â G. G â open (A,C) â© open (B,D)) ⧠¬Quadrilateral A B D C proof intro_TAC â A B C D l m, l_line, m_line, ConvQuadABCD; Tetralateral A B C D ⧠A â int_angle B C D ⧠D â int_angle A B C [convquadABCD] by fol ConvQuadABCD ConvexQuad_DEF Quadrilateral_DEF; ¬(B,D same_side l) ⧠¬(A,C same_side m) [opp_sides] by fol convquadABCD l_line m_line InteriorOpposite; consider G such that G â open (A,C) â© open (B,D) [Gexists] by fol l_line m_line convquadABCD opp_sides DoubleNotSimImpliesDiagonalsIntersect; ¬(open (B,D) â© open (C,A) = â ) [] by fol - IN_INTER B1' MEMBER_NOT_EMPTY; ¬Quadrilateral A B D C [] by fol - Quadrilateral_DEF; fol opp_sides Gexists -; qed; `;; let FourChoicesTetralateralHelp = theorem `; â A B C D. Tetralateral A B C D ⧠C â int_angle D A B â ConvexQuadrilateral A B C D ⨠C â int_triangle D A B proof intro_TAC â A B C D, H1 CintDAB; ¬(A = B) ⧠¬(D = A) ⧠¬(A = C) ⧠¬(B = D) ⧠¬Collinear A B C ⧠¬Collinear B C D ⧠¬Collinear C D A ⧠¬Collinear D A B [TetraABCD] by fol H1 Tetralateral_DEF; consider a d such that Line a ⧠A â a ⧠B â a ⧠Line d ⧠D â d ⧠A â d [ad_line] by fol TetraABCD I1; consider l m such that Line l ⧠A â l ⧠C â l ⧠Line m ⧠B â m ⧠D â m [lm_line] by fol TetraABCD I1; C â a ⧠C â d ⧠B â l ⧠D â l ⧠A â m ⧠C â m ⧠¬Collinear A B D ⧠¬Collinear B D A [tetra'] by fol TetraABCD ad_line lm_line Collinear_DEF â CollinearSymmetry; ¬(B,D same_side l) [Bsim_lD] by fol CintDAB lm_line InteriorOpposite - SameSideSymmetric; case_split opp | same by fol -; suppose ¬(A,C same_side m); fol lm_line H1 Bsim_lD - DoubleNotSimImpliesDiagonalsIntersect; end; suppose A,C same_side m; C,A same_side m [Csim_mA] by fol lm_line - tetra' SameSideSymmetric; C,B same_side d ⧠C,D same_side a [] by fol ad_line CintDAB InteriorUse; C â int_angle A B D ⧠C â int_angle B D A [] by fol tetra' ad_line lm_line Csim_mA - IN_InteriorAngle; C â int_triangle D A B [] by fol CintDAB - IN_InteriorTriangle; fol -; end; qed; `;; let InteriorTriangleSymmetry = theorem `; â A B C P. P â int_triangle A B C â P â int_triangle B C A proof fol IN_InteriorTriangle; qed; `;; let FourChoicesTetralateral = theorem `; â A B C D a. Tetralateral A B C D â Line a ⧠A â a ⧠B â a â C,D same_side a â ConvexQuadrilateral A B C D ⨠ConvexQuadrilateral A B D C ⨠D â int_triangle A B C ⨠C â int_triangle D A B proof intro_TAC â A B C D a, H1, a_line, Csim_aD; ¬(A = B) ⧠¬Collinear A B C ⧠¬Collinear C D A ⧠¬Collinear D A B ⧠Tetralateral A B D C [TetraABCD] by fol H1 Tetralateral_DEF TetralateralSymmetry; ¬Collinear C A D ⧠C â a ⧠D â a [notCDa] by fol TetraABCD CollinearSymmetry a_line Collinear_DEF â; C â int_angle D A B ⨠D â int_angle C A B [] by fol TetraABCD a_line - Csim_aD AngleOrdering; case_split CintDAB | DintCAB by fol -; suppose C â int_angle D A B; ConvexQuadrilateral A B C D ⨠C â int_triangle D A B [] by fol H1 - FourChoicesTetralateralHelp; fol -; end; suppose D â int_angle C A B; ConvexQuadrilateral A B D C ⨠D â int_triangle C A B [] by fol TetraABCD - FourChoicesTetralateralHelp; fol - InteriorTriangleSymmetry; end; qed; `;; let QuadrilateralSymmetry = theorem `; â A B C D. Quadrilateral A B C D â Quadrilateral B C D A ⧠Quadrilateral C D A B ⧠Quadrilateral D A B C proof fol Quadrilateral_DEF INTER_COMM TetralateralSymmetry Quadrilateral_DEF; qed; `;; let FiveChoicesQuadrilateral = theorem `; â A B C D l m. Quadrilateral A B C D â Line l ⧠A â l ⧠C â l ⧠Line m ⧠B â m ⧠D â m â (ConvexQuadrilateral A B C D ⨠A â int_triangle B C D ⨠B â int_triangle C D A ⨠C â int_triangle D A B ⨠D â int_triangle A B C) ⧠(¬(B,D same_side l) ⨠¬(A,C same_side m)) proof intro_TAC â A B C D l m, H1, lm_line; Tetralateral A B C D [H1Tetra] by fol H1 Quadrilateral_DEF; ¬(A = B) ⧠¬(A = D) ⧠¬(B = C) ⧠¬(C = D) [Distinct] by fol H1Tetra Tetralateral_DEF; consider a c such that Line a ⧠A â a ⧠B â a ⧠Line c ⧠C â c ⧠D â c [ac_line] by fol Distinct I1; Quadrilateral C D A B ⧠Tetralateral C D A B [tetraCDAB] by fol H1 QuadrilateralSymmetry Quadrilateral_DEF; ¬ConvexQuadrilateral A B D C ⧠¬ConvexQuadrilateral C D B A [notconvquad] by fol Distinct I1 H1 - ConvexQuadImpliesDiagonalsIntersect; ConvexQuadrilateral A B C D ⨠A â int_triangle B C D ⨠B â int_triangle C D A ⨠C â int_triangle D A B ⨠D â int_triangle A B C [5choices] proof A,B same_side c ⨠C,D same_side a [] by fol H1 ac_line SegmentSameSideOppositeLine; case_split Case1 | Case2 by fol -; suppose C,D same_side a; fol H1Tetra ac_line - notconvquad FourChoicesTetralateral; end; suppose A,B same_side c; ConvexQuadrilateral C D A B ⨠B â int_triangle C D A ⨠A â int_triangle B C D [X1] by fol tetraCDAB ac_line - notconvquad FourChoicesTetralateral; fol - QuadrilateralSymmetry ConvexQuad_DEF; end; qed; ¬(B,D same_side l) ⨠¬(A,C same_side m) [] by fol - lm_line ConvexQuadImpliesDiagonalsIntersect IN_InteriorTriangle InteriorAngleSymmetry InteriorOpposite; fol 5choices -; qed; `;; let IntervalSymmetry = theorem `; â A B. open (A,B) = open (B,A) proof fol B1' EXTENSION; qed; `;; let SegmentSymmetry = theorem `; â A B. seg A B = seg B A proof set Segment_DEF IntervalSymmetry; qed; `;; let C1OppositeRay = theorem `; â O P s. Segment s ⧠¬(O = P) â â Q. P â open (O,Q) ⧠seg P Q â¡ s proof intro_TAC â O P s, H1; consider Z such that P â open (O,Z) ⧠¬(P = Z) [OPZ] by fol H1 B2' B1'; consider Q such that Q â ray P Z â P ⧠seg P Q â¡ s [PQeq] by fol H1 - C1; P â open (Q,O) [] by fol OPZ - OppositeRaysIntersect1pointHelp; fol - B1' PQeq; qed; `;; let OrderedCongruentSegments = theorem `; â A B C D G. ¬(A = C) ⧠¬(D = G) â seg A C â¡ seg D G â B â open (A,C) â â E. E â open (D,G) ⧠seg A B â¡ seg D E proof intro_TAC â A B C D G, H1, H2, H3; Segment (seg A B) ⧠Segment (seg A C) ⧠Segment (seg B C) ⧠Segment (seg D G) [segs] by fol H3 B1' H1 SEGMENT; seg D G â¡ seg A C [DGeqAC] by fol - H2 C2Symmetric; consider E such that E â ray D G â D ⧠seg D E â¡ seg A B [DEeqAB] by fol segs H1 C1; ¬(E = D) ⧠Collinear D E G ⧠D â open (G,E) [ErDG] by fol - IN_DELETE IN_Ray B1' CollinearSymmetry â; consider G' such that E â open (D,G') ⧠seg E G' â¡ seg B C [DEG'] by fol segs - C1OppositeRay; seg D G' â¡ seg A C [DG'eqAC] by fol DEG' H3 DEeqAB C3; Segment (seg D G') ⧠Segment (seg D E) [] by fol DEG' B1' SEGMENT; seg A C â¡ seg D G' ⧠seg A B â¡ seg D E [ABeqDE] by fol segs - DG'eqAC C2Symmetric DEeqAB; G' â ray D E â D ⧠G â ray D E â D [] by fol DEG' IntervalRayEZ ErDG IN_Ray H1 IN_DELETE; G' = G [] by fol ErDG segs - DG'eqAC DGeqAC C1; fol - DEG' ABeqDE; qed; `;; let SegmentSubtraction = theorem `; â A B C A' B' C'. B â open (A,C) ⧠B' â open (A',C') â seg A B â¡ seg A' B' â seg A C â¡ seg A' C' â seg B C â¡ seg B' C' proof intro_TAC â A B C A' B' C', H1, H2, H3; ¬(A = B) ⧠¬(A = C) ⧠Collinear A B C ⧠Segment (seg A' C') ⧠Segment (seg B' C') [Distinct] by fol H1 B1' SEGMENT; consider Q such that B â open (A,Q) ⧠seg B Q â¡ seg B' C' [defQ] by fol - C1OppositeRay; seg A Q â¡ seg A' C' [AQ_A'C'] by fol H1 H2 - C3; ¬(A = Q) ⧠Collinear A B Q ⧠A â open (C,B) ⧠A â open (Q,B) [] proof SIMP_TAC defQ B1' â; fol defQ B1' H1 B3'; qed; C â ray A B â A ⧠Q â ray A B â A [] by fol Distinct - IN_Ray IN_DELETE; C = Q [] by fol Distinct - AQ_A'C' H3 C1; fol defQ -; qed; `;; let SegmentOrderingUse = theorem `; â A B s. Segment s ⧠¬(A = B) â s <__ seg A B â â G. G â open (A,B) ⧠s â¡ seg A G proof intro_TAC â A B s, H1, H2; consider A' B' G' such that seg A B = seg A' B' ⧠G' â open (A',B') ⧠s â¡ seg A' G' [H2'] by fol H2 SegmentOrdering_DEF; ¬(A' = G') ⧠¬(A' = B') ⧠seg A' B' â¡ seg A B [A'notB'G'] by fol - B1' H1 SEGMENT C2Reflexive; consider G such that G â open (A,B) ⧠seg A' G' â¡ seg A G [AGB] by fol A'notB'G' H1 H2' - OrderedCongruentSegments; s â¡ seg A G [] by fol H1 A'notB'G' - B1' SEGMENT H2' C2Transitive; fol AGB -; qed; `;; let SegmentTrichotomy1 = theorem `; â s t. s <__ t â ¬(s â¡ t) proof intro_TAC â s t, H1; consider A B G such that Segment s ⧠t = seg A B ⧠G â open (A,B) ⧠s â¡ seg A G [H1'] by fol H1 SegmentOrdering_DEF; ¬(A = G) ⧠¬(A = B) ⧠¬(G = B) [Distinct] by fol H1' B1'; seg A B â¡ seg A B [ABrefl] by fol - SEGMENT C2Reflexive; G â ray A B â A ⧠B â ray A B â A [] by fol H1' IntervalRay EndpointInRay Distinct IN_DELETE; ¬(seg A G â¡ seg A B) ⧠seg A G â¡ s [] by fol Distinct SEGMENT - ABrefl C1 H1' C2Symmetric; fol Distinct H1' SEGMENT - C2Transitive; qed; `;; let SegmentTrichotomy2 = theorem `; â s t u. s <__ t ⧠Segment u ⧠t â¡ u â s <__ u proof intro_TAC â s t u, H1 H2; consider A B P such that Segment s ⧠t = seg A B ⧠P â open (A,B) ⧠s â¡ seg A P [H1'] by fol H1 SegmentOrdering_DEF; ¬(A = B) ⧠¬(A = P) [Distinct] by fol - B1'; consider X Y such that u = seg X Y ⧠¬(X = Y) [uXY] by fol H2 SEGMENT; consider Q such that Q â open (X,Y) ⧠seg A P â¡ seg X Q [XQY] by fol Distinct - H1' H2 OrderedCongruentSegments; ¬(X = Q) ⧠s â¡ seg X Q [] by fol - B1' H1' Distinct SEGMENT XQY C2Transitive; fol H1' uXY XQY - SegmentOrdering_DEF; qed; `;; let SegmentOrderTransitivity = theorem `; â s t u. s <__ t ⧠t <__ u â s <__ u proof intro_TAC â s t u, H1; consider A B G such that u = seg A B ⧠G â open (A,B) ⧠t â¡ seg A G [H1'] by fol H1 SegmentOrdering_DEF; ¬(A = B) ⧠¬(A = G) ⧠Segment s [Distinct] by fol H1' B1' H1 SegmentOrdering_DEF; s <__ seg A G [] by fol H1 H1' Distinct SEGMENT SegmentTrichotomy2; consider F such that F â open (A,G) ⧠s â¡ seg A F [AFG] by fol Distinct - SegmentOrderingUse; F â open (A,B) [] by fol H1' IntervalsAreConvex - SUBSET; fol Distinct H1' - AFG SegmentOrdering_DEF; qed; `;; let SegmentTrichotomy = theorem `; â s t. Segment s ⧠Segment t â (s â¡ t ⨠s <__ t ⨠t <__ s) ⧠¬(s â¡ t ⧠s <__ t) ⧠¬(s â¡ t ⧠t <__ s) ⧠¬(s <__ t ⧠t <__ s) proof intro_TAC â s t, H1; ¬(s â¡ t ⧠s <__ t) [Not12] proof assume s <__ t [sLESSt] by fol -; fol - SegmentTrichotomy1; qed; ¬(s â¡ t ⧠t <__ s) [Not13] proof assume t <__ s [tLESSs] by fol -; ¬(t â¡ s) [] by fol - SegmentTrichotomy1; fol H1 - C2Symmetric; qed; ¬(s <__ t ⧠t <__ s) [Not23] proof raa s <__ t ⧠t <__ s [Con] by fol -; s <__ s [] by fol H1 - SegmentOrderTransitivity; fol - SegmentTrichotomy1 H1 C2Reflexive; qed; consider O P such that s = seg O P ⧠¬(O = P) [sOP] by fol H1 SEGMENT; consider Q such that Q â ray O P â O ⧠seg O Q â¡ t [QrOP] by fol H1 - C1; O â open (Q,P) ⧠Collinear O P Q ⧠¬(O = Q) [notQOP] by fol - IN_DELETE IN_Ray; s â¡ seg O P ⧠t â¡ seg O Q ⧠seg O Q â¡ t ⧠seg O P â¡ s [stOPQ] by fol H1 sOP - SEGMENT QrOP C2Reflexive C2Symmetric; case_split QP | notQP by fol -; suppose Q = P; s â¡ t [] by fol - sOP QrOP; fol - Not12 Not13 Not23; end; suppose ¬(Q = P); P â open (O,Q) ⨠Q â open (O,P) [] by fol sOP - notQOP B3' B1' â; s <__ seg O Q ⨠t <__ seg O P [] by fol H1 - stOPQ SegmentOrdering_DEF; s <__ t ⨠t <__ s [] by fol - H1 stOPQ SegmentTrichotomy2; fol - Not12 Not13 Not23; end; qed; `;; let C4Uniqueness = theorem `; â O A B P l. Line l ⧠O â l ⧠A â l ⧠¬(O = A) â B â l ⧠P â l ⧠P,B same_side l â â¡ A O P â¡ â¡ A O B â ray O B = ray O P proof intro_TAC â O A B P l, H1, H2, H3; ¬(O = B) ⧠¬(O = P) ⧠Ray (ray O B) ⧠Ray (ray O P) [Distinct] by fol H2 H1 â RAY; ¬Collinear A O B ⧠B,B same_side l [Bsim_lB] by fol H1 H2 I1 Collinear_DEF â SameSideReflexive; Angle (â¡ A O B) ⧠⡠A O B â¡ â¡ A O B [] by fol - ANGLE C5Reflexive; fol - H1 H2 Distinct Bsim_lB H3 C4; qed; `;; let AngleSymmetry = theorem `; â A O B. â¡ A O B = â¡ B O A proof fol Angle_DEF UNION_COMM; qed; `;; let TriangleCongSymmetry = theorem `; â A B C A' B' C'. A,B,C â A',B',C' â A,C,B â A',C',B' ⧠B,A,C â B',A',C' ⧠B,C,A â B',C',A' ⧠C,A,B â C',A',B' ⧠C,B,A â C',B',A' proof intro_TAC â A B C A' B' C', H1; ¬Collinear A B C ⧠¬Collinear A' B' C' ⧠seg A B â¡ seg A' B' ⧠seg A C â¡ seg A' C' ⧠seg B C â¡ seg B' C' ⧠⡠A B C â¡ â¡ A' B' C' ⧠⡠B C A â¡ â¡ B' C' A' ⧠⡠C A B â¡ â¡ C' A' B' [H1'] by fol H1 TriangleCong_DEF; seg B A â¡ seg B' A' ⧠seg C A â¡ seg C' A' ⧠seg C B â¡ seg C' B' [segments] by fol H1' SegmentSymmetry; â¡ C B A â¡ â¡ C' B' A' ⧠⡠A C B â¡ â¡ A' C' B' ⧠⡠B A C â¡ â¡ B' A' C' [] by fol H1' AngleSymmetry; fol CollinearSymmetry H1' segments - TriangleCong_DEF; qed; `;; let SAS = theorem `; â A B C A' B' C'. ¬Collinear A B C ⧠¬Collinear A' B' C' â seg B A â¡ seg B' A' ⧠seg B C â¡ seg B' C' â â¡ A B C â¡ â¡ A' B' C' â A,B,C â A',B',C' proof intro_TAC â A B C A' B' C', H1, H2, H3; ¬(A = B) ⧠¬(A = C) ⧠¬(A' = C') [Distinct] by fol H1 NonCollinearImpliesDistinct; consider c such that Line c ⧠A â c ⧠B â c [c_line] by fol Distinct I1; C â c [notCc] by fol H1 c_line Collinear_DEF â; â¡ B C A â¡ â¡ B' C' A' [BCAeq] by fol H1 H2 H3 C6; â¡ B A C â¡ â¡ B' A' C' [BACeq] by fol H1 CollinearSymmetry H2 H3 AngleSymmetry C6; consider Y such that Y â ray A C â A ⧠seg A Y â¡ seg A' C' [YrAC] by fol Distinct SEGMENT C1; Y â c ⧠Y,C same_side c [Ysim_cC] by fol c_line notCc - RaySameSide; ¬Collinear Y A B [YABncol] by fol Distinct c_line - NonCollinearRaa CollinearSymmetry; ray A Y = ray A C ⧠⡠Y A B = â¡ C A B [] by fol Distinct YrAC RayWellDefined Angle_DEF; â¡ Y A B â¡ â¡ C' A' B' [] by fol BACeq - AngleSymmetry; â¡ A B Y â¡ â¡ A' B' C' [ABYeq] by fol YABncol H1 CollinearSymmetry H2 SegmentSymmetry YrAC - C6; Angle (â¡ A B C) ⧠Angle (â¡ A' B' C') ⧠Angle (â¡ A B Y) [] by fol H1 CollinearSymmetry YABncol ANGLE; â¡ A B Y â¡ â¡ A B C [ABYeqABC] by fol - ABYeq - H3 C5Symmetric C5Transitive; ray B C = ray B Y ⧠¬(Y = B) ⧠Y â ray B C [] by fol c_line Distinct notCc Ysim_cC ABYeqABC C4Uniqueness â - EndpointInRay; Collinear B C Y ⧠Collinear A C Y [ABCYcol] by fol - YrAC IN_DELETE IN_Ray; C = Y [] by fol H1 ABCYcol TwoSidesTriangle1Intersection; seg A C â¡ seg A' C' [] by fol - YrAC; fol H1 H2 SegmentSymmetry - H3 BCAeq BACeq AngleSymmetry TriangleCong_DEF; qed; `;; let ASA = theorem `; â A B C A' B' C'. ¬Collinear A B C ⧠¬Collinear A' B' C' â seg A C â¡ seg A' C' â â¡ C A B â¡ â¡ C' A' B' ⧠⡠B C A â¡ â¡ B' C' A' â A,B,C â A',B',C' proof intro_TAC â A B C A' B' C', H1, H2, H3; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠¬(A' = B') ⧠¬(A' = C') ⧠¬(B' = C') ⧠Segment (seg C' B') [Distinct] by fol H1 NonCollinearImpliesDistinct SEGMENT; consider D such that D â ray C B â C ⧠seg C D â¡ seg C' B' ⧠¬(D = C) [DrCB] by fol - C1 IN_DELETE; Collinear C B D [CBDcol] by fol - IN_DELETE IN_Ray; ¬Collinear D C A ⧠Angle (â¡ C A D) ⧠Angle (â¡ C' A' B') ⧠Angle (â¡ C A B) [DCAncol] by fol H1 CollinearSymmetry - DrCB NoncollinearityExtendsToLine H1 ANGLE; consider b such that Line b ⧠A â b ⧠C â b [b_line] by fol Distinct I1; B â b ⧠¬(D = A) [notBb] by fol H1 - Collinear_DEF â DCAncol NonCollinearImpliesDistinct; D â b ⧠D,B same_side b [Dsim_bB] by fol b_line - DrCB RaySameSide; ray C D = ray C B [] by fol Distinct DrCB RayWellDefined; â¡ D C A â¡ â¡ B' C' A' [] by fol H3 - Angle_DEF; D,C,A â B',C',A' [] by fol DCAncol H1 CollinearSymmetry DrCB H2 SegmentSymmetry - SAS; â¡ C A D â¡ â¡ C' A' B' [] by fol - TriangleCong_DEF; â¡ C A D â¡ â¡ C A B [] by fol DCAncol - H3 C5Symmetric C5Transitive; ray A B = ray A D ⧠D â ray A B [] by fol b_line Distinct notBb Dsim_bB - C4Uniqueness notBb EndpointInRay; Collinear A B D [ABDcol] by fol - IN_Ray; D = B [] by fol H1 CBDcol ABDcol CollinearSymmetry TwoSidesTriangle1Intersection; seg C B â¡ seg C' B' [] by fol - DrCB; B,C,A â B',C',A' [] by fol H1 CollinearSymmetry - H2 SegmentSymmetry H3 SAS; fol - TriangleCongSymmetry; qed; `;; let AngleSubtraction = theorem `; â A O B A' O' B' G G'. G â int_angle A O B ⧠G' â int_angle A' O' B' â â¡ A O B â¡ â¡ A' O' B' ⧠⡠A O G â¡ â¡ A' O' G' â â¡ G O B â¡ â¡ G' O' B' proof intro_TAC â A O B A' O' B' G G', H1, H2; ¬Collinear A O B ⧠¬Collinear A' O' B' [A'O'B'ncol] by fol H1 IN_InteriorAngle; ¬(A = O) ⧠¬(O = B) ⧠¬(G = O) ⧠¬(G' = O') ⧠Segment (seg O' A') ⧠Segment (seg O' B') [Distinct] by fol - NonCollinearImpliesDistinct H1 InteriorEZHelp SEGMENT; consider X Y such that X â ray O A â O ⧠seg O X â¡ seg O' A' ⧠Y â ray O B â O ⧠seg O Y â¡ seg O' B' [XYexists] by fol - C1; G â int_angle X O Y [GintXOY] by fol H1 XYexists InteriorWellDefined InteriorAngleSymmetry; consider H H' such that H â open (X,Y) ⧠H â ray O G â O ⧠H' â open (A',B') ⧠H' â ray O' G' â O' [Hexists] by fol - H1 Crossbar_THM; H â int_angle X O Y ⧠H' â int_angle A' O' B' [HintXOY] by fol GintXOY H1 - WholeRayInterior; ray O X = ray O A ⧠ray O Y = ray O B ⧠ray O H = ray O G ⧠ray O' H' = ray O' G' [Orays] by fol Distinct XYexists Hexists RayWellDefined; â¡ X O Y â¡ â¡ A' O' B' ⧠⡠X O H â¡ â¡ A' O' H' [H2'] by fol H2 - Angle_DEF; ¬Collinear X O Y [] by fol GintXOY IN_InteriorAngle; X,O,Y â A',O',B' [] by fol - A'O'B'ncol H2' XYexists SAS; seg X Y â¡ seg A' B' ⧠⡠O Y X â¡ â¡ O' B' A' ⧠⡠Y X O â¡ â¡ B' A' O' [XOYcong] by fol - TriangleCong_DEF; ¬Collinear O H X ⧠¬Collinear O' H' A' ⧠¬Collinear O Y H ⧠¬Collinear O' B' H' [OHXncol] by fol HintXOY InteriorEZHelp InteriorAngleSymmetry CollinearSymmetry; ray X H = ray X Y ⧠ray A' H' = ray A' B' ⧠ray Y H = ray Y X ⧠ray B' H' = ray B' A' [Hrays] by fol Hexists B1' IntervalRay; â¡ H X O â¡ â¡ H' A' O' [] by fol XOYcong - Angle_DEF; O,H,X â O',H',A' [] by fol OHXncol XYexists - H2' ASA; seg X H â¡ seg A' H' [] by fol - TriangleCong_DEF SegmentSymmetry; seg H Y â¡ seg H' B' [] by fol Hexists XOYcong - SegmentSubtraction; seg Y O â¡ seg B' O' ⧠seg Y H â¡ seg B' H' [YHeq] by fol XYexists - SegmentSymmetry; â¡ O Y H â¡ â¡ O' B' H' [] by fol XOYcong Hrays Angle_DEF; O,Y,H â O',B',H' [] by fol OHXncol YHeq - SAS; â¡ H O Y â¡ â¡ H' O' B' [] by fol - TriangleCong_DEF; fol - Orays Angle_DEF; qed; `;; let OrderedCongruentAngles = theorem `; â A O B A' O' B' G. ¬Collinear A' O' B' ⧠⡠A O B â¡ â¡ A' O' B' ⧠G â int_angle A O B â â G'. G' â int_angle A' O' B' ⧠⡠A O G â¡ â¡ A' O' G' proof intro_TAC â A O B A' O' B' G, H1 H2 H3; ¬Collinear A O B [AOBncol] by fol H3 IN_InteriorAngle; ¬(A = O) ⧠¬(O = B) ⧠¬(A' = B') ⧠¬(O = G) ⧠Segment (seg O' A') ⧠Segment (seg O' B') [Distinct] by fol AOBncol H1 NonCollinearImpliesDistinct H3 InteriorEZHelp SEGMENT; consider X Y such that X â ray O A â O ⧠seg O X â¡ seg O' A' ⧠Y â ray O B â O ⧠seg O Y â¡ seg O' B' [defXY] by fol - C1; G â int_angle X O Y [GintXOY] by fol H3 - InteriorWellDefined InteriorAngleSymmetry; ¬Collinear X O Y ⧠¬(X = Y) [XOYncol] by fol - IN_InteriorAngle NonCollinearImpliesDistinct; consider H such that H â open (X,Y) ⧠H â ray O G â O [defH] by fol GintXOY Crossbar_THM; ray O X = ray O A ⧠ray O Y = ray O B ⧠ray O H = ray O G [Orays] by fol Distinct defXY - RayWellDefined; â¡ X O Y â¡ â¡ A' O' B' [] by fol H2 - Angle_DEF; X,O,Y â A',O',B' [] by fol XOYncol H1 defXY - SAS; seg X Y â¡ seg A' B' ⧠⡠O X Y â¡ â¡ O' A' B' [YXOcong] by fol - TriangleCong_DEF AngleSymmetry; consider G' such that G' â open (A',B') ⧠seg X H â¡ seg A' G' [A'G'B'] by fol XOYncol Distinct - defH OrderedCongruentSegments; G' â int_angle A' O' B' [G'intA'O'B'] by fol H1 - ConverseCrossbar; ray X H = ray X Y ⧠ray A' G' = ray A' B' [] by fol defH A'G'B' IntervalRay; â¡ O X H â¡ â¡ O' A' G' [HXOeq] by fol - Angle_DEF YXOcong; H â int_angle X O Y [] by fol GintXOY defH WholeRayInterior; ¬Collinear O X H ⧠¬Collinear O' A' G' [] by fol - G'intA'O'B' InteriorEZHelp CollinearSymmetry; O,X,H â O',A',G' [] by fol - A'G'B' defXY SegmentSymmetry HXOeq SAS; â¡ X O H â¡ â¡ A' O' G' [] by fol - TriangleCong_DEF AngleSymmetry; â¡ A O G â¡ â¡ A' O' G' [] by fol - Orays Angle_DEF; fol G'intA'O'B' -; qed; `;; let AngleAddition = theorem `; â A O B A' O' B' G G'. G â int_angle A O B ⧠G' â int_angle A' O' B' â â¡ A O G â¡ â¡ A' O' G' ⧠⡠G O B â¡ â¡ G' O' B' â â¡ A O B â¡ â¡ A' O' B' proof intro_TAC â A O B A' O' B' G G', H1, H2; ¬Collinear A O B ⧠¬Collinear A' O' B' [AOBncol] by fol H1 IN_InteriorAngle; ¬(A = O) ⧠¬(A = B) ⧠¬(O = B) ⧠¬(A' = O') ⧠¬(A' = B') ⧠¬(O' = B') ⧠¬(G = O) [Distinct] by fol - NonCollinearImpliesDistinct H1 InteriorEZHelp; consider a b such that Line a ⧠O â a ⧠A â a ⧠Line b ⧠O â b ⧠B â b [a_line] by fol Distinct I1; consider g such that Line g ⧠O â g ⧠G â g [g_line] by fol Distinct I1; G â a ⧠G,B same_side a [H1'] by fol a_line H1 InteriorUse; ¬Collinear A O G ⧠¬Collinear A' O' G' [AOGncol] by fol H1 InteriorEZHelp IN_InteriorAngle; Angle (â¡ A O B) ⧠Angle (â¡ A' O' B') ⧠Angle (â¡ A O G) ⧠Angle (â¡ A' O' G') [angles] by fol AOBncol - ANGLE; â! r. Ray r ⧠â X. ¬(O = X) ⧠r = ray O X ⧠X â a ⧠X,G same_side a ⧠⡠A O X â¡ â¡ A' O' B' [] proof mp_TAC_specl [â¡ A' O' B'; O; A; a; G] C4; fol - angles Distinct a_line H1'; qed; consider X such that X â a ⧠X,G same_side a ⧠⡠A O X â¡ â¡ A' O' B' [Xexists] by fol -; ¬Collinear A O X [AOXncol] by fol Distinct a_line Xexists NonCollinearRaa CollinearSymmetry; â¡ A' O' B' â¡ â¡ A O X [] by fol - AOBncol ANGLE Xexists C5Symmetric; consider Y such that Y â int_angle A O X ⧠⡠A' O' G' â¡ â¡ A O Y [YintAOX] by fol AOXncol - H1 OrderedCongruentAngles; ¬Collinear A O Y [] by fol - InteriorEZHelp; â¡ A O Y â¡ â¡ A O G [AOGeq] by fol - angles - ANGLE YintAOX H2 C5Transitive C5Symmetric; consider x such that Line x ⧠O â x ⧠X â x [x_line] by fol Distinct I1; Y â a ⧠Y,X same_side a [] by fol a_line - YintAOX InteriorUse; Y â a ⧠Y,G same_side a [] by fol a_line - Xexists H1' SameSideTransitive; ray O G = ray O Y [] by fol a_line Distinct H1' - AOGeq C4Uniqueness; G â ray O Y â O [] by fol Distinct - EndpointInRay IN_DELETE; G â int_angle A O X [GintAOX] by fol YintAOX - WholeRayInterior; â¡ G O X â¡ â¡ G' O' B' [GOXeq] by fol - H1 Xexists H2 AngleSubtraction; ¬Collinear G O X ⧠¬Collinear G O B ⧠¬Collinear G' O' B' [GOXncol] by fol GintAOX H1 InteriorAngleSymmetry InteriorEZHelp CollinearSymmetry; Angle (â¡ G O X) ⧠Angle (â¡ G O B) ⧠Angle (â¡ G' O' B') [] by fol - ANGLE; â¡ G O X â¡ â¡ G O B [G'O'Xeq] by fol angles - GOXeq C5Symmetric H2 C5Transitive; ¬(A,X same_side g) ⧠¬(A,B same_side g) [Ansim_aXB] by fol g_line GintAOX H1 InteriorOpposite; A â g ⧠B â g ⧠X â g [notABXg] by fol g_line AOGncol GOXncol Distinct I1 Collinear_DEF â; X,B same_side g [] by fol g_line - Ansim_aXB AtMost2Sides; ray O X = ray O B [] by fol g_line Distinct notABXg - G'O'Xeq C4Uniqueness; fol - Xexists Angle_DEF; qed; `;; let AngleOrderingUse = theorem `; â A O B α. Angle α ⧠¬Collinear A O B â α <_ang â¡ A O B â â G. G â int_angle A O B ⧠α â¡ â¡ A O G proof intro_TAC â A O B α, H1, H3; consider A' O' B' G' such that ¬Collinear A' O' B' ⧠⡠A O B = â¡ A' O' B' ⧠G' â int_angle A' O' B' ⧠α â¡ â¡ A' O' G' [H3'] by fol H3 AngleOrdering_DEF; Angle (â¡ A O B) ⧠Angle (â¡ A' O' B') ⧠Angle (â¡ A' O' G') [angles] by fol H1 - ANGLE InteriorEZHelp; â¡ A' O' B' â¡ â¡ A O B [] by fol - H3' C5Reflexive; consider G such that G â int_angle A O B ⧠⡠A' O' G' â¡ â¡ A O G [GintAOB] by fol H1 H3' - OrderedCongruentAngles; α â¡ â¡ A O G [] by fol H1 angles - InteriorEZHelp ANGLE H3' GintAOB C5Transitive; fol - GintAOB; qed; `;; let AngleTrichotomy1 = theorem `; â α β. α <_ang β â ¬(α ⡠β) proof intro_TAC â α β, H1; raa α ⡠β [Con] by fol -; consider A O B G such that Angle α ⧠¬Collinear A O B ⧠β = â¡ A O B ⧠G â int_angle A O B ⧠α â¡ â¡ A O G [H1'] by fol H1 AngleOrdering_DEF; ¬(A = O) ⧠¬(O = B) ⧠¬Collinear A O G [Distinct] by fol H1' NonCollinearImpliesDistinct InteriorEZHelp; consider a such that Line a ⧠O â a ⧠A â a [a_line] by fol Distinct I1; consider b such that Line b ⧠O â b ⧠B â b [b_line] by fol Distinct I1; B â a [notBa] by fol a_line H1' Collinear_DEF â; G â a ⧠G â b ⧠G,B same_side a [GintAOB] by fol a_line b_line H1' InteriorUse; â¡ A O G ⡠α [] by fol H1' Distinct ANGLE C5Symmetric; â¡ A O G â¡ â¡ A O B [] by fol H1' Distinct ANGLE - Con C5Transitive; ray O B = ray O G [] by fol a_line Distinct notBa GintAOB - C4Uniqueness; G â b [] by fol Distinct - EndpointInRay b_line RayLine SUBSET; fol - GintAOB â; qed; `;; let AngleTrichotomy2 = theorem `; â α β γ. α <_ang β ⧠Angle γ ⧠β ⡠γ â α <_ang γ proof intro_TAC â α β γ, H1 H2 H3; consider A O B G such that Angle α ⧠¬Collinear A O B ⧠β = â¡ A O B ⧠G â int_angle A O B ⧠α â¡ â¡ A O G [H1'] by fol H1 AngleOrdering_DEF; consider A' O' B' such that γ = â¡ A' O' B' ⧠¬Collinear A' O' B' [γA'O'B'] by fol H2 ANGLE; consider G' such that G' â int_angle A' O' B' ⧠⡠A O G â¡ â¡ A' O' G' [G'intA'O'B'] by fol γA'O'B' H1' H3 OrderedCongruentAngles; ¬Collinear A O G ⧠¬Collinear A' O' G' [ncol] by fol H1' - InteriorEZHelp; α â¡ â¡ A' O' G' [] by fol H1' ANGLE - G'intA'O'B' C5Transitive; fol H1' - ncol γA'O'B' G'intA'O'B' - AngleOrdering_DEF; qed; `;; let AngleOrderTransitivity = theorem `; â α β γ. α <_ang β ⧠β <_ang γ â α <_ang γ proof intro_TAC â α β γ, H1 H2; consider A O B G such that Angle β ⧠¬Collinear A O B ⧠γ = â¡ A O B ⧠G â int_angle A O B ⧠β â¡ â¡ A O G [H2'] by fol H2 AngleOrdering_DEF; ¬Collinear A O G [AOGncol] by fol H2' InteriorEZHelp; Angle α ⧠Angle (â¡ A O G) ⧠Angle γ [angles] by fol H1 AngleOrdering_DEF H2' - ANGLE; α <_ang â¡ A O G [] by fol H1 H2' - AngleTrichotomy2; consider F such that F â int_angle A O G ⧠α â¡ â¡ A O F [FintAOG] by fol angles AOGncol - AngleOrderingUse; F â int_angle A O B [] by fol H2' - InteriorTransitivity; fol angles H2' - FintAOG AngleOrdering_DEF; qed; `;; let AngleTrichotomy = theorem `; â α β. Angle α ⧠Angle β â (α ⡠β ⨠α <_ang β ⨠β <_ang α) ⧠¬(α ⡠β ⧠α <_ang β) ⧠¬(α ⡠β ⧠β <_ang α) ⧠¬(α <_ang β ⧠β <_ang α) proof intro_TAC â α β, H1; ¬(α ⡠β ⧠α <_ang β) [Not12] by fol AngleTrichotomy1; ¬(α ⡠β ⧠β <_ang α) [Not13] by fol H1 C5Symmetric AngleTrichotomy1; ¬(α <_ang β ⧠β <_ang α) [Not23] by fol H1 AngleOrderTransitivity AngleTrichotomy1 C5Reflexive; consider P O A such that α = â¡ P O A ⧠¬Collinear P O A [POA] by fol H1 ANGLE; ¬(P = O) ⧠¬(O = A) [Distinct] by fol - NonCollinearImpliesDistinct; consider a such that Line a ⧠O â a ⧠A â a [a_line] by fol - I1; P â a [notPa] by fol - Distinct I1 POA Collinear_DEF â; â! r. Ray r ⧠â Q. ¬(O = Q) ⧠r = ray O Q ⧠Q â a ⧠Q,P same_side a ⧠⡠A O Q ⡠β [] proof mp_TAC_specl [β; O; A; a; P] C4; fol H1 Distinct a_line -; qed; consider Q such that ¬(O = Q) ⧠Q â a ⧠Q,P same_side a ⧠⡠A O Q ⡠β [Qexists] by fol -; O â open (Q,P) [notQOP] by fol a_line Qexists SameSide_DEF â; ¬Collinear A O P [AOPncol] by fol POA CollinearSymmetry; ¬Collinear A O Q [AOQncol] by fol a_line Distinct I1 Collinear_DEF Qexists â; Angle (â¡ A O P) ⧠Angle (â¡ A O Q) [] by fol AOPncol - ANGLE; α â¡ â¡ A O P ⧠β â¡ â¡ A O Q ⧠⡠A O P ⡠α [flip] by fol H1 - POA AngleSymmetry C5Reflexive Qexists C5Symmetric; case_split QOPcol | QOPcolncol by fol -; suppose Collinear Q O P; Collinear O P Q [] by fol - CollinearSymmetry; Q â ray O P â O [] by fol Distinct - notQOP IN_Ray Qexists IN_DELETE; ray O Q = ray O P [] by fol Distinct - RayWellDefined; â¡ P O A = â¡ A O Q [] by fol - Angle_DEF AngleSymmetry; α ⡠β [] by fol - POA Qexists; fol - Not12 Not13 Not23; end; suppose ¬Collinear Q O P; P â int_angle Q O A ⨠Q â int_angle P O A [] by fol Distinct a_line Qexists notPa - AngleOrdering; P â int_angle A O Q ⨠Q â int_angle A O P [] by fol - InteriorAngleSymmetry; α <_ang â¡ A O Q ⨠β <_ang â¡ A O P [] by fol H1 AOQncol AOPncol - flip AngleOrdering_DEF; α <_ang β ⨠β <_ang α [] by fol H1 - Qexists flip AngleTrichotomy2; fol - Not12 Not13 Not23; end; qed; `;; let SupplementExists = theorem `; â α. Angle α â â α'. α suppl α' proof intro_TAC â α, H1; consider A O B such that α = â¡ A O B ⧠¬Collinear A O B ⧠¬(A = O) [def_α] by fol H1 ANGLE NonCollinearImpliesDistinct; consider A' such that O â open (A,A') [AOA'] by fol - B2'; â¡ A O B suppl â¡ A' O B [AOBsup] by fol def_α - SupplementaryAngles_DEF AngleSymmetry; fol - def_α; qed; `;; let SupplementImpliesAngle = theorem `; â α β. α suppl β â Angle α ⧠Angle β proof intro_TAC â α β, H1; consider A O B A' such that ¬Collinear A O B ⧠O â open (A,A') ⧠α = â¡ A O B ⧠β = â¡ B O A' [H1'] by fol H1 SupplementaryAngles_DEF; ¬(O = A') ⧠Collinear A O A' [Distinct] by fol - NonCollinearImpliesDistinct B1'; ¬Collinear B O A' [] by fol H1' CollinearSymmetry - NoncollinearityExtendsToLine; fol H1' - ANGLE; qed; `;; let RightImpliesAngle = theorem `; â α. Right α â Angle α proof fol RightAngle_DEF SupplementImpliesAngle; qed; `;; let SupplementSymmetry = theorem `; â α β. α suppl β â β suppl α proof intro_TAC â α β, H1; consider A O B A' such that ¬Collinear A O B ⧠O â open (A,A') ⧠α = â¡ A O B ⧠β = â¡ B O A' [H1'] by fol H1 SupplementaryAngles_DEF; ¬(O = A') ⧠Collinear A O A' [] by fol - NonCollinearImpliesDistinct B1'; ¬Collinear A' O B [A'OBncol] by fol H1' CollinearSymmetry - NoncollinearityExtendsToLine; O â open (A',A) ⧠β = â¡ A' O B ⧠α = â¡ B O A [] by fol H1' B1' AngleSymmetry; fol A'OBncol - SupplementaryAngles_DEF; qed; `;; let SupplementsCongAnglesCong = theorem `; â α β α' β'. α suppl α' ⧠β suppl β' â α ⡠β â α' ⡠β' proof intro_TAC â α β α' β', H1, H2; consider A O B A' such that ¬Collinear A O B ⧠O â open (A,A') ⧠α = â¡ A O B ⧠α' = â¡ B O A' [def_α] by fol H1 SupplementaryAngles_DEF; ¬(A = O) ⧠¬(O = B) ⧠¬(A = A') ⧠¬(O = A') ⧠Collinear A O A' [Distinctα] by fol - NonCollinearImpliesDistinct B1'; ¬Collinear B A A' ⧠¬Collinear O A' B [BAA'ncol] by fol def_α CollinearSymmetry - NoncollinearityExtendsToLine; Segment (seg O A) ⧠Segment (seg O B) ⧠Segment (seg O A') [Osegments] by fol Distinctα SEGMENT; consider C P D C' such that ¬Collinear C P D ⧠P â open (C,C') ⧠β = â¡ C P D ⧠β' = â¡ D P C' [def_β] by fol H1 SupplementaryAngles_DEF; ¬(C = P) ⧠¬(P = D) ⧠¬(P = C') [Distinctβ] by fol def_β NonCollinearImpliesDistinct B1'; consider X such that X â ray P C â P ⧠seg P X â¡ seg O A [defX] by fol Osegments Distinctβ C1; consider Y such that Y â ray P D â P ⧠seg P Y â¡ seg O B ⧠¬(Y = P) [defY] by fol Osegments Distinctβ C1 IN_DELETE; consider X' such that X' â ray P C' â P ⧠seg P X' â¡ seg O A' [defX'] by fol Osegments Distinctβ C1; P â open (X',C) ⧠P â open (X,X') [XPX'] by fol def_β - OppositeRaysIntersect1pointHelp defX; ¬(X = P) ⧠¬(X' = P) ⧠Collinear X P X' ⧠¬(X = X') ⧠ray A' O = ray A' A ⧠ray X' P = ray X' X [XPX'line] by fol defX defX' IN_DELETE - B1' def_α IntervalRay; Collinear P D Y ⧠Collinear P C X [] by fol defY defX IN_DELETE IN_Ray; ¬Collinear C P Y ⧠¬Collinear X P Y [XPYncol] by fol def_β - defY NoncollinearityExtendsToLine CollinearSymmetry XPX'line; ¬Collinear Y X X' ⧠¬Collinear P X' Y [YXX'ncol] by fol - CollinearSymmetry XPX' XPX'line NoncollinearityExtendsToLine; ray P X = ray P C ⧠ray P Y = ray P D ⧠ray P X' = ray P C' [equalPrays] by fol Distinctβ defX defY defX' RayWellDefined; β = â¡ X P Y ⧠β' = â¡ Y P X' ⧠⡠A O B â¡ â¡ X P Y [AOBeqXPY] by fol def_β - Angle_DEF H2 def_α; seg O A â¡ seg P X ⧠seg O B â¡ seg P Y ⧠seg A' O â¡ seg X' P [OAeq] by fol Osegments XPX'line SEGMENT defX defY defX' C2Symmetric SegmentSymmetry; seg A A' â¡ seg X X' [AA'eq] by fol def_α XPX'line XPX' - SegmentSymmetry C3; A,O,B â X,P,Y [] by fol def_α XPYncol OAeq AOBeqXPY SAS; seg A B â¡ seg X Y ⧠⡠B A O â¡ â¡ Y X P [AOBâ ] by fol - TriangleCong_DEF AngleSymmetry; ray A O = ray A A' ⧠ray X P = ray X X' ⧠⡠B A A' â¡ â¡ Y X X' [] by fol def_α XPX' IntervalRay - Angle_DEF; B,A,A' â Y,X,X' [] by fol BAA'ncol YXX'ncol AOBâ - AA'eq - SAS; seg A' B â¡ seg X' Y ⧠⡠A A' B â¡ â¡ X X' Y [] by fol - TriangleCong_DEF SegmentSymmetry; O,A',B â P,X',Y [] by fol BAA'ncol YXX'ncol OAeq - XPX'line Angle_DEF SAS; â¡ B O A' â¡ â¡ Y P X' [] by fol - TriangleCong_DEF; fol - equalPrays def_β Angle_DEF def_α; qed; `;; let SupplementUnique = theorem `; â α β β'. α suppl β ⧠α suppl β' â β ⡠β' proof fol SupplementaryAngles_DEF ANGLE C5Reflexive SupplementsCongAnglesCong; qed; `;; let CongRightImpliesRight = theorem `; â α β. Angle α ⧠Right β â α ⡠β â Right α proof intro_TAC â α β, H1, H2; consider α' β' such that α suppl α' ⧠β suppl β' ⧠β ⡠β' [suppl] by fol H1 SupplementExists H1 RightAngle_DEF; α' ⡠β' [α'eqβ'] by fol suppl H2 SupplementsCongAnglesCong; Angle β ⧠Angle α' ⧠Angle β' [] by fol suppl SupplementImpliesAngle; α ⡠α' [] by fol H1 - H2 suppl α'eqβ' C5Symmetric C5Transitive; fol suppl - RightAngle_DEF; qed; `;; let RightAnglesCongruentHelp = theorem `; â A O B A' P a. ¬Collinear A O B ⧠O â open (A,A') â Right (â¡ A O B) ⧠Right (â¡ A O P) â P â int_angle A O B proof intro_TAC â A O B A' P a, H1, H2; assume ¬(P â int_angle A O B) [Con] by fol -; P â int_angle A O B [PintAOB] by fol - â; B â int_angle P O A' ⧠B â int_angle A' O P [BintA'OP] by fol H1 - InteriorReflectionInterior InteriorAngleSymmetry ; ¬Collinear A O P ⧠¬Collinear P O A' [AOPncol] by fol PintAOB InteriorEZHelp - IN_InteriorAngle; â¡ A O B suppl â¡ B O A' ⧠⡠A O P suppl â¡ P O A' [AOBsup] by fol H1 - SupplementaryAngles_DEF; consider α' β' such that â¡ A O B suppl α' ⧠⡠A O B ⡠α' ⧠⡠A O P suppl β' ⧠⡠A O P ⡠β' [supplα'] by fol H2 RightAngle_DEF; α' â¡ â¡ B O A' ⧠β' â¡ â¡ P O A' [α'eqA'OB] by fol - AOBsup SupplementUnique; Angle (â¡ A O B) ⧠Angle α' ⧠Angle (â¡ B O A') ⧠Angle (â¡ A O P) ⧠Angle β' ⧠Angle (â¡ P O A') [angles] by fol AOBsup supplα' SupplementImpliesAngle AngleSymmetry; â¡ A O B â¡ â¡ B O A' ⧠⡠A O P â¡ â¡ P O A' [H2'] by fol - supplα' α'eqA'OB C5Transitive; â¡ A O P â¡ â¡ A O P ⧠⡠B O A' â¡ â¡ B O A' [refl] by fol angles C5Reflexive; â¡ A O P <_ang â¡ A O B ⧠⡠B O A' <_ang â¡ P O A' [BOA'lessPOA'] by fol angles H1 PintAOB - AngleOrdering_DEF AOPncol CollinearSymmetry BintA'OP AngleSymmetry; â¡ A O P <_ang â¡ B O A' [] by fol - angles H2' AngleTrichotomy2; â¡ A O P <_ang â¡ P O A' [] by fol - BOA'lessPOA' AngleOrderTransitivity; fol - H2' AngleTrichotomy1; qed; `;; let RightAnglesCongruent = theorem `; â α β. Right α ⧠Right β â α ⡠β proof intro_TAC â α β, H1; consider α' such that α suppl α' ⧠α ⡠α' [αright] by fol H1 RightAngle_DEF; consider A O B A' such that ¬Collinear A O B ⧠O â open (A,A') ⧠α = â¡ A O B ⧠α' = â¡ B O A' [def_α] by fol - SupplementaryAngles_DEF; ¬(A = O) ⧠¬(O = B) [Distinct] by fol def_α NonCollinearImpliesDistinct B1'; consider a such that Line a ⧠O â a ⧠A â a [a_line] by fol Distinct I1; B â a [notBa] by fol - def_α Collinear_DEF â; Angle β [] by fol H1 RightImpliesAngle; â! r. Ray r ⧠â P. ¬(O = P) ⧠r = ray O P ⧠P â a ⧠P,B same_side a ⧠⡠A O P ⡠β [] proof mp_TAC_specl [β; O; A; a; B] C4; fol - Distinct a_line notBa; qed; consider P such that ¬(O = P) ⧠P â a ⧠P,B same_side a ⧠⡠A O P ⡠β [defP] by fol -; O â open (P,B) [notPOB] by fol a_line - SameSide_DEF â; ¬Collinear A O P [AOPncol] by fol a_line Distinct defP NonCollinearRaa CollinearSymmetry; Right (â¡ A O P) [AOPright] by fol - ANGLE H1 defP CongRightImpliesRight; P â int_angle A O B ⧠B â int_angle A O P [] by fol def_α H1 - AOPncol AOPright RightAnglesCongruentHelp; Collinear P O B [] by fol Distinct a_line defP notBa - AngleOrdering InteriorAngleSymmetry â; P â ray O B â O [] by fol Distinct - CollinearSymmetry notPOB IN_Ray defP IN_DELETE; ray O P = ray O B ⧠⡠A O P = â¡ A O B [] by fol Distinct - RayWellDefined Angle_DEF; fol - defP def_α; qed; `;; let OppositeRightAnglesLinear = theorem `; â A B O H h. ¬Collinear A O H ⧠¬Collinear H O B â Right (â¡ A O H) ⧠Right (â¡ H O B) â Line h ⧠O â h ⧠H â h ⧠¬(A,B same_side h) â O â open (A,B) proof intro_TAC â A B O H h, H0, H1, H2; ¬(A = O) ⧠¬(O = H) ⧠¬(O = B) [Distinct] by fol H0 NonCollinearImpliesDistinct; A â h ⧠B â h [notABh] by fol H0 H2 Collinear_DEF â; consider E such that O â open (A,E) ⧠¬(E = O) [AOE] by fol Distinct B2' B1'; â¡ A O H suppl â¡ H O E [AOHsupplHOE] by fol H0 - SupplementaryAngles_DEF; E â h [notEh] by fol H2 â AOE BetweenLinear notABh; ¬(A,E same_side h) [] by fol H2 AOE SameSide_DEF; B,E same_side h [Bsim_hE] by fol H2 notABh notEh - H2 AtMost2Sides; consider α' such that â¡ A O H suppl α' ⧠⡠A O H ⡠α' [AOHsupplα'] by fol H1 RightAngle_DEF; Angle (â¡ H O B) ⧠Angle (â¡ A O H) ⧠Angle α' ⧠Angle (â¡ H O E) [angα'] by fol H1 RightImpliesAngle - AOHsupplHOE SupplementImpliesAngle; â¡ H O B â¡ â¡ A O H ⧠α' â¡ â¡ H O E [] by fol H1 RightAnglesCongruent AOHsupplα' AOHsupplHOE SupplementUnique; â¡ H O B â¡ â¡ H O E [] by fol angα' - AOHsupplα' C5Transitive; ray O B = ray O E [] by fol H2 Distinct notABh notEh Bsim_hE - C4Uniqueness; B â ray O E â O [] by fol Distinct EndpointInRay - IN_DELETE; fol AOE - OppositeRaysIntersect1pointHelp B1'; qed; `;; let RightImpliesSupplRight = theorem `; â A O B A'. ¬Collinear A O B ⧠O â open (A,A') ⧠Right (â¡ A O B) â Right (â¡ B O A') proof intro_TAC â A O B A', H1 H2 H3; â¡ A O B suppl â¡ B O A' ⧠Angle (â¡ A O B) ⧠Angle (â¡ B O A') [AOBsuppl] by fol H1 H2 SupplementaryAngles_DEF SupplementImpliesAngle; consider β such that â¡ A O B suppl β ⧠⡠A O B ⡠β [βsuppl] by fol H3 RightAngle_DEF; Angle β ⧠β â¡ â¡ A O B [angβ] by fol - SupplementImpliesAngle C5Symmetric; â¡ B O A' ⡠β [] by fol AOBsuppl βsuppl SupplementUnique; â¡ B O A' â¡ â¡ A O B [] by fol AOBsuppl angβ - βsuppl C5Transitive; fol AOBsuppl H3 - CongRightImpliesRight; qed; `;; let IsoscelesCongBaseAngles = theorem `; â A B C. ¬Collinear A B C ⧠seg B A â¡ seg B C â â¡ C A B â¡ â¡ A C B proof intro_TAC â A B C, H1 H2; ¬(A = B) ⧠¬(B = C) ⧠¬Collinear C B A [CBAncol] by fol H1 NonCollinearImpliesDistinct CollinearSymmetry; seg B C â¡ seg B A ⧠⡠A B C â¡ â¡ C B A [] by fol - SEGMENT H2 C2Symmetric H1 ANGLE AngleSymmetry C5Reflexive; A,B,C â C,B,A [] by fol H1 CBAncol H2 - SAS; fol - TriangleCong_DEF; qed; `;; let C4withC1 = theorem `; â α l O A Y P Q. Angle α ⧠¬(O = A) ⧠¬(P = Q) â Line l ⧠O â l ⧠A â l ⧠Y â l â â N. ¬(O = N) ⧠N â l ⧠N,Y same_side l ⧠seg O N â¡ seg P Q ⧠⡠A O N ⡠α proof intro_TAC â α l O A Y P Q, H1, l_line; â! r. Ray r ⧠â B. ¬(O = B) ⧠r = ray O B ⧠B â l ⧠B,Y same_side l ⧠⡠A O B ⡠α [] proof mp_TAC_specl [α; O; A; l; Y] C4; fol H1 l_line; qed; consider B such that ¬(O = B) ⧠B â l ⧠B,Y same_side l ⧠⡠A O B ⡠α [Bexists] by fol -; consider N such that N â ray O B â O ⧠seg O N â¡ seg P Q [Nexists] by fol H1 - SEGMENT C1; ¬(O = N) [notON] by fol - IN_DELETE; N â l ⧠N,B same_side l [notNl] by fol l_line Bexists Nexists RaySameSide; N,Y same_side l [Nsim_lY] by fol l_line - Bexists SameSideTransitive; ray O N = ray O B [] by fol Bexists Nexists RayWellDefined; â¡ A O N ⡠α [] by fol - Bexists Angle_DEF; fol notON notNl Nsim_lY Nexists -; qed; `;; let C4OppositeSide = theorem `; â α l O A Z P Q. Angle α ⧠¬(O = A) ⧠¬(P = Q) â Line l ⧠O â l ⧠A â l ⧠Z â l â â N. ¬(O = N) ⧠N â l ⧠¬(Z,N same_side l) ⧠seg O N â¡ seg P Q ⧠⡠A O N ⡠α proof intro_TAC â α l O A Z P Q, H1, l_line; ¬(Z = O) [] by fol l_line â; consider Y such that O â open (Z,Y) [ZOY] by fol - B2'; ¬(O = Y) ⧠Collinear O Z Y [notOY] by fol - B1' CollinearSymmetry; Y â l [notYl] by fol notOY l_line NonCollinearRaa â; consider N such that ¬(O = N) ⧠N â l ⧠N,Y same_side l ⧠seg O N â¡ seg P Q ⧠⡠A O N ⡠α [Nexists] proof mp_TAC_specl [α; l; O; A; Y; P; Q] C4withC1; fol H1 l_line -; qed; ¬(Z,Y same_side l) [] by fol l_line ZOY SameSide_DEF; ¬(Z,N same_side l) [] by fol l_line Nexists notYl - SameSideTransitive; fol - Nexists; qed; `;; let SSS = theorem `; â A B C A' B' C'. ¬Collinear A B C ⧠¬Collinear A' B' C' â seg A B â¡ seg A' B' ⧠seg A C â¡ seg A' C' ⧠seg B C â¡ seg B' C' â A,B,C â A',B',C' proof intro_TAC â A B C A' B' C', H1, H2; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠¬(A' = B') ⧠¬(B' = C') [Distinct] by fol H1 NonCollinearImpliesDistinct; consider h such that Line h ⧠A â h ⧠C â h [h_line] by fol Distinct I1; B â h [notBh] by fol h_line H1 â Collinear_DEF; Segment (seg A B) ⧠Segment (seg C B) ⧠Segment (seg A' B') ⧠Segment (seg C' B') [segments] by fol Distinct - SEGMENT; Angle (â¡ C' A' B') [] by fol H1 CollinearSymmetry ANGLE; consider N such that ¬(A = N) ⧠N â h ⧠¬(B,N same_side h) ⧠seg A N â¡ seg A' B' ⧠⡠C A N â¡ â¡ C' A' B' [Nexists] proof mp_TAC_specl [â¡ C' A' B'; h; A; C; B; A'; B'] C4OppositeSide; fol - Distinct h_line notBh; qed; ¬(C = N) [] by fol h_line Nexists â; Segment (seg A N) ⧠Segment (seg C N) [segN] by fol Nexists - SEGMENT; ¬Collinear A N C [ANCncol] by fol Distinct h_line Nexists NonCollinearRaa; Angle (â¡ A B C) ⧠Angle (â¡ A' B' C') ⧠Angle (â¡ A N C) [angles] by fol H1 - ANGLE; seg A B â¡ seg A N [ABeqAN] by fol segments segN Nexists H2 C2Symmetric C2Transitive; C,A,N â C',A',B' [] by fol ANCncol H1 CollinearSymmetry H2 Nexists SAS; â¡ A N C â¡ â¡ A' B' C' ⧠seg C N â¡ seg C' B' [ANCeq] by fol - TriangleCong_DEF; seg C B â¡ seg C N [CBeqCN] by fol segments segN - H2 SegmentSymmetry C2Symmetric C2Transitive; consider G such that G â h ⧠G â open (B,N) [BGN] by fol Nexists h_line SameSide_DEF; ¬(B = N) [notBN] by fol - B1'; ray B G = ray B N ⧠ray N G = ray N B [Grays] by fol BGN B1' IntervalRay; consider v such that Line v ⧠B â v ⧠N â v [v_line] by fol notBN I1; G â v ⧠¬(h = v) [] by fol v_line BGN BetweenLinear notBh â; h â© v = {G} [hvG] by fol h_line v_line - BGN I1Uniqueness; ¬(G = A) â â¡ A B G â¡ â¡ A N G [ABGeqANG] proof intro_TAC notGA; A â v [] by fol hvG h_line - EquivIntersectionHelp IN_DELETE; ¬Collinear B A N [] by fol v_line notBN I1 Collinear_DEF - â; â¡ N B A â¡ â¡ B N A [] by fol - ABeqAN IsoscelesCongBaseAngles; â¡ G B A â¡ â¡ G N A [] by fol - Grays Angle_DEF notGA; fol - AngleSymmetry; qed; ¬(G = C) â â¡ G B C â¡ â¡ G N C [GBCeqGNC] proof intro_TAC notGC; C â v [] by fol hvG h_line - EquivIntersectionHelp IN_DELETE; ¬Collinear B C N [] by fol v_line notBN I1 Collinear_DEF - â; â¡ N B C â¡ â¡ B N C [] by fol - CBeqCN IsoscelesCongBaseAngles AngleSymmetry; fol - Grays Angle_DEF; qed; â¡ A B C â¡ â¡ A N C [] proof case_split GA | GC | AGCdistinct by fol -; suppose G = A; ¬(G = C) [] by fol - Distinct; fol - GBCeqGNC GA; end; suppose G = C; ¬(G = A) [] by fol - Distinct; fol - ABGeqANG GC; end; suppose ¬(G = A) ⧠¬(G = C); â¡ A B G â¡ â¡ A N G ⧠⡠G B C â¡ â¡ G N C [Gequivs] by fol - ABGeqANG GBCeqGNC; ¬Collinear G B C ⧠¬Collinear G N C ⧠¬Collinear G B A ⧠¬Collinear G N A [Gncols] by fol AGCdistinct h_line BGN notBh Nexists NonCollinearRaa; Collinear A G C [] by fol h_line BGN Collinear_DEF; G â open (A,C) ⨠C â open (G,A) ⨠A â open (C,G) [] by fol Distinct AGCdistinct - B3'; case_split AGC | GAC | CAG by fol -; suppose G â open (A,C); G â int_angle A B C ⧠G â int_angle A N C [] by fol H1 ANCncol - ConverseCrossbar; fol - Gequivs AngleAddition; end; suppose C â open (G,A); C â int_angle G B A ⧠C â int_angle G N A [] by fol Gncols - B1' ConverseCrossbar; fol - Gequivs AngleSubtraction AngleSymmetry; end; suppose A â open (C,G); A â int_angle G B C ⧠A â int_angle G N C [] by fol Gncols - B1' ConverseCrossbar; fol - Gequivs AngleSymmetry AngleSubtraction; end; end; qed; â¡ A B C â¡ â¡ A' B' C' [] by fol angles - ANCeq C5Transitive; fol H1 H2 SegmentSymmetry - SAS; qed; `;; let AngleBisector = theorem `; â A B C. ¬Collinear B A C â â M. M â int_angle B A C ⧠⡠B A M â¡ â¡ M A C proof intro_TAC â A B C, H1; ¬(A = B) ⧠¬(A = C) [Distinct] by fol H1 NonCollinearImpliesDistinct; consider D such that B â open (A,D) [ABD] by fol Distinct B2'; ¬(A = D) ⧠Collinear A B D ⧠Segment (seg A D) [ABD'] by fol - B1' SEGMENT; consider E such that E â ray A C â A ⧠seg A E â¡ seg A D ⧠¬(A = E) [ErAC] by fol - Distinct C1 IN_DELETE IN_Ray; Collinear A C E ⧠D â ray A B â A [notAE] by fol ErAC IN_DELETE IN_Ray ABD IntervalRayEZ; ray A D = ray A B ⧠ray A E = ray A C [equalrays] by fol Distinct notAE ErAC RayWellDefined; ¬Collinear D A E ⧠¬Collinear E A D ⧠¬Collinear A E D [EADncol] by fol H1 ABD' notAE ErAC CollinearSymmetry NoncollinearityExtendsToLine; â¡ D E A â¡ â¡ E D A [DEAeq] by fol EADncol ErAC IsoscelesCongBaseAngles; ¬Collinear E D A ⧠Angle (â¡ E D A) ⧠¬Collinear A D E ⧠¬Collinear D E A [angEDA] by fol EADncol CollinearSymmetry ANGLE; ¬(D = E) [notDE] by fol EADncol NonCollinearImpliesDistinct; consider h such that Line h ⧠D â h ⧠E â h [h_line] by fol - I1; A â h [notAh] by fol - Collinear_DEF EADncol â; consider M such that ¬(D = M) ⧠M â h ⧠¬(A,M same_side h) ⧠seg D M â¡ seg D A ⧠⡠E D M â¡ â¡ E D A [Mexists] proof mp_TAC_specl [â¡ E D A; h; D; E; A; D; A] C4OppositeSide; fol angEDA notDE ABD' h_line -; qed; ¬(A = M) [notAM] by fol h_line - SameSideReflexive; ¬Collinear E D M ⧠¬Collinear D E M ⧠¬Collinear M E D [EDMncol] by fol notDE h_line Mexists NonCollinearRaa CollinearSymmetry; seg D E â¡ seg D E ⧠seg M A â¡ seg M A [MArefl] by fol notDE notAM SEGMENT C2Reflexive; E,D,M â E,D,A [] by fol EDMncol angEDA - Mexists SAS; seg M E â¡ seg A E ⧠⡠M E D â¡ â¡ A E D ⧠⡠D E M â¡ â¡ D E A [MEDâ ] by fol - TriangleCong_DEF SegmentSymmetry AngleSymmetry; â¡ E D A â¡ â¡ D E A ⧠⡠E D A â¡ â¡ E D M ⧠⡠D E A â¡ â¡ D E M [EDAeqEDM] by fol EDMncol ANGLE angEDA Mexists MEDâ DEAeq C5Symmetric; consider G such that G â h ⧠G â open (A,M) [AGM] by fol Mexists h_line SameSide_DEF; M â ray A G â A [MrAG] by fol - IntervalRayEZ; consider v such that Line v ⧠A â v ⧠M â v ⧠G â v [v_line] by fol notAM I1 AGM BetweenLinear; ¬(v = h) ⧠v â© h = {G} [vhG] by fol - notAh â h_line AGM I1Uniqueness; D â v [notDv] proof raa ¬(D â v) [Con] by fol -; D â v ⧠D = G [DG] by fol h_line - â vhG IN_INTER IN_SING; D â open (A,M) [] by fol DG AGM; â¡ E D A suppl â¡ E D M [EDAsuppl] by fol angEDA - SupplementaryAngles_DEF AngleSymmetry; Right (â¡ E D A) [] by fol EDAsuppl EDAeqEDM RightAngle_DEF; Right (â¡ A E D) [RightAED] by fol angEDA ANGLE - DEAeq CongRightImpliesRight AngleSymmetry; Right (â¡ D E M) [] by fol EDMncol ANGLE - MEDâ CongRightImpliesRight AngleSymmetry; E â open (A,M) [] by fol EADncol EDMncol RightAED - h_line Mexists OppositeRightAnglesLinear; E â v ⧠E = G [] by fol v_line - BetweenLinear h_line vhG IN_INTER IN_SING; fol - DG notDE; qed; E â v [notEv] proof raa ¬(E â v) [Con] by fol -; E â v ⧠E = G [EG] by fol h_line - â vhG IN_INTER IN_SING; E â open (A,M) [] by fol - AGM; â¡ D E A suppl â¡ D E M [DEAsuppl] by fol EADncol - SupplementaryAngles_DEF AngleSymmetry; Right (â¡ D E A) [RightDEA] by fol DEAsuppl EDAeqEDM RightAngle_DEF; Right (â¡ E D A) [RightEDA] by fol angEDA RightDEA EDAeqEDM CongRightImpliesRight; Right (â¡ E D M) [] by fol EDMncol ANGLE RightEDA Mexists CongRightImpliesRight; D â open (A,M) [] by fol angEDA EDMncol RightEDA AngleSymmetry - h_line Mexists OppositeRightAnglesLinear; D â v ⧠D = G [] by fol v_line - BetweenLinear h_line vhG IN_INTER IN_SING; fol - EG notDE; qed; ¬Collinear M A E ⧠¬Collinear M A D ⧠¬(M = E) [MAEncol] by fol notAM v_line notEv notDv NonCollinearRaa CollinearSymmetry NonCollinearImpliesDistinct; seg M E â¡ seg A D [MEeqAD] by fol - ErAC ABD' SEGMENT MEDâ ErAC C2Transitive; seg A D â¡ seg M D [] by fol SegmentSymmetry ABD' Mexists SEGMENT C2Symmetric; seg M E â¡ seg M D [] by fol MAEncol ABD' Mexists SEGMENT MEeqAD - C2Transitive; M,A,E â M,A,D [] by fol MAEncol MArefl - ErAC SSS; â¡ M A E â¡ â¡ M A D [MAEeq] by fol - TriangleCong_DEF; â¡ D A M â¡ â¡ M A E [] by fol MAEncol ANGLE MAEeq C5Symmetric AngleSymmetry; â¡ B A M â¡ â¡ M A C [BAMeqMAC] by fol - equalrays Angle_DEF; ¬(E,D same_side v) [] proof raa E,D same_side v [Con] by fol -; ray A D = ray A E [] by fol v_line notAM notDv notEv - MAEeq C4Uniqueness; fol ABD' EndpointInRay - IN_Ray EADncol; qed; consider H such that H â v ⧠H â open (E,D) [EHD] by fol v_line - SameSide_DEF; H = G [] by fol - h_line BetweenLinear IN_INTER vhG IN_SING; G â int_angle E A D [GintEAD] by fol EADncol - EHD ConverseCrossbar; M â int_angle E A D [MintEAD] by fol GintEAD MrAG WholeRayInterior; B â ray A D â A ⧠C â ray A E â A [] by fol equalrays Distinct EndpointInRay IN_DELETE; M â int_angle B A C [] by fol MintEAD - InteriorWellDefined InteriorAngleSymmetry; fol - BAMeqMAC; qed; `;; let EuclidPropositionI_6 = theorem `; â A B C. ¬Collinear A B C ⧠⡠B A C â¡ â¡ B C A â seg B A â¡ seg B C proof intro_TAC â A B C, H1 H2; ¬(A = C) [] by fol H1 NonCollinearImpliesDistinct; seg C A â¡ seg A C [CAeqAC] by fol SegmentSymmetry - SEGMENT C2Reflexive; ¬Collinear B C A ⧠¬Collinear C B A ⧠¬Collinear B A C [BCAncol] by fol H1 CollinearSymmetry; â¡ A C B â¡ â¡ C A B [] by fol - ANGLE H2 C5Symmetric AngleSymmetry; C,B,A â A,B,C [] by fol H1 BCAncol CAeqAC H2 - ASA; fol - TriangleCong_DEF; qed; `;; let IsoscelesExists = theorem `; â A B. ¬(A = B) â â D. ¬Collinear A D B ⧠seg D A â¡ seg D B proof intro_TAC â A B, H1; consider l such that Line l ⧠A â l ⧠B â l [l_line] by fol H1 I1; consider C such that C â l [notCl] by fol - ExistsPointOffLine; ¬Collinear C A B ⧠¬Collinear C B A ⧠¬Collinear A B C ⧠¬Collinear A C B ⧠¬Collinear B A C [CABncol] by fol l_line H1 I1 Collinear_DEF - â; â¡ C A B â¡ â¡ C B A ⨠⡠C A B <_ang â¡ C B A ⨠⡠C B A <_ang â¡ C A B [] by fol - ANGLE AngleTrichotomy; case_split cong | less | greater by fol -; suppose â¡ C A B â¡ â¡ C B A; fol - CABncol EuclidPropositionI_6; end; suppose â¡ C A B <_ang â¡ C B A; â¡ C A B <_ang â¡ A B C [] by fol - AngleSymmetry; consider E such that E â int_angle A B C ⧠⡠C A B â¡ â¡ A B E [Eexists] by fol CABncol ANGLE - AngleOrderingUse; ¬(B = E) [notBE] by fol - InteriorEZHelp; consider D such that D â open (A,C) ⧠D â ray B E â B [Dexists] by fol Eexists Crossbar_THM; D â int_angle A B C [] by fol Eexists - WholeRayInterior; ¬Collinear A D B [ADBncol] by fol - InteriorEZHelp CollinearSymmetry; ray B D = ray B E ⧠ray A D = ray A C [] by fol notBE Dexists RayWellDefined IntervalRay; â¡ D A B â¡ â¡ A B D [] by fol Eexists - Angle_DEF; fol ADBncol - AngleSymmetry EuclidPropositionI_6; end; suppose â¡ C B A <_ang â¡ C A B; â¡ C B A <_ang â¡ B A C [] by fol - AngleSymmetry; consider E such that E â int_angle B A C ⧠⡠C B A â¡ â¡ B A E [Eexists] by fol CABncol ANGLE - AngleOrderingUse; ¬(A = E) [notAE] by fol - InteriorEZHelp; consider D such that D â open (B,C) ⧠D â ray A E â A [Dexists] by fol Eexists Crossbar_THM; D â int_angle B A C [] by fol Eexists - WholeRayInterior; ¬Collinear A D B ⧠¬Collinear D A B ⧠¬Collinear D B A [ADBncol] by fol - InteriorEZHelp CollinearSymmetry; ray A D = ray A E ⧠ray B D = ray B C [] by fol notAE Dexists RayWellDefined IntervalRay; â¡ D B A â¡ â¡ B A D [] by fol Eexists - Angle_DEF; â¡ D A B â¡ â¡ D B A [] by fol AngleSymmetry ADBncol ANGLE - C5Symmetric; fol ADBncol - EuclidPropositionI_6; end; qed; `;; let MidpointExists = theorem `; â A B. ¬(A = B) â â M. M â open (A,B) ⧠seg A M â¡ seg M B proof intro_TAC â A B, H1; consider D such that ¬Collinear A D B ⧠seg D A â¡ seg D B [Dexists] by fol H1 IsoscelesExists; consider F such that F â int_angle A D B ⧠⡠A D F â¡ â¡ F D B [Fexists] by fol - AngleBisector; ¬(D = F) [notDF] by fol - InteriorEZHelp; consider M such that M â open (A,B) ⧠M â ray D F â D [Mexists] by fol Fexists Crossbar_THM; ray D M = ray D F [] by fol notDF - RayWellDefined; â¡ A D M â¡ â¡ M D B [ADMeqMDB] by fol Fexists - Angle_DEF; M â int_angle A D B [] by fol Fexists Mexists WholeRayInterior; ¬(D = M) ⧠¬Collinear A D M ⧠¬Collinear B D M [ADMncol] by fol - InteriorEZHelp InteriorAngleSymmetry; seg D M â¡ seg D M [] by fol - SEGMENT C2Reflexive; A,D,M â B,D,M [] by fol ADMncol Dexists - ADMeqMDB AngleSymmetry SAS; fol Mexists - TriangleCong_DEF SegmentSymmetry; qed; `;; let EuclidPropositionI_7short = theorem `; â A B C D a. ¬(A = B) ⧠Line a ⧠A â a ⧠B â a â ¬(C = D) ⧠C â a ⧠D â a ⧠C,D same_side a â seg A C â¡ seg A D â ¬(seg B C â¡ seg B D) proof intro_TAC â A B C D a, a_line, Csim_aD, ACeqAD; ¬(A = C) ⧠¬(A = D) [AnotCD] by fol a_line Csim_aD â; raa seg B C â¡ seg B D [Con] by fol -; seg C B â¡ seg D B ⧠seg A B â¡ seg A B ⧠seg A D â¡ seg A D [segeqs] by fol - SegmentSymmetry a_line AnotCD SEGMENT C2Reflexive; ¬Collinear A C B ⧠¬Collinear A D B [] by fol a_line I1 Csim_aD Collinear_DEF â; A,C,B â A,D,B [] by fol - ACeqAD segeqs SSS; â¡ B A C â¡ â¡ B A D [] by fol - TriangleCong_DEF; ray A D = ray A C [] by fol a_line Csim_aD - C4Uniqueness; C â ray A D â A ⧠D â ray A D â A [] by fol AnotCD - EndpointInRay IN_DELETE; C = D [] by fol AnotCD SEGMENT - ACeqAD segeqs C1; fol - Csim_aD; qed; `;; let EuclidPropositionI_7Help = theorem `; â A B C D a. ¬(A = B) â Line a ⧠A â a ⧠B â a â ¬(C = D) ⧠C â a ⧠D â a ⧠C,D same_side a â seg A C â¡ seg A D â C â int_triangle D A B ⨠ConvexQuadrilateral A B C D â ¬(seg B C â¡ seg B D) proof intro_TAC â A B C D a, notAB, a_line, Csim_aD, ACeqAD, Int_ConvQuad; ¬(A = C) ⧠¬(A = D) ⧠¬(B = C) ⧠¬(B = D) [Distinct] by fol a_line Csim_aD â SameSide_DEF; case_split convex | CintDAB by fol Int_ConvQuad; suppose ConvexQuadrilateral A B C D; A â int_angle B C D ⧠B â int_angle C D A ⧠Tetralateral A B C D [ABint] by fol - ConvexQuad_DEF Quadrilateral_DEF; ¬Collinear B C D ⧠¬Collinear D C B ⧠¬Collinear C B D ⧠¬Collinear C D A ⧠¬Collinear D A C ⧠Angle (â¡ D C A) ⧠Angle (â¡ C D B) [angCDB] by fol - Tetralateral_DEF CollinearSymmetry ANGLE; â¡ C D A â¡ â¡ D C A [CDAeqDCA] by fol angCDB Distinct SEGMENT ACeqAD C2Symmetric IsoscelesCongBaseAngles; A â int_angle D C B ⧠⡠D C A â¡ â¡ D C A ⧠⡠C D B â¡ â¡ C D B [] by fol ABint InteriorAngleSymmetry angCDB ANGLE C5Reflexive; â¡ D C A <_ang â¡ D C B ⧠⡠C D B <_ang â¡ C D A [] by fol angCDB ABint - AngleOrdering_DEF; â¡ C D B <_ang â¡ D C B [] by fol - angCDB CDAeqDCA AngleTrichotomy2 AngleOrderTransitivity; ¬(â¡ D C B â¡ â¡ C D B) [] by fol - AngleTrichotomy1 angCDB ANGLE C5Symmetric; fol angCDB - IsoscelesCongBaseAngles; end; suppose C â int_triangle D A B; C â int_angle A D B ⧠C â int_angle D A B [CintADB] by fol - IN_InteriorTriangle InteriorAngleSymmetry; ¬Collinear A D C ⧠¬Collinear B D C [ADCncol] by fol CintADB InteriorEZHelp InteriorAngleSymmetry; ¬Collinear D A C ⧠¬Collinear C D A ⧠¬Collinear A C D ⧠¬Collinear A D C [DACncol] by fol - CollinearSymmetry; ¬Collinear B C D ⧠Angle (â¡ D C A) ⧠Angle (â¡ C D B) ⧠¬Collinear D C B [angCDB] by fol ADCncol - CollinearSymmetry ANGLE; â¡ C D A â¡ â¡ D C A [CDAeqDCA] by fol DACncol Distinct ADCncol SEGMENT ACeqAD C2Symmetric IsoscelesCongBaseAngles; consider E such that D â open (A,E) ⧠¬(D = E) ⧠Collinear A D E [ADE] by fol Distinct B2' B1'; B â int_angle C D E ⧠Collinear D A E [BintCDE] by fol CintADB - InteriorReflectionInterior CollinearSymmetry; ¬Collinear C D E [CDEncol] by fol DACncol - ADE NoncollinearityExtendsToLine; consider F such that F â open (B,D) ⧠F â ray A C â A [Fexists] by fol CintADB Crossbar_THM B1'; F â int_angle B C D [FintBCD] by fol ADCncol CollinearSymmetry - ConverseCrossbar; ¬Collinear D C F [DCFncol] by fol Distinct ADCncol CollinearSymmetry Fexists B1' NoncollinearityExtendsToLine; Collinear A C F ⧠F â ray D B â D ⧠C â int_angle A D F [] by fol Fexists IN_DELETE IN_Ray B1' IntervalRayEZ CintADB InteriorWellDefined; C â open (A,F) [] by fol - AlternateConverseCrossbar; â¡ A D C suppl â¡ C D E ⧠⡠A C D suppl â¡ D C F [] by fol ADE DACncol - SupplementaryAngles_DEF; â¡ C D E â¡ â¡ D C F [CDEeqDCF] by fol - CDAeqDCA AngleSymmetry SupplementsCongAnglesCong; â¡ C D B <_ang â¡ C D E [] by fol angCDB CDEncol BintCDE C5Reflexive AngleOrdering_DEF; â¡ C D B <_ang â¡ D C F [CDBlessDCF] by fol - DCFncol ANGLE CDEeqDCF AngleTrichotomy2; â¡ D C F <_ang â¡ D C B [] by fol DCFncol ANGLE angCDB FintBCD InteriorAngleSymmetry C5Reflexive AngleOrdering_DEF; â¡ C D B <_ang â¡ D C B [] by fol CDBlessDCF - AngleOrderTransitivity; ¬(â¡ D C B â¡ â¡ C D B) [] by fol - AngleTrichotomy1 angCDB CollinearSymmetry ANGLE C5Symmetric; fol Distinct ADCncol CollinearSymmetry - IsoscelesCongBaseAngles; end; qed; `;; let EuclidPropositionI_7 = theorem `; â A B C D a. ¬(A = B) â Line a ⧠A â a ⧠B â a â ¬(C = D) ⧠C â a ⧠D â a ⧠C,D same_side a â seg A C â¡ seg A D â ¬(seg B C â¡ seg B D) proof intro_TAC â A B C D a, notAB, a_line, Csim_aD, ACeqAD; ¬Collinear A B C ⧠¬Collinear D A B [ABCncol] by fol a_line notAB Csim_aD NonCollinearRaa CollinearSymmetry; ¬(A = C) ⧠¬(A = D) ⧠¬(B = C) ⧠¬(B = D) ⧠A â open (C,D) [Distinct] by fol a_line Csim_aD â SameSide_DEF; ¬Collinear A D C [ADCncol] proof raa Collinear A D C [Con] by fol -; C â ray A D â A ⧠D â ray A D â A ⧠seg A D â¡ seg A D [] by fol Distinct - IN_Ray EndpointInRay IN_DELETE SEGMENT C2Reflexive; fol Distinct SEGMENT - ACeqAD C1 Csim_aD; qed; D,C same_side a [Dsim_aC] by fol a_line Csim_aD SameSideSymmetric; seg A D â¡ seg A C ⧠seg B D â¡ seg B D [ADeqAC] by fol Distinct SEGMENT ACeqAD C2Symmetric C2Reflexive; ¬Collinear D A C ⧠¬Collinear C D A ⧠¬Collinear A C D ⧠¬Collinear A D C [DACncol] by fol ADCncol CollinearSymmetry; ¬(seg B D â¡ seg B C) â ¬(seg B C â¡ seg B D) [BswitchDC] by fol Distinct SEGMENT C2Symmetric; case_split BDCcol | BDCncol by fol -; suppose Collinear B D C; B â open (C,D) ⧠C â ray B D â B ⧠D â ray B D â B [] by fol a_line Csim_aD SameSide_DEF â Distinct - IN_Ray Distinct IN_DELETE EndpointInRay; fol Distinct SEGMENT - ACeqAD ADeqAC C1 Csim_aD; end; suppose ¬Collinear B D C; Tetralateral A B C D [] by fol notAB Distinct Csim_aD ABCncol - CollinearSymmetry DACncol Tetralateral_DEF; ConvexQuadrilateral A B C D ⨠C â int_triangle D A B ⨠ConvexQuadrilateral A B D C ⨠D â int_triangle C A B [] by fol - a_line Csim_aD FourChoicesTetralateral InteriorTriangleSymmetry; fol notAB a_line Csim_aD Dsim_aC ACeqAD ADeqAC - EuclidPropositionI_7Help BswitchDC; end; qed; `;; let EuclidPropositionI_11 = theorem `; â A B. ¬(A = B) â â F. Right (â¡ A B F) proof intro_TAC â A B, notAB; consider C such that B â open (A,C) ⧠seg B C â¡ seg B A [ABC] by fol notAB SEGMENT C1OppositeRay; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠Collinear A B C [Distinct] by fol ABC B1'; seg B A â¡ seg B C [BAeqBC] by fol - SEGMENT ABC C2Symmetric; consider F such that ¬Collinear A F C ⧠seg F A â¡ seg F C [Fexists] by fol Distinct IsoscelesExists; ¬Collinear B F A ⧠¬Collinear B F C [BFAncol] by fol - CollinearSymmetry Distinct NoncollinearityExtendsToLine; ¬Collinear A B F ⧠Angle (â¡ A B F) [angABF] by fol BFAncol CollinearSymmetry ANGLE; â¡ A B F suppl â¡ F B C [ABFsuppl] by fol - ABC SupplementaryAngles_DEF; ¬(B = F) ⧠seg B F â¡ seg B F [] by fol BFAncol NonCollinearImpliesDistinct SEGMENT C2Reflexive; B,F,A â B,F,C [] by fol BFAncol - BAeqBC Fexists SSS; â¡ A B F â¡ â¡ F B C [] by fol - TriangleCong_DEF AngleSymmetry; fol angABF ABFsuppl - RightAngle_DEF; qed; `;; let DropPerpendicularToLine = theorem `; â P l. Line l ⧠P â l â â E Q. E â l ⧠Q â l ⧠Right (â¡ P Q E) proof intro_TAC â P l, l_line; consider A B such that A â l ⧠B â l ⧠¬(A = B) [ABl] by fol l_line I2; ¬Collinear B A P ⧠¬Collinear P A B ⧠¬(A = P) [BAPncol] by fol ABl l_line NonCollinearRaa CollinearSymmetry â; Angle (â¡ B A P) ⧠Angle (â¡ P A B) [angBAP] by fol - ANGLE AngleSymmetry; consider P' such that ¬(A = P') ⧠P' â l ⧠¬(P,P' same_side l) ⧠seg A P' â¡ seg A P ⧠⡠B A P' â¡ â¡ B A P [P'exists] proof mp_TAC_specl [â¡ B A P; l; A; B; P; A; P] C4OppositeSide; fol - ABl BAPncol l_line; qed; consider Q such that Q â l ⧠Q â open (P,P') ⧠Collinear A B Q [Qexists] by fol l_line - SameSide_DEF ABl Collinear_DEF; ¬Collinear B A P' [BAP'ncol] by fol l_line ABl I1 Collinear_DEF P'exists â; â¡ B A P â¡ â¡ B A P' [BAPeqBAP'] by fol - ANGLE angBAP P'exists C5Symmetric; â E. E â l ⧠¬Collinear P Q E ⧠⡠P Q E â¡ â¡ E Q P' [] proof case_split AQ | notAQ by fol -; suppose A = Q; fol ABl AQ BAPncol BAPeqBAP' AngleSymmetry; end; suppose ¬(A = Q); seg A Q â¡ seg A Q ⧠seg A P â¡ seg A P' [APeqAP'] by fol - SEGMENT C2Reflexive BAPncol P'exists C2Symmetric; ¬Collinear Q A P' ⧠¬Collinear Q A P [QAP'ncol] by fol notAQ l_line ABl Qexists P'exists NonCollinearRaa CollinearSymmetry; â¡ Q A P â¡ â¡ Q A P' [] proof case_split QAB | notQAB by fol -; suppose A â open (Q,B); â¡ B A P suppl â¡ P A Q ⧠⡠B A P' suppl â¡ P' A Q [] by fol BAPncol BAP'ncol - B1' SupplementaryAngles_DEF; fol - BAPeqBAP' SupplementsCongAnglesCong AngleSymmetry; end; suppose ¬(A â open (Q,B)); A â open (Q,B) ⧠Q â ray A B â A ⧠ray A Q = ray A B [] by fol - â ABl Qexists IN_Ray notAQ IN_DELETE ABl RayWellDefined; fol - BAPeqBAP' Angle_DEF; end; qed; Q,A,P â Q,A,P' [] by fol QAP'ncol APeqAP' - SAS; fol - TriangleCong_DEF AngleSymmetry ABl QAP'ncol CollinearSymmetry; end; qed; consider E such that E â l ⧠¬Collinear P Q E ⧠⡠P Q E â¡ â¡ E Q P' [Eexists] by fol -; â¡ P Q E suppl â¡ E Q P' ⧠Right (â¡ P Q E) [] by fol - Qexists SupplementaryAngles_DEF RightAngle_DEF; fol Eexists Qexists -; qed; `;; let EuclidPropositionI_14 = theorem `; â A B C D l. Line l ⧠A â l ⧠B â l ⧠¬(A = B) â C â l ⧠D â l ⧠¬(C,D same_side l) â â¡ C B A suppl â¡ A B D â B â open (C,D) proof intro_TAC â A B C D l, l_line, Cnsim_lD, CBAsupplABD; ¬(B = C) ⧠¬(B = D) ⧠¬Collinear C B A [Distinct] by fol l_line Cnsim_lD â I1 Collinear_DEF; consider E such that B â open (C,E) [CBE] by fol Distinct B2'; E â l ⧠¬(C,E same_side l) [Csim_lE] by fol l_line â - BetweenLinear Cnsim_lD SameSide_DEF; D,E same_side l [Dsim_lE] by fol l_line Cnsim_lD - AtMost2Sides; â¡ C B A suppl â¡ A B E [] by fol Distinct CBE SupplementaryAngles_DEF; â¡ A B D â¡ â¡ A B E [] by fol CBAsupplABD - SupplementUnique; ray B E = ray B D [] by fol l_line Csim_lE Cnsim_lD Dsim_lE - C4Uniqueness; D â ray B E â B [] by fol Distinct - EndpointInRay IN_DELETE; fol CBE - OppositeRaysIntersect1pointHelp B1'; qed; `;; (* Euclid's Proposition I.15 *) let VerticalAnglesCong = theorem `; â A B O A' B'. ¬Collinear A O B â O â open (A,A') ⧠O â open (B,B') â â¡ B O A' â¡ â¡ B' O A proof intro_TAC â A B O A' B', H1, H2; â¡ A O B suppl â¡ B O A' [AOBsupplBOA'] by fol H1 H2 SupplementaryAngles_DEF; â¡ B O A suppl â¡ A O B' [] by fol H1 CollinearSymmetry H2 SupplementaryAngles_DEF; fol AOBsupplBOA' - AngleSymmetry SupplementUnique; qed; `;; let EuclidPropositionI_16 = theorem `; â A B C D. ¬Collinear A B C ⧠C â open (B,D) â â¡ B A C <_ang â¡ D C A proof intro_TAC â A B C D, H1 H2; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) [Distinct] by fol H1 NonCollinearImpliesDistinct; consider l such that Line l ⧠A â l ⧠C â l [l_line] by fol Distinct I1; consider m such that Line m ⧠B â m ⧠C â m [m_line] by fol Distinct I1; D â m [Dm] by fol m_line H2 BetweenLinear; consider E such that E â open (A,C) ⧠seg A E â¡ seg E C [AEC] by fol Distinct MidpointExists; ¬(A = E) ⧠¬(E = C) ⧠Collinear A E C ⧠¬(B = E) [AECcol] by fol - B1' H1; E â l [El] by fol l_line AEC BetweenLinear; consider F such that E â open (B,F) ⧠seg E F â¡ seg E B [BEF] by fol AECcol SEGMENT C1OppositeRay; ¬(B = E) ⧠¬(B = F) ⧠¬(E = F) ⧠Collinear B E F [BEF'] by fol BEF B1'; B â l [notBl] by fol l_line Distinct I1 Collinear_DEF H1 â; ¬Collinear A E B ⧠¬Collinear C E B [AEBncol] by fol AECcol l_line El notBl NonCollinearRaa CollinearSymmetry; Angle (â¡ B A E) [angBAE] by fol - CollinearSymmetry ANGLE; ¬Collinear C E F [CEFncol] by fol AEBncol BEF' CollinearSymmetry NoncollinearityExtendsToLine; â¡ B E A â¡ â¡ F E C [BEAeqFEC] by fol AEBncol AEC B1' BEF VerticalAnglesCong; seg E A â¡ seg E C ⧠seg E B â¡ seg E F [] by fol AEC SegmentSymmetry AECcol BEF' SEGMENT BEF C2Symmetric; A,E,B â C,E,F [] by fol AEBncol CEFncol - BEAeqFEC AngleSymmetry SAS; â¡ B A E â¡ â¡ F C E [BAEeqFCE] by fol - TriangleCong_DEF; ¬Collinear E C D [ECDncol] by fol AEBncol H2 B1' CollinearSymmetry NoncollinearityExtendsToLine; F â l ⧠D â l [notFl] by fol l_line El Collinear_DEF CEFncol - â; F â ray B E â B ⧠E â m [] by fol BEF IntervalRayEZ m_line Collinear_DEF AEBncol â; F â m ⧠F,E same_side m [Fsim_mE] by fol m_line - RaySameSide; ¬(B,F same_side l) ⧠¬(B,D same_side l) [] by fol El l_line BEF H2 SameSide_DEF; F,D same_side l [] by fol l_line notBl notFl - AtMost2Sides; F â int_angle E C D [] by fol ECDncol l_line El m_line Dm notFl Fsim_mE - IN_InteriorAngle; â¡ B A E <_ang â¡ E C D [BAElessECD] by fol angBAE ECDncol - BAEeqFCE AngleSymmetry AngleOrdering_DEF; ray A E = ray A C ⧠ray C E = ray C A [] by fol AEC B1' IntervalRay; â¡ B A C <_ang â¡ A C D [] by fol BAElessECD - Angle_DEF; fol - AngleSymmetry; qed; `;; let ExteriorAngle = theorem `; â A B C D. ¬Collinear A B C ⧠C â open (B,D) â â¡ A B C <_ang â¡ A C D proof intro_TAC â A B C D, H1 H2; ¬(C = D) ⧠C â open (D,B) ⧠Collinear B C D [H2'] by fol H2 BetweenLinear B1'; ¬Collinear B A C ⧠¬(A = C) [BACncol] by fol H1 CollinearSymmetry NonCollinearImpliesDistinct; consider E such that C â open (A,E) [ACE] by fol - B2'; ¬(C = E) ⧠C â open (E,A) ⧠Collinear A C E [ACE'] by fol - B1'; ¬Collinear A C D ⧠¬Collinear D C E [DCEncol] by fol H1 CollinearSymmetry H2' - NoncollinearityExtendsToLine; â¡ A B C <_ang â¡ E C B [ABClessECB] by fol BACncol ACE EuclidPropositionI_16; â¡ E C B â¡ â¡ A C D [] by fol DCEncol ACE' H2' VerticalAnglesCong; fol ABClessECB DCEncol ANGLE - AngleTrichotomy2; qed; `;; let EuclidPropositionI_17 = theorem `; â A B C α β γ. ¬Collinear A B C ⧠α = â¡ A B C ⧠β = â¡ B C A â β suppl γ â α <_ang γ proof intro_TAC â A B C α β γ, H1, H2; Angle γ [angγ] by fol H2 SupplementImpliesAngle; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) [Distinct] by fol H1 NonCollinearImpliesDistinct; ¬Collinear B A C ⧠¬Collinear A C B [BACncol] by fol H1 CollinearSymmetry; consider D such that C â open (A,D) [ACD] by fol Distinct B2'; â¡ A B C <_ang â¡ D C B [ABClessDCB] by fol BACncol ACD EuclidPropositionI_16; β suppl â¡ B C D [] by fol - H1 AngleSymmetry BACncol ACD SupplementaryAngles_DEF; â¡ B C D ⡠γ [] by fol H2 - SupplementUnique; fol ABClessDCB H1 AngleSymmetry angγ - AngleTrichotomy2; qed; `;; let EuclidPropositionI_18 = theorem `; â A B C. ¬Collinear A B C ⧠seg A C <__ seg A B â â¡ A B C <_ang â¡ B C A proof intro_TAC â A B C, H1 H2; ¬(A = B) ⧠¬(A = C) [Distinct] by fol H1 NonCollinearImpliesDistinct; consider D such that D â open (A,B) ⧠seg A C â¡ seg A D [ADB] by fol Distinct SEGMENT H2 SegmentOrderingUse; ¬(D = A) ⧠¬(D = B) ⧠D â open (B,A) ⧠Collinear A D B ⧠ray B D = ray B A [ADB'] by fol - B1' IntervalRay; D â int_angle A C B ⧠¬Collinear A C B [DintACB] by fol H1 CollinearSymmetry ADB ConverseCrossbar; ¬Collinear D A C ⧠¬Collinear C B D ⧠¬Collinear C D A [DACncol] by fol H1 CollinearSymmetry ADB' NoncollinearityExtendsToLine; seg A D â¡ seg A C [] by fol ADB' Distinct SEGMENT ADB C2Symmetric; â¡ C D A â¡ â¡ A C D [] by fol DACncol - IsoscelesCongBaseAngles AngleSymmetry; â¡ C D A <_ang â¡ A C B [CDAlessACB] by fol DACncol ANGLE H1 DintACB - AngleOrdering_DEF; â¡ B D C suppl â¡ C D A [] by fol DACncol CollinearSymmetry ADB' SupplementaryAngles_DEF; â¡ C B D <_ang â¡ C D A [] by fol DACncol - EuclidPropositionI_17; â¡ C B D <_ang â¡ A C B [] by fol - CDAlessACB AngleOrderTransitivity; fol - ADB' Angle_DEF AngleSymmetry; qed; `;; let EuclidPropositionI_19 = theorem `; â A B C. ¬Collinear A B C ⧠⡠A B C <_ang â¡ B C A â seg A C <__ seg A B proof intro_TAC â A B C, H1 H2; ¬Collinear B A C ⧠¬Collinear B C A ⧠¬Collinear A C B [BACncol] by fol H1 CollinearSymmetry; ¬(A = B) ⧠¬(A = C) [Distinct] by fol H1 NonCollinearImpliesDistinct; raa ¬(seg A C <__ seg A B) [Con] by fol -; seg A B â¡ seg A C ⨠seg A B <__ seg A C [] by fol Distinct SEGMENT - SegmentTrichotomy; case_split cong | less by fol -; suppose seg A B â¡ seg A C; â¡ C B A â¡ â¡ B C A [] by fol BACncol - IsoscelesCongBaseAngles; fol - AngleSymmetry H2 AngleTrichotomy1; end; suppose seg A B <__ seg A C; â¡ A C B <_ang â¡ C B A [] by fol BACncol - EuclidPropositionI_18; fol H1 BACncol ANGLE - AngleSymmetry H2 AngleTrichotomy; end; qed; `;; let EuclidPropositionI_20 = theorem `; â A B C D. ¬Collinear A B C â A â open (B,D) ⧠seg A D â¡ seg A C â seg B C <__ seg B D proof intro_TAC â A B C D, H1, H2; ¬(B = D) ⧠¬(A = D) ⧠A â open (D,B) ⧠Collinear B A D ⧠ray D A = ray D B [BAD'] by fol H2 B1' IntervalRay; ¬Collinear C A D [CADncol] by fol H1 CollinearSymmetry BAD' NoncollinearityExtendsToLine; ¬Collinear D C B ⧠¬Collinear B D C [DCBncol] by fol H1 CollinearSymmetry BAD' NoncollinearityExtendsToLine; Angle (â¡ C D A) [angCDA] by fol CADncol CollinearSymmetry ANGLE; â¡ C D A â¡ â¡ D C A [CDAeqDCA] by fol CADncol CollinearSymmetry H2 IsoscelesCongBaseAngles; A â int_angle D C B [] by fol DCBncol BAD' ConverseCrossbar; â¡ C D A <_ang â¡ D C B [] by fol angCDA DCBncol - CDAeqDCA AngleOrdering_DEF; â¡ B D C <_ang â¡ D C B [] by fol - BAD' Angle_DEF AngleSymmetry; fol DCBncol - EuclidPropositionI_19; qed; `;; let EuclidPropositionI_21 = theorem `; â A B C D. ¬Collinear A B C ⧠D â int_triangle A B C â â¡ A B C <_ang â¡ C D A proof intro_TAC â A B C D, H1 H2; ¬(B = A) ⧠¬(B = C) ⧠¬(A = C) [Distinct] by fol H1 NonCollinearImpliesDistinct; D â int_angle B A C ⧠D â int_angle C B A [DintTri] by fol H2 IN_InteriorTriangle InteriorAngleSymmetry; consider E such that E â open (B,C) ⧠E â ray A D â A [BEC] by fol - Crossbar_THM; ¬(B = E) ⧠¬(E = C) ⧠Collinear B E C ⧠Collinear A D E [BEC'] by fol - B1' IN_DELETE IN_Ray; ray B E = ray B C ⧠E â ray B C â B [rBErBC] by fol BEC IntervalRay IntervalRayEZ; D â int_angle A B E [DintABE] by fol DintTri - InteriorAngleSymmetry InteriorWellDefined; D â open (A,E) [ADE] by fol BEC' - AlternateConverseCrossbar; ray E D = ray E A [rEDrEA] by fol - B1' IntervalRay; ¬Collinear A B E ⧠¬Collinear B E A ⧠¬Collinear C B D ⧠¬(A = D) [ABEncol] by fol DintABE IN_InteriorAngle CollinearSymmetry DintTri InteriorEZHelp; ¬Collinear E D C ⧠¬Collinear C E D [EDCncol] by fol - CollinearSymmetry BEC' NoncollinearityExtendsToLine; â¡ A B E <_ang â¡ A E C ⧠⡠C E D = â¡ D E C [] by fol ABEncol BEC ExteriorAngle AngleSymmetry; â¡ A B C <_ang â¡ C E D [ABClessAEC] by fol - rBErBC rEDrEA Angle_DEF; â¡ C E D <_ang â¡ C D A [] by fol EDCncol ADE B1' ExteriorAngle; fol ABClessAEC - AngleOrderTransitivity; qed; `;; let AngleTrichotomy3 = theorem `; â α β γ. α <_ang β ⧠Angle γ ⧠γ ⡠α â γ <_ang β proof intro_TAC â α β γ, H1; consider A O B G such that Angle α ⧠¬Collinear A O B ⧠β = â¡ A O B ⧠G â int_angle A O B ⧠α â¡ â¡ A O G [H1'] by fol H1 AngleOrdering_DEF; ¬Collinear A O G [] by fol - InteriorEZHelp; γ â¡ â¡ A O G [] by fol H1 H1' - ANGLE C5Transitive; fol H1 H1' - AngleOrdering_DEF; qed; `;; let InteriorCircleConvexHelp = theorem `; â O A B C. ¬Collinear A O C â B â open (A,C) â seg O A <__ seg O C ⨠seg O A â¡ seg O C â seg O B <__ seg O C proof intro_TAC â O A B C, H1, H2, H3; ¬Collinear O C A ⧠¬Collinear C O A ⧠¬(O = A) ⧠¬(O = C) [H1'] by fol H1 CollinearSymmetry NonCollinearImpliesDistinct; ray A B = ray A C ⧠ray C B = ray C A [equal_rays] by fol H2 IntervalRay B1'; â¡ O C A <_ang â¡ C A O ⨠⡠O C A â¡ â¡ C A O [] proof case_split seg_less | seg_eq by fol H3; suppose seg O A <__ seg O C; fol H1' - EuclidPropositionI_18; end; suppose seg O A â¡ seg O C; seg O C â¡ seg O A [] by fol H1' SEGMENT - C2Symmetric; fol H1' - IsoscelesCongBaseAngles AngleSymmetry; end; qed; â¡ O C B <_ang â¡ B A O ⨠⡠O C B â¡ â¡ B A O [] by fol - equal_rays Angle_DEF; â¡ B C O <_ang â¡ O A B ⨠⡠B C O â¡ â¡ O A B [BCOlessOAB] by fol - AngleSymmetry; ¬Collinear O A B ⧠¬Collinear B C O ⧠¬Collinear O C B [OABncol] by fol H1 CollinearSymmetry H2 B1' NoncollinearityExtendsToLine; â¡ O A B <_ang â¡ O B C [] by fol - H2 ExteriorAngle; â¡ B C O <_ang â¡ O B C [] by fol BCOlessOAB - AngleOrderTransitivity OABncol ANGLE - AngleTrichotomy3; fol OABncol - AngleSymmetry EuclidPropositionI_19; qed; `;; let InteriorCircleConvex = theorem `; â O R A B C. ¬(O = R) â B â open (A,C) â A â int_circle O R ⧠C â int_circle O R â B â int_circle O R proof intro_TAC â O R A B C, H1, H2, H3; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠B â open (C,A) [H2'] by fol H2 B1'; (A = O ⨠seg O A <__ seg O R) ⧠(C = O ⨠seg O C <__ seg O R) [ACintOR] by fol H3 H1 IN_InteriorCircle; case_split OAC | OnotAC by fol -; suppose O = A ⨠O = C; B â open (O,C) ⨠B â open (O,A) [] by fol - H2 B1'; seg O B <__ seg O A ⧠¬(O = A) ⨠seg O B <__ seg O C ⧠¬(O = C) [] by fol - B1' SEGMENT C2Reflexive SegmentOrdering_DEF; seg O B <__ seg O R [] by fol - ACintOR SegmentOrderTransitivity; fol - H1 IN_InteriorCircle; end; suppose ¬(O = A) ⧠¬(O = C); case_split AOCncol | AOCcol by fol -; suppose ¬Collinear A O C; seg O A <__ seg O C ⨠seg O A â¡ seg O C ⨠seg O C <__ seg O A [] by fol OnotAC SEGMENT SegmentTrichotomy; seg O B <__ seg O C ⨠seg O B <__ seg O A [] by fol AOCncol H2 - InteriorCircleConvexHelp CollinearSymmetry B1'; fol OnotAC ACintOR - SegmentOrderTransitivity H1 IN_InteriorCircle; end; suppose Collinear A O C; consider l such that Line l ⧠A â l ⧠C â l [l_line] by fol H2' I1; Collinear B A O ⧠Collinear B C O [OABCcol] by fol - H2 BetweenLinear H2' AOCcol CollinearLinear Collinear_DEF; B â open (O,A) ⧠B â open (O,C) â B = O [] proof intro_TAC Assumption; O â ray B A â© ray B C [] by fol H2' OABCcol - IN_Ray IN_INTER; fol - H2 OppositeRaysIntersect1point IN_SING; qed; B â open (O,A) ⨠B â open (O,C) ⨠B = O [] by fol - â; seg O B <__ seg O A ⨠seg O B <__ seg O C ⨠B = O [] by fol - B1' SEGMENT C2Reflexive SegmentOrdering_DEF; seg O B <__ seg O R ⨠B = O [] by fol - ACintOR OnotAC SegmentOrderTransitivity; fol - H1 IN_InteriorCircle; end; end; qed; `;; let SegmentTrichotomy3 = theorem `; â s t u. s <__ t ⧠Segment u ⧠u â¡ s â u <__ t proof intro_TAC â s t u, H1; consider C D X such that Segment s ⧠t = seg C D ⧠X â open (C,D) ⧠s â¡ seg C X ⧠¬(C = X) [H1'] by fol H1 SegmentOrdering_DEF B1'; u â¡ seg C X [] by fol H1 - SEGMENT C2Transitive; fol H1 H1' - SegmentOrdering_DEF; qed; `;; let EuclidPropositionI_24Help = theorem `; â O A C O' D M. ¬Collinear A O C ⧠¬Collinear D O' M â seg O' D â¡ seg O A ⧠seg O' M â¡ seg O C â â¡ D O' M <_ang â¡ A O C â seg O A <__ seg O C ⨠seg O A â¡ seg O C â seg D M <__ seg A C proof intro_TAC â O A C O' D M, H1, H2, H3, H4; consider K such that K â int_angle A O C ⧠⡠D O' M â¡ â¡ A O K [KintAOC] by fol H1 ANGLE H3 AngleOrderingUse; ¬(O = C) ⧠¬(D = M) ⧠¬(O' = M) ⧠¬(O = K) [Distinct] by fol H1 NonCollinearImpliesDistinct - InteriorEZHelp; consider B such that B â ray O K â O ⧠seg O B â¡ seg O C [BrOK] by fol Distinct SEGMENT - C1; ray O B = ray O K [] by fol Distinct - RayWellDefined; â¡ D O' M â¡ â¡ A O B [DO'MeqAOB] by fol KintAOC - Angle_DEF; B â int_angle A O C [BintAOC] by fol KintAOC BrOK WholeRayInterior; ¬(B = O) ⧠¬Collinear A O B [AOBncol] by fol - InteriorEZHelp; seg O C â¡ seg O B [OCeqOB] by fol Distinct - SEGMENT BrOK C2Symmetric; seg O' M â¡ seg O B [] by fol Distinct SEGMENT AOBncol H2 - C2Transitive; D,O',M â A,O,B [] by fol H1 AOBncol H2 - DO'MeqAOB SAS; seg D M â¡ seg A B [DMeqAB] by fol - TriangleCong_DEF; consider G such that G â open (A,C) ⧠G â ray O B â O ⧠¬(G = O) [AGC] by fol BintAOC Crossbar_THM B1' IN_DELETE; Segment (seg O G) ⧠¬(O = B) [notOB] by fol AGC SEGMENT BrOK IN_DELETE; seg O G <__ seg O C [] by fol H1 AGC H4 InteriorCircleConvexHelp; seg O G <__ seg O B [] by fol - OCeqOB BrOK IN_DELETE SEGMENT SegmentTrichotomy2; consider G' such that G' â open (O,B) ⧠seg O G â¡ seg O G' [OG'B] by fol notOB - SegmentOrderingUse; ¬(G' = O) ⧠seg O G' â¡ seg O G' ⧠Segment (seg O G') [notG'O] by fol - B1' SEGMENT C2Reflexive SEGMENT; G' â ray O B â O [] by fol OG'B IntervalRayEZ; G' = G ⧠G â open (B,O) [] by fol notG'O notOB - AGC OG'B C1 B1'; ConvexQuadrilateral B A O C [] by fol H1 - AGC DiagonalsIntersectImpliesConvexQuad; A â int_angle O C B ⧠O â int_angle C B A ⧠Quadrilateral B A O C [OintCBA] by fol - ConvexQuad_DEF; A â int_angle B C O [AintBCO] by fol - InteriorAngleSymmetry; Tetralateral B A O C [] by fol OintCBA Quadrilateral_DEF; ¬Collinear C B A ⧠¬Collinear B C O ⧠¬Collinear C O B ⧠¬Collinear C B O [BCOncol] by fol - Tetralateral_DEF CollinearSymmetry; â¡ B C O â¡ â¡ C B O [BCOeqCBO] by fol - OCeqOB IsoscelesCongBaseAngles; ¬Collinear B C A ⧠¬Collinear A C B [ACBncol] by fol AintBCO InteriorEZHelp CollinearSymmetry; â¡ B C A â¡ â¡ B C A ⧠Angle (â¡ B C A) ⧠⡠C B O â¡ â¡ C B O [CBOref] by fol - ANGLE BCOncol C5Reflexive; â¡ B C A <_ang â¡ B C O [] by fol - BCOncol ANGLE AintBCO AngleOrdering_DEF; â¡ B C A <_ang â¡ C B O [BCAlessCBO] by fol - BCOncol ANGLE BCOeqCBO AngleTrichotomy2; â¡ C B O <_ang â¡ C B A [] by fol BCOncol ANGLE OintCBA CBOref AngleOrdering_DEF; â¡ A C B <_ang â¡ C B A [] by fol BCAlessCBO - AngleOrderTransitivity AngleSymmetry; seg A B <__ seg A C [] by fol ACBncol - EuclidPropositionI_19; fol - Distinct SEGMENT DMeqAB SegmentTrichotomy3; qed; `;; let EuclidPropositionI_24 = theorem `; â O A C O' D M. ¬Collinear A O C ⧠¬Collinear D O' M â seg O' D â¡ seg O A ⧠seg O' M â¡ seg O C â â¡ D O' M <_ang â¡ A O C â seg D M <__ seg A C proof intro_TAC â O A C O' D M, H1, H2, H3; ¬(O = A) ⧠¬(O = C) ⧠¬Collinear C O A ⧠¬Collinear M O' D [Distinct] by fol H1 NonCollinearImpliesDistinct CollinearSymmetry; seg O A â¡ seg O C ⨠seg O A <__ seg O C ⨠seg O C <__ seg O A [] by fol - SEGMENT SegmentTrichotomy; case_split Case1 | H4 by fol -; suppose seg O A <__ seg O C ⨠seg O A â¡ seg O C; fol H1 H2 H3 - EuclidPropositionI_24Help; end; suppose seg O C <__ seg O A; â¡ M O' D <_ang â¡ C O A [] by fol H3 AngleSymmetry; fol Distinct H3 AngleSymmetry H2 H4 EuclidPropositionI_24Help SegmentSymmetry; end; qed; `;; let EuclidPropositionI_25 = theorem `; â O A C O' D M. ¬Collinear A O C ⧠¬Collinear D O' M â seg O' D â¡ seg O A ⧠seg O' M â¡ seg O C â seg D M <__ seg A C â â¡ D O' M <_ang â¡ A O C proof intro_TAC â O A C O' D M, H1, H2, H3; ¬(O = A) ⧠¬(O = C) ⧠¬(A = C) ⧠¬(D = M) ⧠¬(O' = D) ⧠¬(O' = M) [Distinct] by fol H1 NonCollinearImpliesDistinct; raa ¬(â¡ D O' M <_ang â¡ A O C) [Contradiction] by fol -; â¡ D O' M â¡ â¡ A O C ⨠⡠A O C <_ang â¡ D O' M [] by fol H1 ANGLE - AngleTrichotomy; case_split Cong | Con by fol -; suppose â¡ D O' M â¡ â¡ A O C; D,O',M â A,O,C [] by fol H1 H2 - SAS; seg D M â¡ seg A C [] by fol - TriangleCong_DEF; fol Distinct SEGMENT - H3 SegmentTrichotomy; end; suppose â¡ A O C <_ang â¡ D O' M; seg O A â¡ seg O' D ⧠seg O C â¡ seg O' M [H2'] by fol Distinct SEGMENT H2 C2Symmetric; seg A C <__ seg D M [] by fol H1 - Con EuclidPropositionI_24; fol Distinct SEGMENT - H3 SegmentTrichotomy; end; qed; `;; let AAS = theorem `; â A B C A' B' C'. ¬Collinear A B C ⧠¬Collinear A' B' C' â â¡ A B C â¡ â¡ A' B' C' ⧠⡠B C A â¡ â¡ B' C' A' â seg A B â¡ seg A' B' â A,B,C â A',B',C' proof intro_TAC â A B C A' B' C', H1, H2, H3; ¬(A = B) ⧠¬(B = C) ⧠¬(B' = C') [Distinct] by fol H1 NonCollinearImpliesDistinct; consider G such that G â ray B C â B ⧠seg B G â¡ seg B' C' [Gexists] by fol Distinct SEGMENT C1; ¬(G = B) ⧠B â open (G,C) ⧠Collinear G B C [notGBC] by fol - IN_DELETE IN_Ray CollinearSymmetry; ¬Collinear A B G ⧠¬Collinear B G A [ABGncol] by fol H1 notGBC CollinearSymmetry NoncollinearityExtendsToLine; ray B G = ray B C [] by fol Distinct Gexists RayWellDefined; â¡ A B G = â¡ A B C [] by fol Distinct - Angle_DEF; A,B,G â A',B',C' [ABGâ A'B'C'] by fol H1 ABGncol H3 SegmentSymmetry H2 - Gexists SAS; â¡ B G A â¡ â¡ B' C' A' [BGAeqB'C'A'] by fol - TriangleCong_DEF; ¬Collinear B C A ⧠¬Collinear B' C' A' [BCAncol] by fol H1 CollinearSymmetry; â¡ B' C' A' â¡ â¡ B C A ⧠⡠B C A â¡ â¡ B C A [BCArefl] by fol - ANGLE H2 C5Symmetric C5Reflexive; â¡ B G A â¡ â¡ B C A [BGAeqBCA] by fol ABGncol BCAncol ANGLE BGAeqB'C'A' - C5Transitive; case_split GC | notGC by fol -; suppose G = C; fol - ABGâ A'B'C'; end; suppose ¬(G = C); ¬Collinear A C G ⧠¬Collinear A G C [ACGncol] by fol H1 notGBC - CollinearSymmetry NoncollinearityExtendsToLine; C â open (B,G) ⨠G â open (C,B) [] by fol notGBC notGC Distinct B3' â; case_split BCG | CGB by fol -; suppose C â open (B,G) ; C â open (G,B) ⧠ray G C = ray G B [rGCrBG] by fol - B1' IntervalRay; â¡ A G C <_ang â¡ A C B [] by fol ACGncol - ExteriorAngle; â¡ B G A <_ang â¡ B C A [] by fol - rGCrBG Angle_DEF AngleSymmetry AngleSymmetry; fol ABGncol BCAncol ANGLE - AngleSymmetry BGAeqBCA AngleTrichotomy; end; suppose G â open (C,B); ray C G = ray C B ⧠⡠A C G <_ang â¡ A G B [] by fol - IntervalRay ACGncol ExteriorAngle; â¡ A C B <_ang â¡ B G A [] by fol - Angle_DEF AngleSymmetry; â¡ B C A <_ang â¡ B C A [] by fol - BCAncol ANGLE BGAeqBCA AngleTrichotomy2 AngleSymmetry; fol - BCArefl AngleTrichotomy1; end; end; qed; `;; let ParallelSymmetry = theorem `; â l k: point_set. l ⥠k â k ⥠l proof fol PARALLEL INTER_COMM; qed; `;; let AlternateInteriorAngles = theorem `; â A B C E l m t. Line l ⧠A â l ⧠E â l â Line m ⧠B â m ⧠C â m â Line t ⧠A â t ⧠B â t â ¬(A = E) ⧠¬(B = C) ⧠¬(A = B) ⧠E â t ⧠C â t â ¬(C,E same_side t) â â¡ E A B â¡ â¡ C B A â l ⥠m proof intro_TAC â A B C E l m t, l_line, m_line, t_line, Distinct, Cnsim_tE, AltIntAngCong; ¬Collinear E A B ⧠¬Collinear C B A [EABncol] by fol t_line Distinct NonCollinearRaa CollinearSymmetry; B â l ⧠A â m [notAmBl] by fol l_line m_line Collinear_DEF - â; raa ¬(l ⥠m) [Con] by fol -; ¬(l â© m = â ) [] by fol - l_line m_line PARALLEL; consider G such that G â l ⧠G â m [Glm] by fol - MEMBER_NOT_EMPTY IN_INTER; ¬(G = A) ⧠¬(G = B) ⧠Collinear B G C ⧠Collinear B C G ⧠Collinear A E G ⧠Collinear A G E [GnotAB] by fol - notAmBl â m_line l_line Collinear_DEF; ¬Collinear A G B ⧠¬Collinear B G A ⧠G â t [AGBncol] by fol EABncol CollinearSymmetry - NoncollinearityExtendsToLine t_line Collinear_DEF â; ¬(E,C same_side t) [Ensim_tC] by fol t_line - Distinct Cnsim_tE SameSideSymmetric; E â l â A ⧠G â l â A [] by fol l_line Glm Distinct GnotAB IN_DELETE; ¬(G,E same_side t) [] proof raa G,E same_side t [Gsim_tE] by fol -; A â open (G,E) [notGAE] by fol t_line - SameSide_DEF â; G â ray A E â A [] by fol Distinct GnotAB notGAE IN_Ray GnotAB IN_DELETE; ray A G = ray A E [rAGrAE] by fol Distinct - RayWellDefined; ¬(C,G same_side t) [Cnsim_tG] by fol t_line AGBncol Distinct Gsim_tE Cnsim_tE SameSideTransitive; C â ray B G [notCrBG] proof raa C â ray B G [CrBG] by fol - â; fol - IN_Ray Distinct IN_DELETE t_line AGBncol RaySameSide Cnsim_tG; qed; B â open (C,G) [] by fol - GnotAB â IN_Ray; â¡ G A B <_ang â¡ C B A [] by fol AGBncol notCrBG - B1' EuclidPropositionI_16; â¡ E A B <_ang â¡ C B A [] by fol - rAGrAE Angle_DEF; fol EABncol ANGLE AltIntAngCong - AngleTrichotomy1; qed; G,C same_side t [Gsim_tC] by fol t_line AGBncol Distinct - Cnsim_tE AtMost2Sides; B â open (G,C) [notGBC] by fol t_line - SameSide_DEF â; G â ray B C â B [] by fol Distinct GnotAB notGBC IN_Ray GnotAB IN_DELETE; ray B G = ray B C [rBGrBC] by fol Distinct - RayWellDefined; â¡ C B A â¡ â¡ E A B [flipAltIntAngCong] by fol EABncol ANGLE AltIntAngCong C5Symmetric; ¬(E,G same_side t) [Ensim_tG] by fol t_line AGBncol Distinct Gsim_tC Ensim_tC SameSideTransitive; E â ray A G [notErAG] proof raa E â ray A G [ErAG] by fol - â; fol - IN_Ray Distinct IN_DELETE t_line AGBncol RaySameSide Ensim_tG; qed; A â open (E,G) [] by fol - GnotAB â IN_Ray; â¡ G B A <_ang â¡ E A B [] by fol AGBncol notErAG - B1' EuclidPropositionI_16; â¡ C B A <_ang â¡ E A B [] by fol - rBGrBC Angle_DEF; fol EABncol ANGLE flipAltIntAngCong - AngleTrichotomy1; qed; `;; let EuclidPropositionI_28 = theorem `; â A B C D E F G H l m t. Line l ⧠A â l ⧠B â l ⧠G â l â Line m ⧠C â m ⧠D â m ⧠H â m â Line t ⧠G â t ⧠H â t â G â m ⧠H â l â G â open (A,B) ⧠H â open (C,D) â G â open (E,H) ⧠H â open (F,G) â ¬(D,A same_side t) â â¡ E G B â¡ â¡ G H D ⨠⡠B G H suppl â¡ G H D â l ⥠m proof intro_TAC â A B C D E F G H l m t, l_line, m_line, t_line, notGmHl, H1, H2, H3, H4; ¬(A = G) ⧠¬(G = B) ⧠¬(H = D) ⧠¬(E = G) ⧠¬(G = H) ⧠Collinear A G B ⧠Collinear E G H [Distinct] by fol H1 H2 B1'; ¬Collinear H G A ⧠¬Collinear G H D ⧠A â t ⧠D â t [HGAncol] by fol Distinct l_line m_line notGmHl NonCollinearRaa CollinearSymmetry Collinear_DEF t_line â; ¬Collinear B G H ⧠¬Collinear A G E ⧠¬Collinear E G B [BGHncol] by fol - Distinct CollinearSymmetry NoncollinearityExtendsToLine; â¡ A G H â¡ â¡ D H G [] proof case_split EGBeqGHD | BGHeqGHD by fol H4; suppose â¡ E G B â¡ â¡ G H D; â¡ E G B â¡ â¡ H G A ⧠Angle (â¡ E G B) ⧠Angle (â¡ H G A) ⧠Angle (â¡ G H D) [boo] by fol BGHncol H1 H2 VerticalAnglesCong HGAncol ANGLE; â¡ H G A â¡ â¡ E G B [] by fol - C5Symmetric; â¡ H G A â¡ â¡ G H D [] by fol boo - EGBeqGHD C5Transitive; fol - AngleSymmetry; end; suppose â¡ B G H suppl â¡ G H D; â¡ B G H suppl â¡ H G A [] by fol BGHncol H1 B1' SupplementaryAngles_DEF; fol - BGHeqGHD AngleSymmetry SupplementUnique AngleSymmetry; end; qed; fol l_line m_line t_line Distinct HGAncol H3 - AlternateInteriorAngles; qed; `;; let OppositeSidesCongImpliesParallelogram = theorem `; â A B C D. Quadrilateral A B C D â seg A B â¡ seg C D ⧠seg B C â¡ seg D A â Parallelogram A B C D proof intro_TAC â A B C D, H1, H2; ¬(A = B) ⧠¬(A = C) ⧠¬(A = D) ⧠¬(B = C) ⧠¬(B = D) ⧠¬(C = D) ⧠¬Collinear A B C ⧠¬Collinear B C D ⧠¬Collinear C D A ⧠¬Collinear D A B [TetraABCD] by fol H1 Quadrilateral_DEF Tetralateral_DEF; consider a c such that Line a ⧠A â a ⧠B â a ⧠Line c ⧠C â c ⧠D â c [ac_line] by fol TetraABCD I1; consider b d such that Line b ⧠B â b ⧠C â b ⧠Line d ⧠D â d ⧠A â d [bd_line] by fol TetraABCD I1; consider l such that Line l ⧠A â l ⧠C â l [l_line] by fol TetraABCD I1; consider m such that Line m ⧠B â m ⧠D â m [m_line] by fol TetraABCD I1; B â l ⧠D â l ⧠A â m ⧠C â m [notBDlACm] by fol l_line m_line TetraABCD Collinear_DEF â; seg A C â¡ seg C A ⧠seg B D â¡ seg D B [seg_refl] by fol TetraABCD SEGMENT C2Reflexive SegmentSymmetry; A,B,C â C,D,A [] by fol TetraABCD H2 - SSS; â¡ B C A â¡ â¡ D A C ⧠⡠C A B â¡ â¡ A C D [BCAeqDAC] by fol - TriangleCong_DEF; seg C D â¡ seg A B [CDeqAB] by fol TetraABCD SEGMENT H2 C2Symmetric; B,C,D â D,A,B [] by fol TetraABCD H2 - seg_refl SSS; â¡ C D B â¡ â¡ A B D ⧠⡠D B C â¡ â¡ B D A ⧠⡠C B D â¡ â¡ A D B [CDBeqABD] by fol - TriangleCong_DEF AngleSymmetry; ¬(B,D same_side l) ⨠¬(A,C same_side m) [] by fol H1 l_line m_line FiveChoicesQuadrilateral; case_split Case1 | Ansim_mC by fol -; suppose ¬(B,D same_side l); ¬(D,B same_side l) [] by fol l_line notBDlACm - SameSideSymmetric; a ⥠c ⧠b ⥠d [] by fol ac_line l_line TetraABCD notBDlACm - BCAeqDAC AngleSymmetry AlternateInteriorAngles bd_line BCAeqDAC; fol H1 ac_line bd_line - Parallelogram_DEF; end; suppose ¬(A,C same_side m); b ⥠d [bâ¥d] by fol bd_line m_line TetraABCD notBDlACm - CDBeqABD AlternateInteriorAngles; c ⥠a [] by fol ac_line m_line TetraABCD notBDlACm Ansim_mC CDBeqABD AlternateInteriorAngles; fol H1 ac_line bd_line bâ¥d - ParallelSymmetry Parallelogram_DEF; end; qed; `;; let OppositeAnglesCongImpliesParallelogramHelp = theorem `; â A B C D a c. Quadrilateral A B C D â â¡ A B C â¡ â¡ C D A ⧠⡠D A B â¡ â¡ B C D â Line a ⧠A â a ⧠B â a â Line c ⧠C â c ⧠D â c â a ⥠c proof intro_TAC â A B C D a c, H1, H2, a_line, c_line; ¬(A = B) ⧠¬(A = C) ⧠¬(A = D) ⧠¬(B = C) ⧠¬(B = D) ⧠¬(C = D) ⧠¬Collinear A B C ⧠¬Collinear B C D ⧠¬Collinear C D A ⧠¬Collinear D A B [TetraABCD] by fol H1 Quadrilateral_DEF Tetralateral_DEF; â¡ C D A â¡ â¡ A B C ⧠⡠B C D â¡ â¡ D A B [H2'] by fol TetraABCD ANGLE H2 C5Symmetric; consider l m such that Line l ⧠A â l ⧠C â l ⧠Line m ⧠B â m ⧠D â m [lm_line] by fol TetraABCD I1; consider b d such that Line b ⧠B â b ⧠C â b ⧠Line d ⧠D â d ⧠A â d [bd_line] by fol TetraABCD I1; A â c ⧠B â c ⧠A â b ⧠D â b ⧠B â d ⧠C â d [point_off_line] by fol c_line bd_line Collinear_DEF TetraABCD â; ¬(A â int_triangle B C D ⨠B â int_triangle C D A ⨠C â int_triangle D A B ⨠D â int_triangle A B C) [] proof raa A â int_triangle B C D ⨠B â int_triangle C D A ⨠C â int_triangle D A B ⨠D â int_triangle A B C [Con] by fol -; â¡ B C D <_ang â¡ D A B ⨠⡠C D A <_ang â¡ A B C ⨠⡠D A B <_ang â¡ B C D ⨠⡠A B C <_ang â¡ C D A [] by fol TetraABCD - EuclidPropositionI_21; fol - H2' H2 AngleTrichotomy1; qed; ConvexQuadrilateral A B C D [] by fol H1 lm_line - FiveChoicesQuadrilateral; A â int_angle B C D ⧠B â int_angle C D A ⧠C â int_angle D A B ⧠D â int_angle A B C [AintBCD] by fol - ConvexQuad_DEF; B,A same_side c ⧠B,C same_side d [Bsim_cA] by fol c_line bd_line - InteriorUse; A,D same_side b [Asim_bD] by fol bd_line c_line AintBCD InteriorUse; raa ¬(a ⥠c) [Con] by fol -; consider G such that G â a ⧠G â c [Gac] by fol - a_line c_line PARALLEL MEMBER_NOT_EMPTY IN_INTER; Collinear A B G ⧠Collinear D G C ⧠Collinear C G D [ABGcol] by fol a_line - Collinear_DEF c_line; ¬(G = A) ⧠¬(G = B) ⧠¬(G = C) ⧠¬(G = D) [GnotABCD] by fol Gac ABGcol TetraABCD CollinearSymmetry Collinear_DEF; ¬Collinear B G C ⧠¬Collinear A D G [BGCncol] by fol c_line Gac GnotABCD point_off_line NonCollinearRaa CollinearSymmetry; ¬Collinear B C G ⧠¬Collinear G B C ⧠¬Collinear G A D ⧠¬Collinear A G D [BCGncol] by fol - CollinearSymmetry; G â b ⧠G â d [notGb] by fol bd_line Collinear_DEF BGCncol â; G â open (B,A) [notBGA] by fol Bsim_cA Gac SameSide_DEF â; B â open (A,G) [notABG] proof raa ¬(B â open (A,G)) [Con] by fol -; B â open (A,G) [ABG] by fol - â; ray A B = ray A G [rABrAG] by fol - IntervalRay; ¬(A,G same_side b) [] by fol bd_line ABG SameSide_DEF; ¬(D,G same_side b) [] by fol bd_line point_off_line notGb Asim_bD - SameSideTransitive; D â ray C G [] by fol bd_line notGb - RaySameSide TetraABCD IN_DELETE â; C â open (D,G) [DCG] by fol GnotABCD ABGcol - IN_Ray â; consider M such that D â open (C,M) [CDM] by fol TetraABCD B2'; D â open (G,M) [GDM] by fol - B1' DCG TransitivityBetweennessHelp; â¡ C D A suppl â¡ A D M ⧠⡠A B C suppl â¡ C B G [] by fol TetraABCD CDM ABG SupplementaryAngles_DEF; â¡ M D A â¡ â¡ G B C [MDAeqGBC] by fol - H2' SupplementsCongAnglesCong AngleSymmetry; â¡ G A D <_ang â¡ M D A ⧠⡠G B C <_ang â¡ D C B [] by fol BCGncol BGCncol GDM DCG B1' EuclidPropositionI_16; â¡ G A D <_ang â¡ D C B [] by fol - BCGncol ANGLE MDAeqGBC AngleTrichotomy2 AngleOrderTransitivity; â¡ D A B <_ang â¡ B C D [] by fol - rABrAG Angle_DEF AngleSymmetry; fol - H2 AngleTrichotomy1; qed; A â open (G,B) [] proof raa ¬(A â open (G,B)) [Con] by fol -; A â open (B,G) [BAG] by fol - B1' â; ray B A = ray B G [rBArBG] by fol - IntervalRay; ¬(B,G same_side d) [] by fol bd_line BAG SameSide_DEF; ¬(C,G same_side d) [] by fol bd_line point_off_line notGb Bsim_cA - SameSideTransitive; C â ray D G [] by fol bd_line notGb - RaySameSide TetraABCD IN_DELETE â; D â open (C,G) [CDG] by fol GnotABCD ABGcol - IN_Ray â; consider M such that C â open (D,M) [DCM] by fol B2' TetraABCD; C â open (G,M) [GCM] by fol - B1' CDG TransitivityBetweennessHelp; â¡ B C D suppl â¡ M C B ⧠⡠D A B suppl â¡ G A D [] by fol TetraABCD CollinearSymmetry DCM BAG SupplementaryAngles_DEF AngleSymmetry; â¡ M C B â¡ â¡ G A D [GADeqMCB] by fol - H2' SupplementsCongAnglesCong; â¡ G B C <_ang â¡ M C B ⧠⡠G A D <_ang â¡ C D A [] by fol BGCncol GCM BCGncol CDG B1' EuclidPropositionI_16; â¡ G B C <_ang â¡ C D A [] by fol - BCGncol ANGLE GADeqMCB AngleTrichotomy2 AngleOrderTransitivity; â¡ A B C <_ang â¡ C D A [] by fol - rBArBG Angle_DEF; fol - H2 AngleTrichotomy1; qed; fol TetraABCD GnotABCD ABGcol notABG notBGA - B3' â; qed; `;; let OppositeAnglesCongImpliesParallelogram = theorem `; â A B C D. Quadrilateral A B C D â â¡ A B C â¡ â¡ C D A ⧠⡠D A B â¡ â¡ B C D â Parallelogram A B C D proof intro_TAC â A B C D, H1, H2; Quadrilateral B C D A [QuadBCDA] by fol H1 QuadrilateralSymmetry; ¬(A = B) ⧠¬(B = C) ⧠¬(C = D) ⧠¬(D = A) ⧠¬Collinear B C D ⧠¬Collinear D A B [TetraABCD] by fol H1 Quadrilateral_DEF Tetralateral_DEF; â¡ B C D â¡ â¡ D A B [H2'] by fol TetraABCD ANGLE H2 C5Symmetric; consider a such that Line a ⧠A â a ⧠B â a [a_line] by fol TetraABCD I1; consider b such that Line b ⧠B â b ⧠C â b [b_line] by fol TetraABCD I1; consider c such that Line c ⧠C â c ⧠D â c [c_line] by fol TetraABCD I1; consider d such that Line d ⧠D â d ⧠A â d [d_line] by fol TetraABCD I1; fol H1 QuadBCDA H2 H2' a_line b_line c_line d_line OppositeAnglesCongImpliesParallelogramHelp Parallelogram_DEF; qed; `;; let P = NewAxiom `;â P l. Line l ⧠P â l â â! m. Line m ⧠P â m ⧠m ⥠l`;; NewConstant("μ",`:point_set->real`);; let AMa = NewAxiom `;â α. Angle α â &0 < μ α ⧠μ α < &180`;; let AMb = NewAxiom `;â α. Right α â μ α = &90`;; let AMc = NewAxiom `;â α β. Angle α ⧠Angle β ⧠α ⡠β â μ α = μ β`;; let AMd = NewAxiom `;â A O B P. P â int_angle A O B â μ (â¡ A O B) = μ (â¡ A O P) + μ (â¡ P O B)`;; let ConverseAlternateInteriorAngles = theorem `; â A B C E l m. Line l ⧠A â l ⧠E â l â Line m ⧠B â m ⧠C â m â Line t ⧠A â t ⧠B â t â ¬(A = E) ⧠¬(B = C) ⧠¬(A = B) ⧠E â t ⧠C â t â ¬(C,E same_side t) â l ⥠m â â¡ E A B â¡ â¡ C B A proof intro_TAC â A B C E l m, l_line, m_line, t_line, Distinct, Cnsim_tE, para_lm; ¬Collinear C B A [] by fol Distinct t_line NonCollinearRaa CollinearSymmetry; A â m ⧠Angle (â¡ C B A) [notAm] by fol m_line - Collinear_DEF â ANGLE; consider D such that ¬(A = D) ⧠D â t ⧠¬(C,D same_side t) ⧠seg A D â¡ seg A E ⧠⡠B A D â¡ â¡ C B A [Dexists] proof mp_TAC_specl [â¡ C B A; t; A; B; C; A; E] C4OppositeSide; fol - Distinct t_line; qed; consider k such that Line k ⧠A â k ⧠D â k [k_line] by fol Distinct I1; k ⥠m [] by fol - m_line t_line Dexists Distinct AngleSymmetry AlternateInteriorAngles; k = l [] by fol m_line notAm l_line k_line - para_lm P; D,E same_side t ⧠A â open (D,E) ⧠Collinear A E D [] by fol t_line Distinct Dexists Cnsim_tE AtMost2Sides SameSide_DEF â - k_line l_line Collinear_DEF; ray A D = ray A E [] by fol Distinct - IN_Ray Dexists IN_DELETE RayWellDefined; fol - Dexists AngleSymmetry Angle_DEF; qed; `;; let HilbertTriangleSum = theorem `; â A B C. ¬Collinear A B C â â E F. B â open (E,F) ⧠C â int_angle A B F ⧠⡠E B A â¡ â¡ C A B ⧠⡠C B F â¡ â¡ B C A proof intro_TAC â A B C, ABCncol; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠¬Collinear C A B [Distinct] by fol ABCncol NonCollinearImpliesDistinct CollinearSymmetry; consider l such that Line l ⧠A â l ⧠C â l [l_line] by fol Distinct I1; consider x such that Line x ⧠A â x ⧠B â x [x_line] by fol Distinct I1; consider y such that Line y ⧠B â y ⧠C â y [y_line] by fol Distinct I1; C â x [notCx] by fol x_line ABCncol Collinear_DEF â; Angle (â¡ C A B) [] by fol ABCncol CollinearSymmetry ANGLE; consider E such that ¬(B = E) ⧠E â x ⧠¬(C,E same_side x) ⧠seg B E â¡ seg A B ⧠⡠A B E â¡ â¡ C A B [Eexists] proof mp_TAC_specl [â¡ C A B; x; B; A; C; A; B] C4OppositeSide; fol - Distinct x_line notCx; qed; consider m such that Line m ⧠B â m ⧠E â m [m_line] by fol - I1 IN_DELETE; â¡ E B A â¡ â¡ C A B [EBAeqCAB] by fol Eexists AngleSymmetry; m ⥠l [para_lm] by fol m_line l_line x_line Eexists Distinct notCx - AlternateInteriorAngles; m â© l = â [lm0] by fol - PARALLEL; C â m ⧠A â m [notACm] by fol - l_line INTER_COMM DisjointOneNotOther; consider F such that B â open (E,F) [EBF] by fol Eexists B2'; ¬(B = F) ⧠F â m [EBF'] by fol - B1' m_line BetweenLinear; ¬Collinear A B F ⧠F â x [ABFncol] by fol EBF' m_line notACm NonCollinearRaa CollinearSymmetry Collinear_DEF x_line â; ¬(E,F same_side x) ⧠¬(E,F same_side y) [Ensim_yF] by fol EBF x_line y_line SameSide_DEF; C,F same_side x [Csim_xF] by fol x_line notCx Eexists ABFncol Eexists - AtMost2Sides; m â© open(C,A) = â [] by set l_line BetweenLinear SUBSET lm0 SUBSET_EMPTY; C,A same_side m [] by set m_line - SameSide_DEF; C â int_angle A B F [CintABF] by fol ABFncol x_line m_line EBF' notCx notACm Csim_xF - IN_InteriorAngle; A â int_angle C B E [] by fol EBF B1' - InteriorAngleSymmetry InteriorReflectionInterior; A â y ⧠A,E same_side y [Asim_yE] by fol y_line m_line - InteriorUse; E â y ⧠F â y [notEFy] by fol y_line m_line EBF' Eexists EBF' I1 Collinear_DEF notACm â; E,A same_side y [] by fol y_line - Asim_yE SameSideSymmetric; ¬(A,F same_side y) [Ansim_yF] by fol y_line notEFy Asim_yE - Ensim_yF SameSideTransitive; â¡ F B C â¡ â¡ A C B [] by fol m_line EBF' l_line y_line EBF' Distinct notEFy Asim_yE Ansim_yF para_lm ConverseAlternateInteriorAngles; fol EBF CintABF EBAeqCAB - AngleSymmetry; qed; `;; let EuclidPropositionI_13 = theorem `; â A O B A'. ¬Collinear A O B ⧠O â open (A,A') â μ (â¡ A O B) + μ (â¡ B O A') = &180 proof intro_TAC â A O B A', H1 H2; case_split RightAOB | notRightAOB by fol -; suppose Right (â¡ A O B); Right (â¡ B O A') ⧠μ (â¡ A O B) = &90 ⧠μ (â¡ B O A') = &90 [] by fol H1 H2 - RightImpliesSupplRight AMb; REAL_ARITH_thmTAC -; end; suppose ¬Right (â¡ A O B); ¬(A = O) ⧠¬(O = B) [Distinct] by fol H1 NonCollinearImpliesDistinct; consider l such that Line l ⧠O â l ⧠A â l ⧠A' â l [l_line] by fol - I1 H2 BetweenLinear; B â l [notBl] by fol - Distinct I1 Collinear_DEF H1 â; consider F such that Right (â¡ O A F) ⧠Angle (â¡ O A F) [RightOAF] by fol Distinct EuclidPropositionI_11 RightImpliesAngle; â! r. Ray r ⧠â E. ¬(O = E) ⧠r = ray O E ⧠E â l ⧠E,B same_side l ⧠⡠A O E â¡ â¡ O A F [] proof mp_TAC_specl [â¡ O A F; O; A; l; B] C4; fol - Distinct l_line notBl; qed; consider E such that ¬(O = E) ⧠E â l ⧠E,B same_side l ⧠⡠A O E â¡ â¡ O A F [Eexists] by fol -; ¬Collinear A O E [AOEncol] by fol Distinct l_line - NonCollinearRaa CollinearSymmetry; Right (â¡ A O E) [RightAOE] by fol - ANGLE RightOAF Eexists CongRightImpliesRight; Right (â¡ E O A') ⧠μ (â¡ A O E) = &90 ⧠μ (â¡ E O A') = &90 [RightEOA'] by fol AOEncol H2 - RightImpliesSupplRight AMb; ¬(â¡ A O B â¡ â¡ A O E) [] by fol notRightAOB H1 ANGLE RightAOE CongRightImpliesRight; ¬(â¡ A O B = â¡ A O E) [] by fol H1 AOEncol ANGLE - C5Reflexive; ¬(ray O B = ray O E) [] by fol - Angle_DEF; B â ray O E ⧠O â open (B,E) [] by fol Distinct - Eexists RayWellDefined IN_DELETE â l_line B1' SameSide_DEF; ¬Collinear O E B [] by fol - Eexists IN_Ray â; E â int_angle A O B ⨠B â int_angle A O E [] by fol Distinct l_line Eexists notBl AngleOrdering - CollinearSymmetry InteriorAngleSymmetry; case_split EintAOB | BintAOE by fol -; suppose E â int_angle A O B; B â int_angle E O A' [] by fol H2 - InteriorReflectionInterior; μ (â¡ A O B) = μ (â¡ A O E) + μ (â¡ E O B) ⧠μ (â¡ E O A') = μ (â¡ E O B) + μ (â¡ B O A') [] by fol EintAOB - AMd; REAL_ARITH_thmTAC - RightEOA'; end; suppose B â int_angle A O E; E â int_angle B O A' [] by fol H2 - InteriorReflectionInterior; μ (â¡ A O E) = μ (â¡ A O B) + μ (â¡ B O E) ⧠μ (â¡ B O A') = μ (â¡ B O E) + μ (â¡ E O A') [] by fol BintAOE - AMd; REAL_ARITH_thmTAC - RightEOA'; end; end; qed; `;; let TriangleSum = theorem `; â A B C. ¬Collinear A B C â μ (â¡ A B C) + μ (â¡ B C A) + μ (â¡ C A B) = &180 proof intro_TAC â A B C, ABCncol; ¬Collinear C A B ⧠¬Collinear B C A [CABncol] by fol ABCncol CollinearSymmetry; consider E F such that B â open (E,F) ⧠C â int_angle A B F ⧠⡠E B A â¡ â¡ C A B ⧠⡠C B F â¡ â¡ B C A [EBF] by fol ABCncol HilbertTriangleSum; ¬Collinear C B F ⧠¬Collinear A B F ⧠Collinear E B F ⧠¬(B = E) [CBFncol] by fol - InteriorAngleSymmetry InteriorEZHelp IN_InteriorAngle B1' CollinearSymmetry; ¬Collinear E B A [EBAncol] by fol CollinearSymmetry - NoncollinearityExtendsToLine; μ (â¡ A B F) = μ (â¡ A B C) + μ (â¡ C B F) [μCintABF] by fol EBF AMd; μ (â¡ E B A) + μ (â¡ A B F) = &180 [suppl180] by fol EBAncol EBF EuclidPropositionI_13; μ (â¡ C A B) = μ (â¡ E B A) ⧠μ (â¡ B C A) = μ (â¡ C B F) [] by fol CABncol EBAncol CBFncol ANGLE EBF AMc; REAL_ARITH_thmTAC suppl180 μCintABF -; qed; `;; let CircleConvex2_THM = theorem `; â O A B C. ¬Collinear A O B â B â open (A,C) â seg O A <__ seg O B ⨠seg O A â¡ seg O B â seg O B <__ seg O C proof intro_TAC â O A B C, H1, H2, H3; ¬Collinear O B A ⧠¬Collinear B O A ⧠¬Collinear O A B ⧠¬(O = A) ⧠¬(O = B) [H1'] by fol H1 CollinearSymmetry NonCollinearImpliesDistinct; B â open (C,A) ⧠¬(C = A) ⧠¬(C = B) ⧠Collinear A B C ⧠Collinear B A C [H2'] by fol H2 B1' CollinearSymmetry; ¬Collinear O B C ⧠¬Collinear O C B [OBCncol] by fol H1' - NoncollinearityExtendsToLine CollinearSymmetry; ¬Collinear O A C [OABncol] by fol H1' H2' NoncollinearityExtendsToLine; â¡ O C B <_ang â¡ O B A [OCBlessOBA] by fol OBCncol H2' ExteriorAngle; â¡ O A B <_ang â¡ O B C [OABlessOBC] by fol H1' H2 ExteriorAngle; â¡ O B A <_ang â¡ B A O ⨠⡠O B A â¡ â¡ B A O [] proof case_split Less | Cong by fol H3; suppose seg O A <__ seg O B; fol H1' - EuclidPropositionI_18; end; suppose seg O A â¡ seg O B; seg O B â¡ seg O A [] by fol H1' SEGMENT - C2Symmetric; fol H1' - IsoscelesCongBaseAngles AngleSymmetry; end; qed; â¡ O B A <_ang â¡ O A B ⨠⡠O B A â¡ â¡ O A B [OBAlessOAB] by fol - AngleSymmetry; â¡ O C B <_ang â¡ O B C [] by fol OCBlessOBA - OABlessOBC OBCncol H1' OABncol OBCncol ANGLE - AngleOrderTransitivity AngleTrichotomy2; fol OBCncol - AngleSymmetry EuclidPropositionI_19; qed; `;;