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

refactor: do not try rfl in mkEqnTypes in WF.mkEqns #4047

Merged
merged 3 commits into from
May 2, 2024

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented May 1, 2024

when dealing with well-founded recursive definitions, tryURefl isn't
going to be that useful and possibly slow. So disable that code path
when doing well-founded recursion.

(This is a variant of #4025 where I tried using with_reducible to
limit the impact of slow unfolding, but if we can get away with
disabling it complete, then even better.)

nomeata added 3 commits April 29, 2024 14:26
it seems to help with problems that arise in #4002, so I am curious
about its effects (if any) on its own.

It could lead to
 * faster `mkEqnTypes`, if in the well-founded case the `tryURefl` never
   hits (in which case we should probaby skip that altogether)
 * more fine-grained equational lemams, if the `tryURefl` did trigger
when dealing with well-founded recursive definitions, `tryURefl` isn't
going to be that useful and possibly slow. So disable that code path
when doing well-founded recursion.

(This is a variant of #4025 where I tried using `with_reducible` to
limit the impact of slow unfolding, but if we can get away with
disabling it complete, then even better.)
@nomeata nomeata changed the title joachim/eqnTypes no rfl refactor: do not try rfl in mkEqnTypes in WF.mkEqns May 1, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc May 1, 2024 20:23 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 May 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request May 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request May 1, 2024
@nomeata
Copy link
Collaborator Author

nomeata commented May 1, 2024

!bench

@nomeata
Copy link
Collaborator Author

nomeata commented May 1, 2024

@nomeata nomeata marked this pull request as ready for review May 1, 2024 21:29
@nomeata nomeata added the will-merge-soon …unless someone speaks up label May 1, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc May 1, 2024 21:32 Inactive
@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 4606f1a.
There were no significant changes against commit 83c139f.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label May 1, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented May 1, 2024

Mathlib CI status (docs):

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc May 1, 2024 21:43 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request May 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request May 1, 2024
@nomeata nomeata added this pull request to the merge queue May 2, 2024
Merged via the queue into master with commit b470eb5 May 2, 2024
24 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN will-merge-soon …unless someone speaks up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants