Skip to content

[Merged by Bors] - feat(Geometry/Euclidean/Incenter): orthRadius lemmas - #31733

Closed
jsm28 wants to merge 18 commits into
leanprover-community:masterfrom
jsm28:incenter_orthRadius
Closed

jsm28 wants to merge 18 commits into
leanprover-community:masterfrom
jsm28:incenter_orthRadius

Conversation

@jsm28

@jsm28 jsm28 commented Nov 17, 2025 •

Copy link
Copy Markdown
Contributor

Add lemmas, in the case where the dimensions are such that the simplex spans the whole space, exspheres are not merely tangent to the faces but the faces are the full tangent spaces (orthRadius).


Open in Gitpod

Add a lemma about the interaction of `map` and `mk'` for affine subspaces:

```lean
lemma map_mk' (p : P₁) (direction : Submodule k V₁) :
    (mk' p direction).map f = mk' (f p) (direction.map f.linear) := by
```
Add a lemma about mapping orthogonal complements under a `LinearIsometryEquiv`:

```lean
lemma map_orthogonal (f : E ≃ₗᵢ[𝕜] F) : Kᗮ.map f = (K.map f)ᗮ := by
```
Add further lemmas about tangency, the common theme of which is that
they relate in some way to `orthRadius` (the full tangent space rather
than only a subspace thereof). In particular, give its `finrank` in a
finite-dimensional space and describe tangent spaces that have that
`finrank`, and, not limited to a finite-dimensional space, the two
tangent spaces that are parallel to a given `orthRadius` space.
Add lemmas, in the case where the dimensions are such that the simplex
spans the whole space, exspheres are not merely tangent to the faces
but the faces are the full tangent spaces (`orthRadius`).
@jsm28 jsm28 added the t-euclidean-geometry Affine and axiomatic geometry label Nov 17, 2025
@github-actions

github-actions Bot commented Nov 17, 2025 •

Copy link
Copy Markdown

PR summary b07a5845d5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ ExcenterExists.affineSpan_faceOpposite_eq_orthRadius
+ affineSpan_faceOpposite_eq_orthRadius_insphere
+ affineSpan_pair_eq_orthRadius
+ affineSpan_pair_eq_orthRadius_insphere

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/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).

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Nov 17, 2025
@mathlib4-merge-conflict-bot mathlib4-merge-conflict-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 19, 2025
@mathlib4-merge-conflict-bot

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 19, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Nov 20, 2025

@ocfnash ocfnash left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One suggestion, which I encourage you to consider, but I am content to let you decide.

Otherwise LGTM, thanks!

bors d+

Comment on lines +664 to +665
affineSpan ℝ (Set.range (s.faceOpposite i).points) =
(s.exsphere signs).orthRadius (s.touchpoint signs i) := by

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bearing in mind that Affine.Simplex.range_faceOpposite_points carries simp, what do you think of making the statement here:

Suggested change
affineSpan ℝ (Set.range (s.faceOpposite i).points) =
(s.exsphere signs).orthRadius (s.touchpoint signs i) := by
affineSpan ℝ (s.points '' {i}ᶜ) = (s.exsphere signs).orthRadius (s.touchpoint signs i) := by

I note the lemma will need renaming if we do this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think range_faceOpposite_points is only really a good simp lemma in certain contexts where the set of points matters more than the involvement of the face in the API. Rather than (a) changing the single lemma here to use the particular value of the set of points, or (b) making such a change globally, if we want to put more lemmas in simp normal form in that regard then I think the right approach would be (c) implement Simplex.span as was suggested in passing in discussion in #23752 and then move all statements involving the span of a simplex to use that definition. (But we should get #30853 in before adding any such new Simplex.span API, given the size of conflicts that would otherwise result for places referring to the span of a simplex.)

Comment on lines +672 to +674
lemma affineSpan_faceOpposite_eq_orthRadius_insphere [Fact (Module.finrank ℝ V = n)]
(i : Fin (n + 1)) :
affineSpan ℝ (Set.range (s.faceOpposite i).points) = s.insphere.orthRadius (s.touchpoint ∅ i) :=

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we do opt for the spelling above, then this should be able to carry the simp attribute:

Suggested change
lemma affineSpan_faceOpposite_eq_orthRadius_insphere [Fact (Module.finrank ℝ V = n)]
(i : Fin (n + 1)) :
affineSpan ℝ (Set.range (s.faceOpposite i).points) = s.insphere.orthRadius (s.touchpoint ∅ i) :=
@[simp] lemma affineSpan_points_compl_eq_orthRadius_insphere [Fact (Module.finrank ℝ V = n)]
(i : Fin (n + 1)) :
affineSpan ℝ (s.points '' {i}ᶜ) = s.insphere.orthRadius (s.touchpoint ∅ i) :=

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think this (translating from a purely affine reference to the span of a face, to something involving the insphere which you might not care about at all in that context) would be a good simp lemma. The reverse direction would be more plausible as a simp lemma, but I still think it would be too contextual whether "span of face" or "tangent at touchpoint" is the form that is wanted.

@mathlib-bors

mathlib-bors Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

✌️ jsm28 can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Dec 10, 2025
@jsm28

jsm28 commented Dec 10, 2025

Copy link
Copy Markdown
Contributor Author

bors r+

mathlib-bors Bot pushed a commit that referenced this pull request Dec 10, 2025
Add lemmas, in the case where the dimensions are such that the simplex spans the whole space, exspheres are not merely tangent to the faces but the faces are the full tangent spaces (`orthRadius`).
@mathlib-bors

mathlib-bors Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Geometry/Euclidean/Incenter): orthRadius lemmas [Merged by Bors] - feat(Geometry/Euclidean/Incenter): orthRadius lemmas Dec 10, 2025
@mathlib-bors mathlib-bors Bot closed this Dec 10, 2025
@jsm28
jsm28 deleted the incenter_orthRadius branch December 10, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-euclidean-geometry Affine and axiomatic geometry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants