[Merged by Bors] - feat(Geometry/Euclidean): nine-point circle#34420
[Merged by Bors] - feat(Geometry/Euclidean): nine-point circle#34420wwylele wants to merge 13 commits intoleanprover-community:masterfrom
Conversation
PR summary 725d7a32b7Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
There was a problem hiding this comment.
Pull request overview
This PR implements the nine-point circle for triangles and its higher-dimensional analogue, the 3(n+1)-point sphere for simplices in Euclidean geometry. The implementation follows the reference paper by Małgorzata Buba-Brzozowa and is mentioned in MongePoint.lean but was not previously implemented.
Changes:
- Adds the
ninePointCircledefinition for a simplex, defining the center and radius based on the Euler line construction - Defines
eulerPointas points that the nine-point circle passes through - Proves that the nine-point circle passes through face centroids, Euler points, and (for triangles) altitude feet
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think we should have a definition of |
|
A much more ambitious goal, that definitely wouldn't be for this PR but would be nice to have in mathlib eventually, would be to prove Feuerbach's theorem, which is one of the missing entries on the 100-theorems list. Feuerbach is genuinely specific to triangles (it's not true in general for simplices in higher dimensions), and could be stated as |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
maintainer merge |
|
🚀 Pull request has been placed on the maintainer queue by jsm28. |
vihdzp
left a comment
There was a problem hiding this comment.
Mostly just small orthographic fixes.
Co-authored-by: Violeta Hernández Palacios <vi.hdz.p@gmail.com>
Co-authored-by: Violeta Hernández Palacios <vi.hdz.p@gmail.com>
Co-authored-by: Violeta Hernández Palacios <vi.hdz.p@gmail.com>
Co-authored-by: Violeta Hernández Palacios <vi.hdz.p@gmail.com>
Co-authored-by: Violeta Hernández Palacios <vi.hdz.p@gmail.com>
Co-authored-by: Violeta Hernández Palacios <vi.hdz.p@gmail.com>
|
|
||
| @[simp] | ||
| theorem mongePoint_restrict {n : ℕ} (s : Simplex ℝ P n) (S : AffineSubspace ℝ P) | ||
| (hS : affineSpan ℝ (Set.range s.points) ≤ S) : |
There was a problem hiding this comment.
Really this condition should be:
(hS : Set.range s.points ⊆ S) :but I see that this pattern goes all the way back to Affine.Simplex.restrict so the issue is orthogonal to the content of this PR.
However I do think we should explore changing Affine.Simplex.restrict to:
def restrict {n : ℕ} (s : Affine.Simplex k P n) (S : AffineSubspace k P)
(hS : Set.range s.points ⊆ S) :
have : Nonempty S := .map (fun i ↦ ⟨s.points i, hS <| Set.mem_range_self i⟩) inferInstance
Affine.Simplex (V := S.direction) k S n :=
have : Nonempty S := .map (fun i ↦ ⟨s.points i, hS <| Set.mem_range_self i⟩) inferInstance
{ points i := ⟨s.points i, hS <| Set.mem_range_self i⟩
independent := AffineIndependent.of_comp S.subtype s.independent }and propagating this change.
There was a problem hiding this comment.
We discussed what the hypothesis should look like in #25172 which originally added Affine.Simplex.restrict, and the likely value of being able to use le_rfl in a common use case. The main awkward thing with the current design is it generally seems to be necessary to give a Nonempty hypothesis explicitly at sites of use.
There was a problem hiding this comment.
Thanks, I remember that conversation now. I think the case for Eric's suggestion is stronger now that we see there is a growing cost to the complexity of downstream lemma statements.
There was a problem hiding this comment.
I'd rather revisit the idea of removing Nonempty from AddTorsor (thus enabling even empty affine subspaces to have an AddTorsor instance and hopefully removing the need to construct a Nonempty instance here at all) and instead putting Nonempty hypotheses on just those lemmas about torsors that really need the mathematical notion of a torsor rather than what we might call a pretorsor.
|
Pull request successfully merged into master. Build succeeded: |
I saw there is a reference to 3(n+1) Point Sphere in MongePoint.lean but no implementation for it, so I decided to fill the gap.