I was trying out this PR and I still get some issues with combining lossless with hoare to get phoare.
I don't know why, but this is the pattern that fails with invalid goal:
require import AllCore FMap.
module Foo = {
proc foo(i :int, a : (int,int) fmap) = {
a.[i] <- oget a.[i] + 1;
return a;
}
}.
lemma foo_ll : islossless Foo.foo by islossless.
lemma foo_h _i _a :
hoare [ Foo.foo : i = _i /\ a = _a ==>
forall j, j<>_i => _a.[j] = res.[j]] by proc;auto;smt(FMap.get_setE).
lemma foo_p _i _a : phoare [ Foo.foo : i = _i /\ a = _a ==>
forall j, j<>_i => _a.[j] = res.[j]] = 1%r
by conseq foo_ll (foo_h _i _a).
_Originally posted by @mbbarbosa in https://github.com/EasyCrypt/easycrypt/pull/837#issuecomment-3619981606_