-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support implications as rewrite rules #2155
Comments
In theory you should be able to do that (AIUI) but it has to match the goal at the saw-core level, and there's many reasons it might not. You can use Unfortunately they probably don't match, and then it's very difficult to wrangle this stuff. You can start a proof-script repl with |
Hmm, I think I misunderstood. I can't even get it to accept the initial lemma (I get
) let alone actually rewrite with it, which after sleeping on it I think is probably/possibly also not supported (since simpsets are intended for autorewriting) ...so the issue is not that you tried this and it should work, but it didn't go and it isn't clear why (since that is certainly a something that could happen) but that it isn't even expected to work. (But it seems like it should.) Is that right? |
here's a related standalone example:
|
There's a hack to get the effect of conditional rewriting like this, that we used (or tried to use; I forget exactly) in some of the BLST proofs a few years ago. The trick is to make an unconditional rewrite rule, but prevent it from looping on itself. So we define a function
then state your fact
as an unconditional rewrite:
The Here's an example proof:
where because of the rewriting we can prove without using the definitions of f and g. Admittedly this is a gross hack, and having real support for conditional rewriting would be much better. |
Suppose you have a conditional rewrite rule that only holds for arguments in a certain range:
SAW could use it as a rewrite rule if it finds a matching predicate of an enclosing implication, which e.g. might be due to a given precondition.
Perhaps there’s already another way to do these kinds of transformations with SAW?
The text was updated successfully, but these errors were encountered: