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

Any interval contains the empty interval #48

Closed
simon-keith opened this issue Nov 18, 2020 · 3 comments
Closed

Any interval contains the empty interval #48

simon-keith opened this issue Nov 18, 2020 · 3 comments
Labels
question Issue is a question

Comments

@simon-keith
Copy link

import portion as p

print(p.closed(0, 1).contains(p.empty()))

The above prints True, meaning than any interval contains the empty interval. Is that intended?

@simon-keith
Copy link
Author

I think it actually makes sense mathematically, I just wanted to make sure.

@AlexandreDecan AlexandreDecan added the question Issue is a question label Nov 18, 2020
@AlexandreDecan
Copy link
Owner

Hello,

You're right, the empty interval is contained in all (possibly empty as well) intervals, by definition.

@simon-keith
Copy link
Author

Ok, thank you for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants