-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: use dsimp
to remove abstraction overhead of our parsing stage
#225
Conversation
I feel #226 will be useful to debug this test case further. Waiting until it is merged. |
@bollu and I were talking about this, and we are going to explore some alternative setups, probably some mix of simpprocs and custom meta-code, that is hopefully more robust. Then again, if your happiness/sanity points can tolerate dealing with this mess: don't let me discourage you |
Who said that things are broken because of simp-sets being wrong? This test case seems to be independent of the simp sets. I carefully debugged this and it seems this is more likely a lean bug, than a bug in the simp sets. That might be worth discussing, before you go ahead and implement a pile of meta-code. I feel we should first reduce the bug before building solutions to an unclear problem. I am happy to do the reduction. |
I'm not saying the simp set is wrong, this kind of error is frustrating exactly because we do have a simp-lemma that should have rewritten the goal, but hasn't. This also isn't the first time we've had this kind of issue. We've run into It would be nice to know what is causing the current issue we have, and even more amazing if it can be fixed upstream, but I think that regardless, it makes a lot of sense to find a more robust solution. For example, we can have a simp-proc that matches an application of
Great! I wasn't suggesting you shouldn't, just wanted to make you aware of some thoughts we were having |
2c5046c
to
ca96cec
Compare
322e432
to
38574a1
Compare
These theorems will allow us to reason about the context and MVar with less unfolding about low-level theorems. While uses of these theorems are still worked on, the theorems seem to be generally useful so lets upstream them already to keep later patches small. Co-Authored-By : Siddharth Bhat<siddu.druid@gmail.com> These are factored out of #225. Co-authored-by: Siddharth Bhat <siddu.druid@gmail.com>
dsimp
to remove abstraction overhead of our parsing stage
@@ -85,7 +85,7 @@ def getStatement(preamble: List[str], id : int, proof: List[str]) -> str: | |||
|
|||
stmt = name | |||
stmt += msg | |||
stmt += " := by\n simp_alive_undef\n simp_alive_ops\n simp_alive_case_bash\n try alive_auto\n try sorry" | |||
stmt += " := by\n simp_alive_undef\n simp_alive_ops\n simp_alive_case_bash\n try alive_auto\n try sorry\n try sorry" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stmt += " := by\n simp_alive_undef\n simp_alive_ops\n simp_alive_case_bash\n try alive_auto\n try sorry\n try sorry" | |
stmt += " := by\n simp_alive_undef\n simp_alive_ops\n simp_alive_case_bash\n try alive_auto\n all_goals sorry" |
I think all_goals
should already be fine with the case of 0 goals, otherwise we might want all_goals (try sorry)
or some variation thereof
#225 will fix three statements, one of which will introduce multiple goals in `AliveStatements.lean`. This PR makes `AliveStatements.lean` robust against multiple worries by using `all_goals`. Thank you @alexkeizer for proposing this.
I still feel that mvar instantiation should never escape the elaborator. But, since #247 is at the moment still broken, let's merge this PR. Once the alternative does go through, we can deprecate this |
Our current approach, 'change_mlir_context', does this by forcing reduction but does not reach certain subproofs in the goal. As a result, we currently have three failing test cases. By using
dsimp
to remove abstraction overhead from the goal, these abstractions are known to be removed everywhere. While there remains a risk that we miss certain simp lemmas, these can be added as a need arises. @alexkeizer also works on an alternative approach (#247) which might supersede this PR in the future.Interestingly, our alive_case_bash tactic an introduce multiple goals which not always can be closed in AliveStatements. Hence, we add for now a set of two
try sorry
to cover this case. This should be investigate further in subsequent PRs.