Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - chore(Data): go through remaining porting notes #22907

Closed
wants to merge 2 commits into from

Conversation

Vierkantor
Copy link
Contributor

This PR goes through all porting notes in Mathlib/Data and reviews them. Most of the notes can simply be applied or dropped.


Open in Gitpod

This PR goes through all porting notes in `Mathlib/Data` and reviews them. Most of the notes can simply be applied or dropped.
@Vierkantor Vierkantor added awaiting-CI porting-notes Mathlib3 to Mathlib4 porting notes. t-data Data (lists, quotients, numbers, etc) labels Mar 13, 2025
Copy link

PR summary d566427954

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Cardinal.mk_complex
+ Cardinal.mk_univ_complex
+ instance : Coe SignType α
+ map₂_eq_some_iff
+ pmap_bind_id_eq_pmap_join
- instance : CoeTC SignType α

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.


Decrease in tech debt: (relative, absolute) = (62.23, 0.08)
Current number Change Type
2078 -166 porting notes
1186 -3 erw

Current commit d566427954
Reference commit eaf100acc5

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

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks! 🎉 🧹 🐙

bors merge

-- Porting note: added
inl.injEq, inr.injEq, reduceCtorEq]
)
rintro (a | a) (b | b) (c | c) <;> simp)
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Mar 14, 2025
mathlib-bors bot pushed a commit that referenced this pull request Mar 14, 2025
This PR goes through all porting notes in `Mathlib/Data` and reviews them. Most of the notes can simply be applied or dropped.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 14, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore(Data): go through remaining porting notes [Merged by Bors] - chore(Data): go through remaining porting notes Mar 14, 2025
@mathlib-bors mathlib-bors bot closed this Mar 14, 2025
@mathlib-bors mathlib-bors bot deleted the porting-notes-Data-remainder branch March 14, 2025 06:42
Vierkantor added a commit that referenced this pull request Mar 15, 2025
This fixes two major performance regressions I accidentally introduced in #22907:

* in `Data.PFun`, `aesop` was very slow to prove a goal, restore manual proof
* in `Data.Sign`, I turned a `CoeTC SignType ɑ` instance into `Coe SignType ɑ` (since `CoeTC` is an implementation detail), but this would mean that for any coercion to `ɑ` we'd try `SignType` as an intermediate step. Instead make it a `CoeTail` so it would only be applied as a fallback.
Vierkantor added a commit that referenced this pull request Mar 17, 2025
This fixes two major performance regressions I accidentally introduced in #22907:

* in `Data.PFun`, `aesop` was very slow to prove a goal, restore manual proof
* in `Data.Sign`, I turned a `CoeTC SignType ɑ` instance into `Coe SignType ɑ` (since `CoeTC` is an implementation detail), but this would mean that for any coercion to `ɑ` we'd try `SignType` as an intermediate step. Instead make it a `CoeTail` so it would only be applied as a fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
porting-notes Mathlib3 to Mathlib4 porting notes. ready-to-merge This PR has been sent to bors. t-data Data (lists, quotients, numbers, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants