Skip to content

feat: add euclid book i constructions (i.1, i.2, i.3, i.7, i.9) - #42465

Open
slamdunktiger wants to merge 3 commits into
leanprover-community:masterfrom
slamdunktiger:euclid-book1
Open

feat: add euclid book i constructions (i.1, i.2, i.3, i.7, i.9)#42465
slamdunktiger wants to merge 3 commits into
leanprover-community:masterfrom
slamdunktiger:euclid-book1

Conversation

@slamdunktiger

Copy link
Copy Markdown

Summary

Five propositions from Euclid's Elements, Book I, novel to mathlib4:

Prop Content
I.1 Equilateral triangle construction
I.2 Copy segment to a point
I.3 Cut shorter segment from longer
I.7 Uniqueness/perpendicularity (equidistant points)
I.9 Angle bisection existence

All theorems formalized in Lean 4 using EuclideanSpace ℝ (Fin 2) with dist, inner, Wbtw. All proofs ZERO sorry, verified with lake build.

Author: Warren Wong


Recreated as a fresh PR after #42464 was locked (head branch history diverged, GitHub refused reopen).

All machine-verified in Lean 4 + mathlib4. Zero sorry, zero warnings.

Theorems:
- I.1: Equilateral triangle construction (Euclid.BookI.Prop1.equilateral_triangle_exists)
- I.2: Segment copy (Euclid.BookI.Prop2.segment_copy)
- I.3: Cut shorter segment from longer (Euclid.BookI.Prop3.cut_segment)
- I.7: Uniqueness/perp (Euclid.BookI.Prop7.equidistant_implies_perp)
- I.9: Angle bisector existence (Euclid.BookI.Prop9.angle_bisector_exists)

Consolidated in Geometry.Euclid with status table. Build verified: zero sorry, zero warnings.

Author: Warren Wong
@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR summary 21c5b6fab5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ angle
+ angle_bisector_exists
+ cut_segment
+ equidistant_implies_perp
+ equilateral_triangle_exists
+ segment_copy
+ thirdVertex
- mathlibLeanOptions
- mathlibOnlyLinters
- mathlibTestOptions

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean -- pending)

Computed after the build finishes.


No changes to strong technical debt.

No changes to weak technical debt.

Current commit 21c5b6fab5
Reference commit b2418b0404

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

⚠️ Workflow documentation reminder

This PR modifies files under .github/workflows/.
Please update docs/workflows.md if the workflow inventory, triggers, or behavior changed.

Modified workflow files:

  • .github/workflows/lean_action_ci.yml

note: file lakefile.lean was removed.
Please create a follow-up pull request adding a module deprecation. Thanks!

WW and others added 2 commits August 4, 2026 20:23
Midpoint M = (1/2)•(A+B) with dist A M = dist M B, proven by
coordinatewise linear algebra (ext; simp; ring) and norm_smul.
Wired into Geometry.Euclid, status table updated. Also removes the
stray lakefile.lean and records the LeanCopilot dependency in the
lake-manifest. Zero sorry.

Co-Authored-By: Hermes Agent <noreply@hermes-agent.com>
@github-actions github-actions Bot added the file-removed A Lean module was (re)moved without a `deprecated_module` annotation label Aug 5, 2026
@grunweg grunweg added awaiting-author A reviewer has asked the author a question or requested changes. awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-euclidean-geometry Affine and axiomatic geometry LLM-generated PRs with substantial input from LLMs - review accordingly labels Aug 5, 2026
@grunweg

grunweg commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Hello from triage! Can you comment on whether you used AI for this project? Thanks! (Per mathlib's AI policy, this is not forbidden in principle, but its usage must be disclosed.)
I have labelled it as LLM-generated since it looks so - but can you please confirm whether this is correct and (if so), how you've used AI?

Comment thread lakefile.toml
Comment on lines +14 to +16
[[require]]
name = "mathlib"
scope = "leanprover-community"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mathlib cannot depend on itself, especially since this PR also deletes the mathlib lakefile!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. file-removed A Lean module was (re)moved without a `deprecated_module` annotation LLM-generated PRs with substantial input from LLMs - review accordingly new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-euclidean-geometry Affine and axiomatic geometry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants