Skip to content

feat(Geometry/Euclidean/Angle): the unoriented angle at the center in terms of the angle at the circumference#41123

Open
Scarlett-le wants to merge 2 commits into
leanprover-community:masterfrom
Scarlett-le:inscribed-angle-unoriented
Open

feat(Geometry/Euclidean/Angle): the unoriented angle at the center in terms of the angle at the circumference#41123
Scarlett-le wants to merge 2 commits into
leanprover-community:masterfrom
Scarlett-le:inscribed-angle-unoriented

Conversation

@Scarlett-le

@Scarlett-le Scarlett-le commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Adds the unoriented counterpart of Sphere.oangle_center_eq_two_zsmul_oangle ("the angle at the
center of a circle is twice the angle at the circumference") to
Mathlib/Geometry/Euclidean/Angle/Sphere.lean. Since the unoriented angle at the center lies in
[0, π] while twice the angle at the circumference ranges over [0, 2π], two lemmas are needed,
splitting at a right angle at the circumference:

  • Sphere.angle_center_eq_two_mul_angle_of_two_mul_angle_le_pi: when twice the angle at the
    circumference is at most π, the angle at the center equals twice it;
  • Sphere.angle_center_eq_two_pi_sub_two_mul_angle_of_pi_le_two_mul_angle: when it is at least π,
    the angle at the center equals 2 * π minus twice it.

Dependencies

@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown

PR summary 6246b7289d

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ angle_center_eq_two_mul_angle_of_two_mul_angle_le_pi
+ angle_center_eq_two_pi_sub_two_mul_angle_of_pi_le_two_mul_angle

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)

Lean-aware diff — post-build, computed from the Lean environment (commit 6246b72).

  • +2 new declarations
  • −0 removed declarations
+EuclideanGeometry.Sphere.angle_center_eq_two_mul_angle_of_two_mul_angle_le_pi
+EuclideanGeometry.Sphere.angle_center_eq_two_pi_sub_two_mul_angle_of_pi_le_two_mul_angle

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 6246b7289d
Reference commit 88d006abbc

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

@github-actions github-actions Bot added the t-euclidean-geometry Affine and axiomatic geometry label Jun 28, 2026
Comment thread Mathlib/Geometry/Euclidean/Angle/Sphere.lean Outdated
@felixpernegger

Copy link
Copy Markdown
Contributor

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 28, 2026
@Scarlett-le

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 29, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jun 30, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…41143)

Adds three lemmas to `Mathlib/Geometry/Euclidean/Sphere/Basic.lean`.

- `Sphere.ne_center_of_mem_of_mem_of_ne`: a point of a sphere that differs
  from another point of the sphere is not its center. Extracted at a
  reviewer's suggestion; this fact was reproved inline four times across
  #41121 and #41123.

- `norm_vsub_center_eq_radius`: for a point `p` on a sphere `s`,
  `‖p -ᵥ s.center‖ = s.radius`. This pattern occurs ten times in #34164 and
  four more times in the present file (twice in `inner_vsub_center_vsub_pos`
  and twice in `Sphere.dist_center_lt_radius_of_sbtw`); those four in-file
  occurrences are golfed to use it here.

- `Sphere.center_mem_affineSpan_pair_iff_isDiameter`: for two distinct points
  of a sphere, the center lies on the line through them if and only if those
  points are the endpoints of a diameter.

No mathematical content changes; the existing proofs are only shortened.

Co-authored-by: Scarlett-le <735979178@qq.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
@mathlib-dependent-issues mathlib-dependent-issues Bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 1, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

@mathlib-merge-conflicts

Copy link
Copy Markdown

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

@mathlib-merge-conflicts mathlib-merge-conflicts 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 Jul 1, 2026
@Scarlett-le
Scarlett-le force-pushed the inscribed-angle-unoriented branch from 8ea45f6 to 6246b72 Compare July 2, 2026 03:01
@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 Jul 2, 2026
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Jul 4, 2026
…eanprover-community#41143)

Adds three lemmas to `Mathlib/Geometry/Euclidean/Sphere/Basic.lean`.

- `Sphere.ne_center_of_mem_of_mem_of_ne`: a point of a sphere that differs
  from another point of the sphere is not its center. Extracted at a
  reviewer's suggestion; this fact was reproved inline four times across
  leanprover-community#41121 and leanprover-community#41123.

- `norm_vsub_center_eq_radius`: for a point `p` on a sphere `s`,
  `‖p -ᵥ s.center‖ = s.radius`. This pattern occurs ten times in leanprover-community#34164 and
  four more times in the present file (twice in `inner_vsub_center_vsub_pos`
  and twice in `Sphere.dist_center_lt_radius_of_sbtw`); those four in-file
  occurrences are golfed to use it here.

- `Sphere.center_mem_affineSpan_pair_iff_isDiameter`: for two distinct points
  of a sphere, the center lies on the line through them if and only if those
  points are the endpoints of a diameter.

No mathematical content changes; the existing proofs are only shortened.

Co-authored-by: Scarlett-le <735979178@qq.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
michaellee94 pushed a commit to michaellee94/mathlib4 that referenced this pull request Jul 11, 2026
…eanprover-community#41143)

Adds three lemmas to `Mathlib/Geometry/Euclidean/Sphere/Basic.lean`.

- `Sphere.ne_center_of_mem_of_mem_of_ne`: a point of a sphere that differs
  from another point of the sphere is not its center. Extracted at a
  reviewer's suggestion; this fact was reproved inline four times across
  leanprover-community#41121 and leanprover-community#41123.

- `norm_vsub_center_eq_radius`: for a point `p` on a sphere `s`,
  `‖p -ᵥ s.center‖ = s.radius`. This pattern occurs ten times in leanprover-community#34164 and
  four more times in the present file (twice in `inner_vsub_center_vsub_pos`
  and twice in `Sphere.dist_center_lt_radius_of_sbtw`); those four in-file
  occurrences are golfed to use it here.

- `Sphere.center_mem_affineSpan_pair_iff_isDiameter`: for two distinct points
  of a sphere, the center lies on the line through them if and only if those
  points are the endpoints of a diameter.

No mathematical content changes; the existing proofs are only shortened.

Co-authored-by: Scarlett-le <735979178@qq.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
@jsm28

jsm28 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What are the type class hypotheses on the new theorems? It looks to me like they're in a section of the file with assumptions of both Fact (finrank ℝ V = 2) and Module.Oriented ℝ V (Fin 2), meaning the statements will end up depending implicitly on a choice of orientation even though that choice ought to be made only inside the proof without the statements depending on it. (The hypothesis of being two-dimensional is genuinely needed, and probably more useful for most applications than a more general version that just requires the three points to be coplanar with the center of the sphere.) So I think this should be moved to an unoriented section of the file and instead made to choose an orientation only internally inside the proofs, not as a hypothesis of the theorems (something that would be more convenient given #39696).

@jsm28 jsm28 added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 20, 2026
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. t-euclidean-geometry Affine and axiomatic geometry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants