Skip to content

[Merged by Bors] - Prove that the diameter of a Euclidean ball is twice its radius.#32824

Closed
Vilin97 wants to merge 24 commits into
leanprover-community:masterfrom
uw-math-ai:uw-math-ai
Closed

[Merged by Bors] - Prove that the diameter of a Euclidean ball is twice its radius.#32824
Vilin97 wants to merge 24 commits into
leanprover-community:masterfrom
uw-math-ai:uw-math-ai

Conversation

@Vilin97

@Vilin97 Vilin97 commented Dec 13, 2025

Copy link
Copy Markdown
Collaborator

feat(Analysis/InnerProductSpace/EuclideanDist): prove that the diameter of a sphere and a ball is twice its radius

All lemmas and theorems: Metric.diam_sphere_eq, Metric.diam_closedBall_eq', Metric.diam_ball_eq. Also, fold a variable declaration inside convexHull_sphere_eq_closedBall.

@Aristotle-Harmonic gave the initial version of the proofs (with many aesops and using v4.24). Leo Mayer and I restructured and cleaned them up.

Co-authored-by: Leo Mayer [email protected] and @Aristotle-Harmonic

Open in Gitpod

@github-actions github-actions Bot added new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-analysis Analysis (normed *, calculus) labels Dec 13, 2025
@github-actions

github-actions Bot commented Dec 13, 2025

Copy link
Copy Markdown

PR summary 975952b53f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Metric.diam_ball_eq
+ Metric.diam_closedBall_eq
+ Metric.diam_sphere_eq

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

@github-actions

Copy link
Copy Markdown

🚨 PR Title Needs Formatting

Please update the title to match our commit style conventions.

Errors from script:

error: the PR title does not contain a colon
Details on the required title format

The title should fit the following format:

<kind>(<optional-scope>): <subject>

<kind> is:

  • feat (feature)
  • fix (bug fix)
  • doc (documentation)
  • style (formatting, missing semicolons, ...)
  • refactor
  • test (when adding missing tests)
  • chore (maintain)
  • perf (performance improvement, optimization, ...)
  • ci (changes to continuous integration, repo automation, ...)

<optional-scope> is a name of module or a directory which contains changed modules.
This is not necessary to include, but may be useful if the <subject> is insufficient.
The Mathlib directory prefix is always omitted.
For instance, it could be

  • Data/Nat/Basic
  • Algebra/Group/Defs
  • Topology/Constructions

<subject> has the following constraints:

  • do not capitalize the first letter
  • no dot(.) at the end
  • use imperative, present tense: "change" not "changed" nor "changes"

@Vilin97 Vilin97 requested a review from urkud December 13, 2025 03:04
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
@Vilin97 Vilin97 requested a review from themathqueen December 15, 2025 02:06
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
@Vilin97 Vilin97 requested a review from themathqueen December 16, 2025 08:30

@themathqueen themathqueen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, maybe add Aristotle as a co-author since it provided the initial proofs?

Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
@Vilin97 Vilin97 requested a review from themathqueen December 16, 2025 10:01
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
@Vilin97

Vilin97 commented Dec 16, 2025

Copy link
Copy Markdown
Collaborator Author

@themathqueen , just want to say thank you for your review! I learned several things, e.g. that when I the lemma starts with a namespace, it automatically opens it, so I don't have to use Metric. in the proof body.

Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
Comment thread Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean Outdated
@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Dec 16, 2025
@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Dec 17, 2025
@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Dec 18, 2025
@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Dec 18, 2025
@Vilin97 Vilin97 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Dec 18, 2025
@Vilin97 Vilin97 requested a review from j-loreaux December 21, 2025 10:27

@j-loreaux j-loreaux 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.

please also add a comment to the PR description explaining why the other code is moving within the file. Arguably that should be a separate PR, but I'm not going to force it.

Comment thread Mathlib/Analysis/Normed/Module/RCLike/Real.lean Outdated
@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Dec 22, 2025
@github-actions github-actions Bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Dec 22, 2025
@Vilin97 Vilin97 requested a review from j-loreaux December 22, 2025 23:10
@Vilin97 Vilin97 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Dec 22, 2025
@Vilin97

Vilin97 commented Dec 22, 2025

Copy link
Copy Markdown
Collaborator Author

I moved the lemmas, removed the import following your suggestion, and instead of moving the lemma in Convex simply folded the variable in the lemma statement, which results in a smaller change.

@j-loreaux

Copy link
Copy Markdown
Contributor

I've contributed a lot here, so I won't merge it myself.

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by j-loreaux.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Dec 22, 2025
Comment thread Mathlib/Analysis/Normed/Module/Convex.lean Outdated
@sgouezel

Copy link
Copy Markdown
Contributor

bors r+

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Dec 24, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Dec 24, 2025
)

feat(Analysis/InnerProductSpace/EuclideanDist): prove that the diameter of a sphere and a ball is twice its radius
 
All lemmas and theorems: `Metric.diam_sphere_eq`, `Metric.diam_closedBall_eq'`, `Metric.diam_ball_eq`. Also, fold a `variable` declaration inside `convexHull_sphere_eq_closedBall`.

@Aristotle-Harmonic gave the initial version of the proofs (with many `aesop`s and using v4.24). Leo Mayer and I restructured and cleaned them up.

Co-authored-by: Leo Mayer [email protected] and @Aristotle-Harmonic
@mathlib-bors

mathlib-bors Bot commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title Prove that the diameter of a Euclidean ball is twice its radius. [Merged by Bors] - Prove that the diameter of a Euclidean ball is twice its radius. Dec 24, 2025
@mathlib-bors mathlib-bors Bot closed this Dec 24, 2025
kim-em pushed a commit to kim-em/mathlib4 that referenced this pull request Jan 6, 2026
…nprover-community#32824)

feat(Analysis/InnerProductSpace/EuclideanDist): prove that the diameter of a sphere and a ball is twice its radius
 
All lemmas and theorems: `Metric.diam_sphere_eq`, `Metric.diam_closedBall_eq'`, `Metric.diam_ball_eq`. Also, fold a `variable` declaration inside `convexHull_sphere_eq_closedBall`.

@Aristotle-Harmonic gave the initial version of the proofs (with many `aesop`s and using v4.24). Leo Mayer and I restructured and cleaned them up.

Co-authored-by: Leo Mayer [email protected] and @Aristotle-Harmonic
goliath-klein pushed a commit to PrParadoxy/mathlib4 that referenced this pull request Jan 24, 2026
…nprover-community#32824)

feat(Analysis/InnerProductSpace/EuclideanDist): prove that the diameter of a sphere and a ball is twice its radius
 
All lemmas and theorems: `Metric.diam_sphere_eq`, `Metric.diam_closedBall_eq'`, `Metric.diam_ball_eq`. Also, fold a `variable` declaration inside `convexHull_sphere_eq_closedBall`.

@Aristotle-Harmonic gave the initial version of the proofs (with many `aesop`s and using v4.24). Leo Mayer and I restructured and cleaned them up.

Co-authored-by: Leo Mayer [email protected] and @Aristotle-Harmonic
@grunweg grunweg added the LLM-generated PRs with substantial input from LLMs - review accordingly label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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! ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants