Skip to content

Conversation

@bclement-ocp
Copy link
Collaborator

I do not know yet if the proofs still pass, as this seems to be breaking trait resolution somehow. There are many instances (e.g. 08_haystack) where I get errors about Creusot's inability to find an instance for PartialOrdLogic but everything that used to have an OrdLogic instance should still have one, and OrdLogic implies PartialOrdLogic -- so I'm not sure what's going on there...

I do not know yet if the proofs still pass, as this seems to be breaking
trait resolution somehow.  There are many instances (e.g. 08_haystack)
where I get errors about Creusot's inability to find an instance for
PartialOrdLogic but everything that used to have an OrdLogic instance
should still have one, and OrdLogic implies PartialOrdLogic -- so I'm
not sure what's going on there...
@xldenis
Copy link
Collaborator

xldenis commented May 10, 2023

thanks for the PR, I'll take some time to read over during the week and take a look a the problems you faced.

#[ensures(x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater))]
fn cmp_gt_log(x: Self, y: Self);
#[ensures(self.le_log(self))]
fn le_log_refl(self) {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial orders in Rust are not reflexive because of floats.

@jhjourdan
Copy link
Collaborator

We are sorry not to have handled this during one year an a half. Is this still something you want to add? What is your use case?

If you rebase and the issue still exists, I'll be happy to look at it.

@bclement-ocp
Copy link
Collaborator Author

The use case was some code that was working on sets equipped with inclusion. IIRC I got around the issue by defining my own PartialOrder type. I can look at rebasing the PR but I'll probably not have the bandwidth before a couple of weeks or so.

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