Skip to content

[Merged by Bors] - feat: subscript and superscript delaborators#23018

Closed
gio256 wants to merge 33 commits intomasterfrom
gio/subscript
Closed

[Merged by Bors] - feat: subscript and superscript delaborators#23018
gio256 wants to merge 33 commits intomasterfrom
gio/subscript

Conversation

@gio256
Copy link
Copy Markdown
Collaborator

@gio256 gio256 commented Mar 17, 2025

We add the functions delabSubscript and delabSuperscript in the Mathlib.Tactic namespace. These delaborators are triggered only if the entirety of the provided expression can be subscripted (respectively, superscripted).

The delaborators are not exhaustive, in that they will not successfully delaborate every expression that is valid in a subscript or superscript. We instead aim to make them overly conservative, so that any expression which is successfully delaborated must be subscriptable (or superscriptable).


This PR is intended to serve as a predecessor to #20719.

Open in Gitpod

@gio256 gio256 added WIP Work in progress t-meta Tactics, attributes or user commands labels Mar 17, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2025

PR summary fb95ea212c

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Nat'
+ Nat'.γ
+ delabSubscript
+ delabSuperscript

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

@gio256 gio256 removed the WIP Work in progress label Mar 19, 2025
gio256 added a commit that referenced this pull request Mar 19, 2025
@gio256 gio256 added the infinity-cosmos This PR is associated with Infinity Cosmos project label Mar 19, 2025
@eric-wieser eric-wieser requested a review from digama0 March 19, 2025 18:30
Copy link
Copy Markdown
Contributor

@joneugster joneugster left a comment

Choose a reason for hiding this comment

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

The delaborator look good to me, thanks!

I suggest

maintainer merge

@github-actions
Copy link
Copy Markdown

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

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 17, 2025
@kmill
Copy link
Copy Markdown
Contributor

kmill commented May 1, 2025

Thanks! Sorry this took so long to get through review.

For sake of not adding any more delay, I took the liberty of pushing some changes to preserve the intent of using decl_name%. The point of it is to ensure that the parser kinds are unique (small detail: it's ``superscript, not `superscript, which causes it to refer to Mathlib.Tactic.superscript). The PR is now more clearly adding delaborators without needing to touch parsers.

If the changes are to your satisfaction, please go ahead and merge! I'm delegating to you @gio256.

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented May 1, 2025

✌️ gio256 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 delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels May 1, 2025
@gio256
Copy link
Copy Markdown
Collaborator Author

gio256 commented May 1, 2025

Thanks!

bors merge

mathlib-bors bot pushed a commit that referenced this pull request May 1, 2025
We add the functions `delabSubscript` and `delabSuperscript` in the `Mathlib.Tactic` namespace. These delaborators are triggered only if the entirety of the provided expression can be subscripted (respectively, superscripted).

The delaborators are not exhaustive, in that they will not successfully delaborate every expression that is valid in a subscript or superscript. We instead aim to make them overly conservative, so that any expression which is successfully delaborated must be subscriptable (or superscriptable).



Co-authored-by: Kyle Miller <kmill31415@gmail.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented May 1, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: subscript and superscript delaborators [Merged by Bors] - feat: subscript and superscript delaborators May 1, 2025
@mathlib-bors mathlib-bors bot closed this May 1, 2025
@mathlib-bors mathlib-bors bot deleted the gio/subscript branch May 1, 2025 16:40
riccardobrasca pushed a commit that referenced this pull request May 7, 2025
We add the functions `delabSubscript` and `delabSuperscript` in the `Mathlib.Tactic` namespace. These delaborators are triggered only if the entirety of the provided expression can be subscripted (respectively, superscripted).

The delaborators are not exhaustive, in that they will not successfully delaborate every expression that is valid in a subscript or superscript. We instead aim to make them overly conservative, so that any expression which is successfully delaborated must be subscriptable (or superscriptable).



Co-authored-by: Kyle Miller <kmill31415@gmail.com>
tannerduve pushed a commit that referenced this pull request May 13, 2025
We add the functions `delabSubscript` and `delabSuperscript` in the `Mathlib.Tactic` namespace. These delaborators are triggered only if the entirety of the provided expression can be subscripted (respectively, superscripted).

The delaborators are not exhaustive, in that they will not successfully delaborate every expression that is valid in a subscript or superscript. We instead aim to make them overly conservative, so that any expression which is successfully delaborated must be subscriptable (or superscriptable).



Co-authored-by: Kyle Miller <kmill31415@gmail.com>
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). infinity-cosmos This PR is associated with Infinity Cosmos project t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants