|
Hello, I succeed to prove this little example: But, if I failed to prove the following variant, using predefined operations on sequences instead of my own predicates: It seems that invariant preservation on subsequences cannot be proved. (When, I replace the above "==" over sequences by "ext_eq", all invariant initializations are proved, but no preservation yet). Sorry, I am still not used to interactive proof debugging with why3. Thus, I do not understand what is happening here. Another question on this example: if we use a |
Replies: 3 comments 5 replies
|
Actually, I would also like to play with this other variant, purely based on (mutable) iterators: Do you think possible to reason on such a combination of iterators in Creusot ? |
Likely you are facing issues with SMT, they can be quite sensitive to formulation of properties. I'll take a look now. |
This is a tricky thing about |
Thanks a lot. Your trick of using ghost code to make the proof progress is cute: it reminds me Coq :).
And this shows me how to prove the invariants based on
subsequencewith postcondition, modulo one single admitted fact:But, I needed to use
ext_eqinstead of==on sequences. And the version withsubsequencein invariants induced a lot of pain (i.e. ghost code to help the proof). See main.rs.gzFinally, my first version above is the simp…