This repository is an attempt to understand
Beeson, Michael, et al. ‘Proof-Checking Euclid’. Annals of Mathematics and Artificial Intelligence, vol. 85, no. 2–4, Apr. 2019, pp. 213–57. DOI.org (Crossref), https://doi.org/10.1007/s10472-018-9606-x.
and https://github.com/GeoCoq/GeoCoq specifically.
Most of the code here is a direct translation but
auto tactic and the like are not used.
The goal is to be able to follow how the proof unfolds.
Each lemma has a tree of dependencies, and so the dependencies need to be introduced in a particular order.
- euclidean_axioms
- by_def_InCirc_center
- by_def_OnCirc
- by_def_OutCirc
- by_prop_Cong_symmetric
- by_prop_Cong_transitive
- by_prop_Cong_flip
- by_prop_eq_symmetric
- by_prop_neq_symmetric
- euclidean_defs
- lemma_localextension
- lemma_orderofpoints_ABC_ACD_BCD
- by_prop_BetS_notequal
- lemma_extensionunique
- lemma_orderofpoints_ABC_BCD_ACD
- lemma_orderofpoints_ABC_BCD_ABD
- lemma_partnotequalwhole
- proposition_01
- by_def_InCirc_within_radius
- by_def_nCol_from_Triangle
- by_prop_nCol_distinct
- by_prop_Cong_doublereverse
- lemma_differenceofparts
- proposition_02
- lemma_betweennesspreserved
- lemma_extension
- by_prop_Lt_congruence
- proposition_03
- by_def_Col_from_BetS_A_B_C
- by_def_Col_from_BetS_A_C_B
- by_def_Col_from_BetS_B_A_C
- by_def_Col_from_eq_A_B
- by_def_Col_from_eq_A_C
- by_def_Col_from_eq_B_C
- by_def_Col_from_n_nCol
- by_def_nCol_from_n_Col
- by_def_n_Col_from_nCol
- lemma_orderofpoints_ABD_BCD_ACD
- lemma_orderofpoints_ABC_ACD_ABD
- lemma_outerconnectivity
- by_prop_Col_ABC_ABD_BCD
- by_prop_Col_ABC_BAC
- by_prop_Col_ABC_BCA
- by_prop_Col_order
- by_prop_OnRay_impliescollinear
- by_prop_OnRay_neq_A_B
- by_prop_OnRay_neq_A_C
- lemma_collinearitypreserved
- by_prop_CongA_NC
- by_def_Lt
- by_prop_OnRay_betweenness
- by_prop_OnRay_orderofpoints_any
- lemma_interior5
- lemma_layoffunique
- by_prop_nCol_order
- by_def_OnRay
- by_prop_OnRay_assert
- by_def_OnRay_from_neq_A_B
- lemma_s_conga_sss
- by_def_OnRay_from_BetS_A_B_E
- by_def_OnRay_from_BetS_A_E_B
- by_prop_OnRay_ABC_ACB
- lemma_s_onray_congruence_betweenness
- lemma_s_triangle_vertex_to_ray_congruent
- proposition_04
- by_def_CongA
- by_prop_CongA_ABCequalsCBA
- proposition_05
- by_def_Cut
- lemma_s_5_line
- lemma_s_Col_ABC_nCol_ABD_nCol_ACD
- lemma_s_Pasch_inner
- lemma_twolines
- proposition_10
- by_def_Perp_at
- by_def_RightTriangle
- proposition_12
- by_def_OppositeSide
- by_prop_Col_ABC_ABD_ABE_CDE
- lemma_oppositeside_betweenness_PABC_RPQ_QABC
- lemma_oppositeside_betweenness_PABC_RQP_QABC
- lemma_twolines2
- lemma_planeseparation
- by_def_Midpoint
- lemma_layoff
- by_prop_Lt_transitive
- lemma_midpointunique
- lemma_s_congruence_null_segment
- by_prop_RightTriangle_NC
- by_prop_RightTriangle_leg_change
- by_def_Supp
- by_prop_CongA_symmetric
- by_prop_CongA_distinct
- by_prop_OnRay_shared_initial_point
- by_prop_CongA_helper
- by_prop_CongA_transitive
- lemma_supplements_conga
- by_prop_RightTriangle_symmetric
- by_prop_RightTriangle_collinear
- by_def_SameSide
- by_prop_SameSide_symmetric
- by_prop_RightTriangle_reverse
- lemma_altitudebisectsbase
- lemma_droppedperpendicularunique
- lemma_fiveline
- proposition_07
- by_prop_Lt_trichotomous
- by_def_LtA
- by_prop_CongA_reflexive
- by_prop_LtA_respects_congruence_smaller
- by_prop_LtA_respects_congruence
- lemma_s_ncol_ABD_col_ABC_ncol_ACD
- lemma_crossbar
- by_prop_LtA_transitive
- lemma_sameside_onray
- lemma_angletrichotomy
- proposition_06a
- proposition_06
- proposition_08
- by_def_InAngle
- proposition_09
- proposition_11
- by_def_SumTwoRT
- by_prop_nCol_helper
- proposition_13
- by_prop_OppositeSide_symmetric
- proposition_14
- proposition_15
- by_def_LtA_from_InAngle
- proposition_16
- by_def_AngleSum
- by_def_Triangle
- proposition_17
- by_def_isosceles
- proposition_18
- proposition_19
- by_def_TogetherGreater
- proposition_20
- by_def_TT
- by_prop_Lt_congruence_smaller
- by_prop_TogetherGreater_flip
- by_prop_TogetherGreater_symmetric
- by_prop_TT_flip
- by_prop_TT_flip2
- by_prop_TT_order
- by_prop_TT_transitive
- by_prop_Lt_asymmetric
- by_prop_Lt_additive
- by_prop_Lt_between
- lemma_21helper
- proposition_21
- by_prop_Lt_notequal
- lemma_ondiameter
- lemma_subtractequals
- lemma_together
- proposition_22
- proposition_23
- by_prop_CongA_flip_left
- by_prop_CongA_flip_right
- by_prop_CongA_flip
- proposition_24
- proposition_15a
- lemma_pointreflectionisometry
- lemma_linereflectionisometry
- lemma_right_triangle_same_base_cong_side_cong_hypotenuse
- lemma_Euclid4
- lemma_sameside_onray_EFAC_BFG_EGAC
- lemma_oppositeside_onray_PABC_RQP_QABC
- by_prop_RightTriangle_CBA_n_ACB
- by_prop_SameSide_reflexive
- lemma_notperp
- proposition_11B
- proposition_23B
- proposition_23C
- lemma_angletrichotomy_n_CongA_ABC_DEF_n_LtA_DEF_ABC_LtA_ABC_DEF
- proposition_25
- proposition_26A
- by_def_Par
- lemma_s_col_ABC_col_ABD_ncol_ACD_eq_AB
- lemma_27helper_BetS_A_E_G
- lemma_27helper_OnRay_EA_G
- by_def_Meet
- lemma_collinearbetween
- proposition_27
- proposition_28A
- by_prop_Par_flip
- proposition_31
- by_prop_Supp_symmetric
- lemma_crossbar_LtA
- lemma_supplementinequality
- proposition_29
- by_def_Cross
- by_prop_Par_NC
- by_prop_Par_collinear
- by_prop_Par_symmetric
- by_def_TarskiPar
- by_prop_TarskiPar_collinear_ABcd_Ccd_ABCd
- by_prop_TarskiPar_collinear_ABcd_cCd_ABCd
- by_prop_TarskiPar_flip
- by_prop_TarskiPar_collinear
- by_prop_Par_to_TarskiPar
- lemma_crisscross
- lemma_30helper
- lemma_crossimpliesopposite
- proposition_30A
- proposition_30
- proposition_31short
- proposition_32
- proposition_27B
- proposition_29B
- proposition_33
- by_def_CongTriangles
- by_prop_SameSide_not_OppositeSide
- by_prop_SameSide_not_Cross
- lemma_diagonalsmeet
- proposition_34
- by_def_Parallelogram
- by_prop_CongTriangles_reflexive
- by_prop_EqAreaQuad_reflexive
- lemma_parallelPasch
- by_prop_EqAreaTri_reflexive
- by_prop_Parallelogram_flip
- by_prop_Parallelogram_rotate
- by_prop_Parallelogram_symmetric
- lemma_35helper
- lemma_diagonalsbisect
- lemma_trapezoiddiagonals
- proposition_29C
- proposition_35A
- proposition_35
- by_prop_Par_collinear2
- proposition_36
- lemma_samesidetransitive
- lemma_Playfairhelper
- lemma_Playfairhelper2
- lemma_Playfair
- lemma_triangletoparallelogram
- proposition_37
- proposition_38
- by_prop_SameSide_flip
- proposition_39A
- proposition_39
- proposition_40
- proposition_41
- lemma_samesidecollinear
- proposition_42
- proposition_43
- proposition_42B
- lemma_parallelbetween
- proposition_33B
- lemma_supplements_SumTwoRT
- proposition_28D
- proposition_43B
- proposition_44A
- proposition_44
- by_prop_SumTwoRT_congruence
- by_prop_SumTwoRT_symmetric
- proposition_45
- by_def_Square
- by_prop_RightTriangle_equaltoright
- proposition_46
- by_prop_OppositeSide_flip
- by_prop_Square_flip
- lemma_righttogether
- lemma_squareparallelogram
- by_prop_AngleSum_respects_congruence
- by_prop_RightTriangle_legsmallerhypotenuse
- by_prop_OnRay_ABC_BAC_BetS_ACB
- lemma_altitudeofrighttriangle
- lemma_erectedperpendicularunique
- proposition_28B
- lemma_twoperpsparallel
- proposition_47A
- proposition_47B
- proposition_47
- by_def_Rectangle
- by_prop_RightTriangle_supplement
- lemma_PGrectangle
- lemma_rectangleparallelogram
- lemma_paste5
- lemma_rectanglerotate
- lemma_squarerectangle
- lemma_squaresequal
- proposition_48A
- proposition_48
With all the above proved the following unrelated lemma can also be proved:
cn_equalityreverseis renamed tocn_congruencereverse. I think the original name is due to how this common notion was applied in the.prffiles:EEABBA cn:equalityreverse. I found this hard to follow given that the rest of the congruence common notions start withcongruence.lemma_3_6aand the like are renamed tolemma_orderofpoints_ABC_ACD_BCDand the like. Section "8 Book Zero and filling in book I" mentions "several important and often-used lemmas [that] are about the order of four points on a line, when two betweenness relations are known between them", which seems to matchlemma_3_6aand the like. I foundorderofpointsto be a more appropriate name for those lemmas.axiom_innertransitivityis renamed toaxiom_orderofpoints_ABD_BCD_ABCto match the renaming oflemma_3_6aintolemma_orderofpoints_ABC_ACD_BCD.- Most primitives and definitions are renamed to be more spelled out.
- OS -> SameSide
- OS presumably comes from "one side", but there are lemmas like
lemma_samesidereflexive, whish suggestSameSideto be an appropriate name.
- OS presumably comes from "one side", but there are lemmas like
- TS -> OppositeSide
- TS presumably comes from "two sides", but there are lemmas like
lemma_oppositesideflip, whish suggestOppositeSideto be an appropriate name.
- TS presumably comes from "two sides", but there are lemmas like
- Out -> OnRay
- Per -> RightTriangle
- I found definition of Square to be more natural with 4
RightTriangles than with 4Pers.
- I found definition of Square to be more natural with 4
- RT -> SumTwoRT
- SumA -> AngleSum
- TG -> TogetherGreater
- TP -> TarskiPar
- CR -> Cross
- PG -> Parallelogram
- SQ -> Square
- Cong_3 -> CongTriangles
- ET -> EqAreaTri
- Being explicit about the kind of equality used seems prudent, especially given how prominent congruence is.
- EF -> EqAreaQuad
- RE -> Rectangle
- OS -> SameSide
- Lemmas that encode properties of objects that can be pithily expressed
were renamed to start with
by_prop_$OBJECT_so that it is easier to find them and to ignore them in proof text. If there was no pithy way to express the property, or if the proof of the property turned out to be very complex, I've mostly left unchanged. lemma_onray[12345]instead of having numeric suffixes have evocative if not descriptive suffixes,by_prop_OnRay_orderofpoints_anyinstead oflemma_ray1.lemma_collinear[124]instead of having a numeric suffixes have evocative if not descriptive suffixes,by_prop_Col_ABC_BACinstead oflemma_collinear1.- You can find the full list of renames in sed_renames.txt.
- Many lemmas are introduced
to make it easier to use some of the definitions, these lemmas were named
to start with
by_def_$OBJECT_. - Many lemmas are introduced to make sense of what is going on.
Newly introduced lemmas start with
lemma_s, withsforsupporting. - Long proofs by contradiction that assert the lemma's goal were re-structured
as proofs "by cases", thus turning
contrdict+exactinto justexact.
- lemma_localextension
- proposition_01
- proposition_02
- by_prop_Lt_congruence
- The illustration includes triangles implied by
axiom_5_line, where point D is "moving onto the line". See section "6.6 Degenerate cases".
- The illustration includes triangles implied by
- proposition_09
- proposition_10_pasch_F
- proposition_10_pasch_M
- proposition_12
- proposition_16_LtA_BAC_ACD
- proposition_16_LtA_CBA_ACD
- proposition_18
- Diagrams were built by hand in GeoGebra .
- Downloaded as SVG.
- Clipped with Inkscape .
- Cleaned up with format_geogebra_svg.sh .
GeoGebra is used as a way of enforcing straightedge-and-compass construction.