Repository navigation
Conversation
PR summary f610de377bImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
linarith? suggestions to the correct hypotheses. linarith? suggestions to the correct hypotheses
|
!radar |
|
Benchmark results for 433a341 against b2933a1 are in. No significant results found. @kbuzzard
Small changes (3🟥)
|
|
!bench |
|
Benchmark results for 8660a75 against c20efc8 are in. No significant results found. @kbuzzard
Small changes (5🟥)
|
…ses. unLinarith returned indices into the post-preprocessing fact list, but linarithUsedHyps applies them to the pre-preprocessing hypothesis list, so linarith? could suggest the wrong hypotheses or fail outright. Fixed this by tagging each fact with the indices of the original hypotheses it was derived from (TaggedProof), threaded through all preprocessors.
8660a75 to
3edbf81
Compare
|
!bench |
|
Benchmark results for 3edbf81 against 5aedf73 are in. No significant results found. @sharky564
Small changes (4🟥)
|
|
!bench |
|
Benchmark results for fa937c6 against 5aedf73 are in. No significant results found. @sharky564
Small changes (2🟥)
|
|
This pull request has conflicts, please merge |
# Conflicts: # Mathlib/Tactic/Linarith/Frontend.lean
|
!bench |
|
Benchmark results for ff55115 against 726a7f1 are in. No significant results found. @sharky564
Small changes (3🟥)
|
|
This pull request has conflicts, please merge |
# Conflicts: # Mathlib/Tactic/Linarith/Frontend.lean # MathlibTest/Tactic/Linarith/Basic.lean
joneugster
left a comment
There was a problem hiding this comment.
Thanks for the fix!
The overall strategy of tagging each expression with it's origin seems reasonable to me.
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by joneugster. |
runLinarithreturned indices into the post-preprocessing fact list, butlinarithUsedHypsapplies them to the pre-preprocessing hypothesis list, solinarith?could suggest the wrong hypotheses or fail outright. Fixed this by tagging each fact with the indices of the original hypotheses it was derived from (TaggedProof), threaded through all preprocessors.This addresses and closes the issue raised in #41471.
This was broken because the old code passed indices of a list around, without updating when the list was modified by preprocessor dropped, split or synthesised facts. No index-fix could recover this, besides just carrying through the index. Keeping the
Origina set rather than a single index is necessary since preprocessors can combine hypotheses. However this does mean the preprocessors no longer act onExprs but ratherTaggedProofs - I'm not the greatest fan of this, but I couldn't come up with an easy solution that preserved this behaviour. I've also provided additional tests which highlight the issues that would've previously arisen.AI disclosure:
I did have AI assistance (Claude Opus/Fable) with this, but this was for me to learn more Lean syntax not typically seen in writing proofs. The diagnosis and idea for the solution was mine, and debugging and documentation was with AI assistance.