-
Notifications
You must be signed in to change notification settings - Fork 715
fix: Meta.Closure: topologically sort abstracted vars #10926
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
Conversation
This PR topologically sorts abstracted vars in `Meta.Closure.mkValueTypeClosure` if MVars are being abstracted. Fixes #10705
|
!bench |
|
Benchmark results for 2cf8794 against efbbb0b are in! @nomeata |
|
Here are the benchmark results for commit 2cf8794. Benchmark Metric Change
==================================================================
+ workspaceSymbols with new ranges branches -1.1% (-43.5 σ)
+ workspaceSymbols with new ranges instructions -1.5% (-46.7 σ) |
|
Reference manual CI status:
|
|
It's not immediately clear to me why a sort is needed here; presumably we could store the variables in the order we visit them or similar (as |
This might be true if we visited the types of fvars before adding them, but the existing code puts them on a separate to-process-queue: let newFVarId ← mkFreshFVarId
pushToProcess ⟨fvarId, newFVarId⟩
return mkFVar newFVarIdThis was introduced in 555a3f0 and I since don't fully understand the implications I’d rather leave it like this. Also, adding the infrastructure to sort these would allow me to make progress on #10723 and then maybe remove the hacks where termination checking has to unfold abstracted proofs. |
|
Mathlib CI status (docs):
|
Co-authored-by: Eric Wieser <[email protected]>
|
Maybe we’ll find a more elegant fix later, but for now this fixes the bug and seems to work. |
This PR topologically sorts abstracted vars in `Meta.Closure.mkValueTypeClosure` if MVars are being abstracted. Fixes leanprover#10705 --------- Co-authored-by: Eric Wieser <[email protected]>
This PR topologically sorts abstracted vars in `Meta.Closure.mkValueTypeClosure` if MVars are being abstracted. Fixes #10705 --------- Co-authored-by: Eric Wieser <[email protected]>
This PR topologically sorts abstracted vars in `Meta.Closure.mkValueTypeClosure` if MVars are being abstracted. Fixes #10705 --------- Co-authored-by: Eric Wieser <[email protected]> (cherry picked from commit a6d50a6)
This PR topologically sorts abstracted vars in `Meta.Closure.mkValueTypeClosure` if MVars are being abstracted. Fixes #10705 --------- Co-authored-by: Eric Wieser <[email protected]> (cherry picked from commit a6d50a6)
This PR topologically sorts abstracted vars in
Meta.Closure.mkValueTypeClosureif MVars are being abstracted.Fixes #10705