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

perf: isDefEq performance issue #3807

Merged
merged 3 commits into from
Mar 30, 2024
Merged

perf: isDefEq performance issue #3807

merged 3 commits into from
Mar 30, 2024

Conversation

leodemoura
Copy link
Member

Fixes a performance problem found by @hargoniX while working on LeanSAT.

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc March 30, 2024 00:12 Inactive
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Mar 30, 2024
@leodemoura leodemoura added this pull request to the merge queue Mar 30, 2024
Merged via the queue into master with commit d8d64f1 Mar 30, 2024
11 checks passed
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 2, 2024
This proof had two `change`s added during porting, and these produce a massive timeout after the changes in leanprover/lean4#3807.

This PR replace the `change` with the appropriate `erw`, and is now fast before and after the change.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
kim-em added a commit that referenced this pull request Apr 6, 2024
kim-em added a commit that referenced this pull request Apr 6, 2024
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 10, 2024
These proofs will become slow after leanprover/lean4#3807, but with these changes there is no regression. 🤷‍♀️

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Louddy pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 15, 2024
This proof had two `change`s added during porting, and these produce a massive timeout after the changes in leanprover/lean4#3807.

This PR replace the `change` with the appropriate `erw`, and is now fast before and after the change.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Louddy pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 15, 2024
These proofs will become slow after leanprover/lean4#3807, but with these changes there is no regression. 🤷‍♀️

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
atarnoam pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 16, 2024
This proof had two `change`s added during porting, and these produce a massive timeout after the changes in leanprover/lean4#3807.

This PR replace the `change` with the appropriate `erw`, and is now fast before and after the change.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
atarnoam pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 16, 2024
These proofs will become slow after leanprover/lean4#3807, but with these changes there is no regression. 🤷‍♀️

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Apr 18, 2024
These proofs will become slow after leanprover/lean4#3807, but with these changes there is no regression. 🤷‍♀️

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Apr 18, 2024
This is the PR to `bump/v4.8.0`, bringing us up from
`nightly-2024-03-24` to `nightly-2024-04-07` (so almost two weeks).

Note that the release of v4.8.0-rc1 has been delayed because of
remaining issues:

This PR contains a number of `set_option maxHeartbeats ...` or `@[nolint
simpNF]` which are required by heartbeats errors.

These are due to changes to `IsDefEq` from
leanprover/lean4#3807.

So far, the ones I've looked in detail have revealed some problems where
we are probably abusing defeq a bit, so I would appreciate any available
eyes on these to see which ones ought to be fixed in Mathlib, and which
ones are problematic.

It's been a long road to keep `nightly-testing` alive, and some big
refactors have been landing on `master`, and I'm sure there are mistakes
in how I've merged things here, so please be gentle if I've messed
things up (and in particular feel free to revert changes that look like
mistakes, as long as you test them!). :-)

---------

Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Co-authored-by: María Inés de Frutos-Fernández <mariaines.dff@gmail.com>
Co-authored-by: María Inés de Frutos-Fernández <88536493+mariainesdff@users.noreply.github.com>
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Co-authored-by: Johan Commelin <johan@commelin.net>
uniwuni pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 19, 2024
This proof had two `change`s added during porting, and these produce a massive timeout after the changes in leanprover/lean4#3807.

This PR replace the `change` with the appropriate `erw`, and is now fast before and after the change.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
uniwuni pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 19, 2024
These proofs will become slow after leanprover/lean4#3807, but with these changes there is no regression. 🤷‍♀️

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
leodemoura pushed a commit that referenced this pull request Apr 21, 2024
github-merge-queue bot pushed a commit that referenced this pull request Apr 22, 2024
This is intended to fail at present: it just adds a test case containing
a minimization of a Mathlib slowdown from #3807.

Prior to #3807, the declaration `exists_algHom_adjoin_of_splits'''` at
the end of the file would take around 16,000 heartbeats. Now it takes
around 210,000 heartbeats.

---------

Co-authored-by: Leonardo de Moura <leomoura@amazon.com>
callesonne pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 22, 2024
This proof had two `change`s added during porting, and these produce a massive timeout after the changes in leanprover/lean4#3807.

This PR replace the `change` with the appropriate `erw`, and is now fast before and after the change.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
callesonne pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 22, 2024
These proofs will become slow after leanprover/lean4#3807, but with these changes there is no regression. 🤷‍♀️

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant