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

Expand set-logic capabilities to use additional laws to simplify defineComparison requirements #7

Open
justinbmeyer opened this issue Apr 26, 2018 · 0 comments

Comments

@justinbmeyer
Copy link
Contributor

Currently, one needs to define a union, intersection, difference and reverse difference between two set types. One should also define the difference between the universal set and the set type:

defineComparison(TypeA, TypeB,{union, intersection, difference})
defineComparison(TypeB, TypeA, {difference})
defineComparison(set.UNIVERSAL, TypeA, {difference})

There's some set algebra laws that could simplify these requirements:

  • B \ A = Aᶜ ∩ B - If UNIVERSAL \ TypeA is defined and the type of that result TypeC has an intersection with TypeB, then TypeB \ TypeA doesn't need to be defined.
  • A ∩ B = A \ (A \ B) - Intersection doesn't need to be defined if the difference between TypeA and the result of (TypeA \ TypeB) is defined.
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

1 participant