Skip to content
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

=~= not doing its thing on a simple Option; maybe an extensionality problem for additive types? #701

Closed
jonhnet opened this issue Jul 24, 2023 · 2 comments

Comments

@jonhnet
Copy link
Collaborator

jonhnet commented Jul 24, 2023

In the before file, Verus fails to prove this extensional equality:

        assert( post.iptr(ptr) =~= PagedJournal_v::JournalRecord::discard_old_journal_rec(self.iptr(ptr), lsn) );

In the after file, I "fix" it by beginning a manual proof of extensional equality on the branches of the Option. Once I prove that the Option legs match, Verus is happy.

2023-07-24-15-01-48.zip
2023-07-24-15-01-54.zip

@utaal
Copy link
Collaborator

utaal commented Jul 25, 2023

#[verifier::ext_equal] was missing on the specification for core::option::Option (#707), but I think this function suffers from instability; adding and removing #[verifier::spinoff_prover] changes the outcome.

@utaal
Copy link
Collaborator

utaal commented Jul 25, 2023

It seems verus usually needs

        assert(post.iptr(ptr).is_Some() == PagedJournal_v::JournalRecord::discard_old_journal_rec(self.iptr(ptr), lsn).is_Some());

to prove extensional equality. Can you spell out the argument why this is true? (which definitions / lemmas this comes from)

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

No branches or pull requests

2 participants