-
Notifications
You must be signed in to change notification settings - Fork 170
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
Changes in support of an F* fix removing eta equivalence #442
Conversation
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.
Thanks!
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.
Thanks for this very technical proof...
A couple questions:
- @aseemr you changed the precondition of C.Loops.while ... is this related? does this mean that preconditions should always be eta-expanded from here on? any guidelines we can communicate to HACL* developers would be helpful
- a lot of the proof steps are done "by tactic"... is this cosmetic, a personal preference, or is there some deep reason for these proofs to be performed with e.g.
l_to_r
?
Thanks!
Jonathan
FYI this build failed because of:
but I assume this will start working once the F* change lands? |
Hi Jonathan, yes that eta expansion is related. The way the precondition is written in C.Loops is The failure is because the proof requires some changes that Nik did in F* |
Thanks... so if the function requires Will it always be a typing error from here on, or just in certain cases? (If it's the former, it's a surprising enough change that I should send a heads-up to other HACL folks who may not be following such F* changes closely.) |
That particular proof is quite technical. It does require a tactic to rewrite with propositional extensionality, then refinement-type equality, at depth. SMT-based proofs cannot do that. This kind of thing shouldn't come up very often. |
It also has to do with the |
Ah I see. Barely anyone uses |
I was using |
Weird, I'm seeing failures now in Hacl.Impl.Exponentiation that I wasn't seeing before. Will take a look later this evening. |
|
||
////////////////////////////////////////////////////////// |
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.
Thanks Marina! I would never have figured this out myself. Much appreciated!
This PR is in anticipation of a fix for an unsoundness landing in F* master soon. @aseemr and I have been working on it.
F* no longer supports eta equivalence, since it is incompatible with functional extensionality and subtyping.
On the plus side, F* has become more extensional: functional extensionality is actually provable now, rather than being an axiom.
This means however, that proofs that were relying on eta equivalence need to be revised. The main change in this PR is to a proof in LoopCombinators that was relying on eta and propositional extensionality in a rather tricky way. The code comment there has an explanation.
I expect the change to F* to land later today or tomorrow. If you approve, I can push the merge button at the right time to synchronize with the F* change.
Thanks!