Skip to content

[Merged by Bors] - feat: custom elaborators for TangentSpace and tangentMap(Within)#36155

Closed
grunweg wants to merge 16 commits into
leanprover-community:masterfrom
grunweg:tangentspace-elaborators
Closed

[Merged by Bors] - feat: custom elaborators for TangentSpace and tangentMap(Within)#36155
grunweg wants to merge 16 commits into
leanprover-community:masterfrom
grunweg:tangentspace-elaborators

Conversation

@grunweg

@grunweg grunweg commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

And use these to golf the differential geometry files a bit further.


Open in Gitpod

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown

PR summary 2c951fc10b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ instance : RiemannianBundle (fun (x : F) ↦ TangentSpace% x)
- instance : RiemannianBundle (fun (x : F) ↦ TangentSpace 𝓘(ℝ, F) x)

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

  • +3 new declarations
  • −0 removed declarations
+Manifold.«termTangentMap%__»
+Manifold.«termTangentMap[_]__»
+Manifold.«termTangentSpace%__»

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 2c951fc10b
Reference commit 6923f2f175

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-differential-geometry Manifolds etc label Mar 4, 2026
@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 Mar 6, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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

@grunweg grunweg force-pushed the tangentspace-elaborators branch from 7e6190d to ca1ba65 Compare March 7, 2026 12:46
@grunweg grunweg removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 7, 2026
@grunweg grunweg changed the title feat: custom elaborators for TangentSpace, tangentMap and tangentMapW… feat: custom elaborators for TangentSpace and tangentMap(Within) Mar 7, 2026
@sgouezel sgouezel removed their assignment Mar 31, 2026

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

Modulo ~15 lines of meta code and a question about tests this is all fine.

We'll need to find another reviewer for the meta code though.

Comment thread Mathlib/Geometry/Manifold/Notation.lean Outdated
@ocfnash ocfnash removed their assignment Apr 1, 2026
@ocfnash ocfnash added the t-meta Tactics, attributes or user commands label Apr 1, 2026
@grunweg grunweg force-pushed the tangentspace-elaborators branch from ca1ba65 to 3741e4f Compare April 13, 2026 12:14
Comment thread Mathlib/Geometry/Manifold/Notation.lean Outdated
trying to determine `I` and `J` from the local context. -/
scoped elab:max "tangentMap[" s:term "]" ppSpace f:term:arg : term => do
let es ← Term.elabTerm s none
let ef ← ensureIsFunction <|← Term.elabTerm f none

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.

I think that a better approach than ensureIsFunction <|← Term.elabTerm _ none would be to propagate the expected type in the elaboration, and use elabTermEnsuringType (which should fill in the function coercion).

But that extra complication need not be part of this PR.

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.

Let's leave that to a follow-up PR: if so, all other elaborators should be changed similarly.

@joneugster joneugster added the awaiting-author A reviewer has asked the author a question or requested changes. label May 14, 2026
@grunweg grunweg removed the awaiting-author A reviewer has asked the author a question or requested changes. label May 27, 2026
@grunweg grunweg removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 3, 2026
@JovanGerb

Copy link
Copy Markdown
Contributor

Is your plan to add corresponding delaborators in the future?

@grunweg

grunweg commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Is your plan to add corresponding delaborators in the future?

Yes - doing this for all elaborators where this is missing is part of @scholzhannah's master's thesis :-)

@JovanGerb

Copy link
Copy Markdown
Contributor

Ok, thanks!

maintainer merge

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by JovanGerb.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jun 3, 2026
@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 Jun 5, 2026
@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 Jun 5, 2026
@grunweg grunweg temporarily deployed to cache-upload-forks June 5, 2026 22:11 — with GitHub Actions Inactive
@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 Jun 11, 2026
@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 Jun 14, 2026

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

Thanks, sorry we were so slow here!

bors merge

@mathlib-triage mathlib-triage Bot 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 Jun 15, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jun 15, 2026
)

And use these to golf the differential geometry files a bit further.
@mathlib-bors

mathlib-bors Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat: custom elaborators for TangentSpace and tangentMap(Within) [Merged by Bors] - feat: custom elaborators for TangentSpace and tangentMap(Within) Jun 15, 2026
@mathlib-bors mathlib-bors Bot closed this Jun 15, 2026
@grunweg grunweg deleted the tangentspace-elaborators branch June 15, 2026 11:55
felixpernegger pushed a commit to felixpernegger/mathlib4 that referenced this pull request Jun 16, 2026
…nprover-community#36155)

And use these to golf the differential geometry files a bit further.
gasparattila pushed a commit to gasparattila/mathlib4 that referenced this pull request Jun 16, 2026
…nprover-community#36155)

And use these to golf the differential geometry files a bit further.
xroblot pushed a commit to xroblot/mathlib4 that referenced this pull request Jun 18, 2026
…nprover-community#36155)

And use these to golf the differential geometry files a bit further.
ReemMelamed pushed a commit to ReemMelamed/mathlib4 that referenced this pull request Jun 20, 2026
…nprover-community#36155)

And use these to golf the differential geometry files a bit further.
bryangingechen pushed a commit to jcommelin/mathlib4 that referenced this pull request Jun 22, 2026
…nprover-community#36155)

And use these to golf the differential geometry files a bit further.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-differential-geometry Manifolds etc t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants