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

Add support for a join Semilattice #14

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

SimonVervisch
Copy link

Currently supports following properties:

  • associativity
  • commutativity
  • identity

Implemented an example with tests. This example implements a set (which uses union).

Future improvements:
This example could be extended in the future to implement a merge semilattice, which uses intersection for the join. And combine them into a full lattice

fn identity(&self) -> Self;
}

pub trait JoinSemiLattice: Join {}
Copy link
Member

Choose a reason for hiding this comment

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

You might look at a blanket implementation here when the traits are satisfied.

Copy link
Author

@SimonVervisch SimonVervisch Dec 23, 2024

Choose a reason for hiding this comment

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

impl<T: Join> JoinSemiLattice for T {}
Like this? (For all types T)?

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.

2 participants