(* ========================================================================= *) (* 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 invaluable 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);; NewConstant("Between", `:point->point->point->bool`);; NewConstant("Line", `:(point->bool)->bool`);; NewConstant("â¡", `:(point->bool)->(point->bool)->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 INTER_TENSOR = theorem `; âs s' t t'. s â s' ⧠t â t' â s â© t â s' â© t' by set`;; 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 `; âα. 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 by rewrite Interval_DEF IN_ELIM_THM`;; let IN_Ray = theorem `; âA B X. X â ray A B â ¬(A = B) ⧠Collinear A B X ⧠A â Open (X, B) by rewrite Ray_DEF IN_ELIM_THM`;; 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 by rewrite InteriorAngle_DEF IN_ELIM_THM`;; 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 by rewrite InteriorTriangle_DEF IN_ELIM_THM`;; let IN_PlaneComplement = theorem `; âα. âP. P â complement α â P â α by rewrite PlaneComplement_DEF IN_ELIM_THM`;; let IN_InteriorCircle = theorem `; âO R P. P â int_circle O R â ¬(O = R) ⧠(P = O ⨠seg O P <__ seg O R) by rewrite InteriorCircle_DEF IN_ELIM_THM`;; let B1' = theorem `; âA B C. B â Open (A, C) â ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) ⧠B â Open (C, A) ⧠Collinear A B C by fol IN_Interval B1`;; let B2' = theorem `; âA B. ¬(A = B) â âC. B â Open (A, C) by fol IN_Interval B2`;; 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)) by fol IN_Interval B3`;; 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)) by rewrite IN_Interval B4`;; 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 SameSide_DEF; fol B4'; qed; `;; let DisjointOneNotOther = theorem `; âl m. (âx:A. x â m â x â l) â l â© m = â by fol â IN_INTER MEMBER_NOT_EMPTY`;; let EquivIntersectionHelp = theorem `; âe x:A. âl m:A->bool. (l â© m = {x} ⨠m â© l = {x}) ⧠e â m â {x} â e â l by fol â IN_INTER IN_SING IN_DIFF`;; 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; fol - l_line; 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; assume (A â l) ⧠(B â l) ⧠(C â l) [all_on] by fol â; Collinear A B C [] by fol H1 - Collinear_DEF; fol - Distinct; 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; assume A = B ⧠B = C [equal] by fol H1 I1 Collinear_DEF; consider Q such that ¬(Q = A) [notQA] by fol I3; fol - equal H1 I1 Collinear_DEF; 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; assume 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; assume ¬(C = Y) [notCY] by fol; consider l such that Line l ⧠C â l ⧠Y â l [l_line] by fol - I1; B â l ⧠A â l [] 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; assume ¬(l â© m = {X}) [H3] by fol; consider A such that A â l â© m ⧠¬(A = X) [X1] by fol H2l H2m IN_INTER H3 EXTENSION IN_SING; fol H0l H0m H2l H2m IN_INTER X1 I1 H1; qed; `;; let DisjointLinesImplySameSide = theorem `; âl m A B. Line l ⧠Line m ⧠A â m ⧠B â m ⧠l â© m = â â A,B same_side l proof intro_TAC âl m A B, l_line m_line Am Bm lm0; l â© Open (A,B) = â [] by fol Am Bm m_line BetweenLinear SUBSET lm0 SUBSET_REFL INTER_TENSOR SUBSET_EMPTY; fol l_line - SameSide_DEF SUBSET IN_INTER MEMBER_NOT_EMPTY; 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, l_line m_line H1 H2l H2m H3; Open (A, B) â m [] by fol l_line m_line SUBSET_DIFF IN_DIFF IN_SING H2l H2m BetweenLinear SUBSET; l â© Open (A, B) â {X} [] by fol - H1 SUBSET_REFL INTER_TENSOR; l â© Open (A, B) â â [] by fol - SUBSET IN_SING IN_INTER H3 â; fol l_line - SameSide_DEF SUBSET IN_INTER NOT_IN_EMPTY; qed; `;; let RayLine = theorem `; âO P l. Line l ⧠O â l ⧠P â l â ray O P â l by fol IN_Ray CollinearLinear SUBSET`;; 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_DIFF IN_SING; ray O A â d [] by fol d_line RayLine; P â d â {O} [Pd_O] by fol PrOA - SUBSET IN_DIFF IN_SING; P â l [notPl] by fol ldO - EquivIntersectionHelp; O â Open (P, A) [] by fol PrOA IN_DIFF IN_SING 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_DIFF IN_SING; 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 by fol B1' SameSide_DEF`;; let SameSideSymmetric = theorem `; âl A B. Line l ⧠A â l ⧠B â l â A,B same_side l â B,A same_side l by fol SameSide_DEF B1'`;; 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; assume Collinear A B C ⧠¬(A = B) ⧠¬(A = C) ⧠¬(B = C) [Distinct] by fol l_line notABCl Asim_lB Bsim_lC B4'' SameSideReflexive; consider m such that Line m ⧠A â m ⧠C â m [m_line] by fol Distinct I1; B â m [Bm] by fol - Distinct CollinearLinear; assume ¬(m â© l = â ) [Intersect] by fol m_line l_line BetweenLinear SameSide_DEF IN_INTER NOT_IN_EMPTY; 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''; 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_DIFF IN_SING EquivIntersectionHelp; G â l â {A} ⧠B â l â {A} ⧠G â l â {B} ⧠A â l â {B} [] by fol Gl l_line AGB IN_DIFF IN_SING; 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) [] 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) [] by fol def_int NonCollinearImpliesDistinct; ¬Collinear A O P [] by fol def_int - 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 rewrite IN_InteriorAngle; fol 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_Ray IN_DIFF IN_SING; 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_DIFF IN_SING; 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_DIFF IN_SING; 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_DIFF; fol p_line p_line - RayLine SUBSET 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_Ray IN_DIFF IN_SING; P â m ⧠P â m â {O} ⧠Q â m â {O} [PQm_O] by fol OQm H2' RayLine SUBSET H2' OQm H1 IN_DIFF IN_SING; O â Open (P, Q) [notPOQ] by fol H2' IN_Ray; rewrite SUBSET; X_genl_TAC X; intro_TAC XrayOP; X â m ⧠O â Open (X, P) [XrOP] by fol - SUBSET OQm PQm_O H2' RayLine IN_Ray; Collinear O Q X [OQXcol] by fol OQm - Collinear_DEF; assume ¬(X = O) [notXO] by fol H1 OriginInRay; X â m â {O} [] by fol XrOP - IN_DIFF IN_SING; O â Open (X, Q) [] by fol OQm - PQm_O XrOP H2' IntervalTransitivity; fol H1 OQXcol - IN_Ray; 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_Ray IN_DIFF IN_SING; Q â ray O P â {O} [] by fol H2' B1' â CollinearSymmetry IN_Ray H1 IN_DIFF IN_SING; 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_Ray IN_DIFF IN_SING; 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_DIFF IN_SING; fol H1 m_line Om - H2' IntervalTransitivity â B1' 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'; rewrite GSYM SUBSET_ANTISYM_EQ SUBSET IN_INTER; conj_tac [Right] by fol - OriginInRay IN_SING; fol H1 OppositeRaysIntersect1pointHelp IN_DIFF IN_SING â; qed; `;; let IntervalRay = theorem `; âA B C. B â Open (A, C) â ray A B = ray A C by fol B1' IntervalRayEZ RayWellDefined`;; let Reverse4Order = theorem `; âA B C D. ordered A B C D â ordered D C B A proof rewrite 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; fol MESON [-; Ordered_DEF] [B â Open (X, C)] B1' B3' â; 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; assume ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) [Distinct] by fol B1' â; B â Open (A, C) ⨠C â Open (B, A) ⨠A â Open (C, B) [] by fol - H1 B3'; fol - Interval2sides2aLineHelp B1' â; qed; `;; let TwosidesTriangle2aLine = theorem `; âA B C l. 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 intro_TAC â A B C l, H1, off_l, H2; ¬(A = B) ⧠¬(A = C) ⧠¬(B = C) [ABCdistinct] by fol H1 NonCollinearImpliesDistinct; consider m such that Line m ⧠A â m ⧠C â m [m_line] by fol - I1; assume ¬(l â© m = â ) [lmIntersect] by fol H1 m_line DisjointLinesImplySameSide; consider Y such that Y â l ⧠Y â m [Ylm] by fol lmIntersect MEMBER_NOT_EMPTY IN_INTER; 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_DIFF IN_SING; 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, l_line, H2; assume ¬(A = C) [notAC] by fol l_line H2 SameSideReflexive; assume Collinear A B C [ABCcol] by fol l_line H2 TwosidesTriangle2aLine; consider m such that Line m ⧠A â m ⧠B â m ⧠C â m [m_line] by fol notAC - I1 Collinear_DEF; assume ¬(m â© l = â ) [m_lNot0] by fol m_line l_line BetweenLinear SameSide_DEF IN_INTER NOT_IN_EMPTY; consider X such that X â l ⧠X â m [Xlm] by fol - IN_INTER MEMBER_NOT_EMPTY; A â m â {X} ⧠B â m â {X} ⧠C â m â {X} [ABCm_X] by fol m_line - H2 â IN_DIFF IN_SING; X â Open (A, B) ⨠X â Open (A, C) ⨠X â Open (B, C) [] by fol ABCcol Interval2sides2aLine; fol l_line m_line m_line Xlm H2 â I1Uniqueness ABCm_X - EquivIntersection; 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) [3pos] by fol H2 ABCdistinct - B3' B1'; assume B â Open (A, X) [ABX] by fol 3pos; B â Open (C, X) [] by fol ACXcol H3 - Interval2sides2aLine â; fol H2 ABCdistinct ACXcol - B3' B1' â; 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_Ray IN_DIFF IN_SING; M â ray O M' â {O} [MrOM'] by fol - CollinearSymmetry B1' â IN_Ray IN_DIFF IN_SING; 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 simplify HalfPlane IN_ELIM_THM; 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; fol Hnonempty Hsub - SUBSET CONVEX; qed; `;; let PlaneSeparation = theorem `; âl. Line l â âH1 H2. 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 simplify IN_ELIM_THM -; 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; fol notCl - H12def 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; simplify 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_DIFF IN_SING; 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 fol - b_line SameSide_DEF IN_INTER MEMBER_NOT_EMPTY; fol H1 BCbABa - INTER_TENSOR SUBSET_REFL SUBSET_EMPTY 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_DIFF IN_SING; 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; assume A,C same_side m [same] by fol lm_line H1 Bsim_lD DoubleNotSimImpliesDiagonalsIntersect; 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; fol CintDAB - IN_InteriorTriangle; 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; assume A,C same_side m [same] by fol lm_line H1 Bsim_lD DoubleNotSimImpliesDiagonalsIntersect; 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; fol CintDAB - IN_InteriorTriangle; qed; `;; let InteriorTriangleSymmetry = theorem `; âA B C P. P â int_triangle A B C â P â int_triangle B C A by fol IN_InteriorTriangle`;; 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 by fol Quadrilateral_DEF INTER_COMM TetralateralSymmetry Quadrilateral_DEF`;; 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 [2pos] by fol H1 ac_line SegmentSameSideOppositeLine; assume A,B same_side c [Asym_cB] by fol 2pos H1Tetra ac_line notconvquad FourChoicesTetralateral; 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; 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) by fol B1' EXTENSION`;; let SegmentSymmetry = theorem `; âA B. seg A B = seg B A by fol Segment_DEF INSERT_COMM IntervalSymmetry`;; 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_DIFF IN_SING 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_DIFF IN_SING; 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 simplify defQ B1' â; fol defQ B1' H1 B3'; qed; C â ray A B â {A} ⧠Q â ray A B â {A} [] by fol Distinct - IN_Ray IN_DIFF IN_SING; fol defQ Distinct - AQ_A'C' H3 C1; 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_DIFF IN_SING; ¬(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] by fol - SegmentTrichotomy1; ¬(s â¡ t ⧠t <__ s) [Not13] by fol H1 - SegmentTrichotomy1 C2Symmetric; ¬(s <__ t ⧠t <__ s) [Not23] by fol H1 - SegmentOrderTransitivity SegmentTrichotomy1 H1 C2Reflexive; 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_DIFF IN_SING 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; assume ¬(Q = P) [notQP] by fol stOPQ sOP QrOP Not12 Not13 Not23; 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; 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 by fol Angle_DEF UNION_COMM`;; 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_DIFF IN_SING 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_DIFF IN_SING; Collinear C B D [CBDcol] by fol - IN_DIFF IN_SING 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; fol G'intA'O'B' - Orays Angle_DEF; 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' [] by simplify C4 - angles Distinct a_line H1'; 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_DIFF IN_SING; 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; assume α ⡠β [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 ⡠β [] by simplify H1 Distinct a_line C4 -; 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_DIFF IN_SING; ray O Q = ray O P [] by fol Distinct - RayWellDefined; â¡ P O A = â¡ A O Q [] by fol - Angle_DEF AngleSymmetry; fol - POA Qexists 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 α by fol RightAngle_DEF SupplementImpliesAngle`;; 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_DIFF IN_SING; 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_DIFF IN_SING - B1' def_α IntervalRay; Collinear P D Y ⧠Collinear P C X [] by fol defY defX IN_DIFF IN_SING 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 β' â β ⡠β' by fol SupplementaryAngles_DEF ANGLE C5Reflexive SupplementsCongAnglesCong`;; 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 ⡠β [] by simplify C4 - Distinct a_line notBa; 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_DIFF IN_SING; 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_DIFF IN_SING; 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; fol H1 CBAncol H2 - SAS 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 ⡠α [] by simplify C4 H1 l_line; 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; 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 Nexists IN_DIFF IN_SING 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] by simplify C4withC1 H1 l_line -; ¬(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] by simplify C4OppositeSide - Distinct h_line notBh; ¬(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_DIFF IN_SING; ¬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_DIFF IN_SING; ¬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 assume ¬(G = A) ⧠¬(G = C) [AGCdistinct] by fol Distinct GBCeqGNC ABGeqANG; â¡ 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; 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_Ray IN_DIFF IN_SING; Collinear A C E ⧠D â ray A B â {A} [notAE] by fol - IN_Ray ABD IntervalRayEZ IN_DIFF IN_SING; 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] by simplify C4OppositeSide angEDA notDE ABD' h_line -; ¬(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 assume ¬(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 assume ¬(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 assume 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_DIFF IN_SING; 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 â; assume 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_DIFF IN_SING; 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_DIFF IN_SING 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 assume 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_DIFF IN_SING 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_DIFF IN_SING 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] by simplify C4OppositeSide - ABl BAPncol l_line; 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 assume ¬(A = Q) [notAQ] by fol ABl BAPncol BAPeqBAP' AngleSymmetry; 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); Q â ray A B â {A} [QrayAB_A] by fol ABl Qexists notQAB IN_Ray notAQ IN_DIFF IN_SING; ray A Q = ray A B [] by fol - ABl RayWellDefined; fol notAQ QrayAB_A - 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; 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_DIFF IN_SING; 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; assume ¬(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_Ray IN_DIFF IN_SING; 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 assume seg O A â¡ seg O C [seg_eq] by fol H3 H1' EuclidPropositionI_18; seg O C â¡ seg O A [] by fol H1' SEGMENT - C2Symmetric; fol H1' - IsoscelesCongBaseAngles AngleSymmetry; 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_DIFF IN_SING; Segment (seg O G) ⧠¬(O = B) [notOB] by fol - SEGMENT BrOK IN_DIFF IN_SING; seg O G <__ seg O C [] by fol H1 AGC H4 InteriorCircleConvexHelp; seg O G <__ seg O B [] by fol - OCeqOB BrOK SEGMENT SegmentTrichotomy2 IN_DIFF IN_SING; 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 [3pos] by fol - SEGMENT SegmentTrichotomy; assume seg O C <__ seg O A [H4] by fol 3pos H1 H2 H3 EuclidPropositionI_24Help; â¡ M O' D <_ang â¡ C O A [] by fol H3 AngleSymmetry; fol Distinct H3 AngleSymmetry H2 H4 EuclidPropositionI_24Help SegmentSymmetry; 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; assume ¬(â¡ 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_Ray CollinearSymmetry IN_DIFF IN_SING; ¬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; assume ¬(G = C) [notGC] by fol BGAeqBCA ABGâ A'B'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; qed; `;; let ParallelSymmetry = theorem `; âl k. l ⥠k â k ⥠l by fol PARALLEL INTER_COMM`;; 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 - â; assume ¬(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_DIFF IN_SING; ¬(G,E same_side t) [] proof assume 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_DIFF IN_SING; 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] by fol - IN_Ray Distinct t_line AGBncol RaySameSide Cnsim_tG IN_DIFF IN_SING â; 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_DIFF IN_SING; 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] by fol - IN_Ray Distinct t_line AGBncol RaySameSide Ensim_tG IN_DIFF IN_SING â; 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 assume 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; assume ¬(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 assume ¬(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_DIFF IN_SING â; 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 assume ¬(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_DIFF IN_SING â; 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->bool)->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] by simplify C4OppositeSide - Distinct t_line; 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 RayWellDefined IN_DIFF IN_SING; 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] by simplify C4OppositeSide - Distinct x_line notCx; consider m such that Line m ⧠B â m ⧠E â m [m_line] by fol - I1; â¡ 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 = â [ml0] 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; C,A same_side m [] by fol m_line l_line ml0 DisjointLinesImplySameSide; 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_arithmetic -; 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 [] by simplify C4 - Distinct l_line notBl; 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_DIFF IN_SING â 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_arithmetic - 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_arithmetic - 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_arithmetic 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 assume seg O A â¡ seg O B [Cong] by fol H3 H1' EuclidPropositionI_18; seg O B â¡ seg O A [] by fol H1' SEGMENT - C2Symmetric; fol H1' - IsoscelesCongBaseAngles AngleSymmetry; 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; `;;