Skip to content

Conversation

@namasikanam
Copy link
Collaborator

@namasikanam namasikanam commented Jan 20, 2026

The second goal generated from byehoare is unsound, in which the procedure arguments are bound in a free memory.

This is a small bug introduced in #789 . We need to bind the precondition to the memory in probability expression.

Thank @lyonel2017 for helping fix this bug.

@namasikanam namasikanam requested a review from oskgo January 20, 2026 17:19
@oskgo
Copy link
Contributor

oskgo commented Jan 20, 2026

Nice catch.

There's still a bug though:

require import Real Xreal.

module M = {
  proc main(x : bool) = {
    return x; 
  }
}.

lemma L1 (&m: {arg: bool}): !arg{m} =>
  Pr [ M.main(true) @ &m : true] <= 0%r.
proof.
move => arg_eq.
byehoare (_: (!arg{m})%xr ==> _) => //.
proc; auto. by rewrite arg_eq.
qed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants