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

TODO: unify disjoint #199

Open
johoelzl opened this issue Jul 16, 2018 · 7 comments
Open

TODO: unify disjoint #199

johoelzl opened this issue Jul 16, 2018 · 7 comments
Labels
docs This PR is about documentation enhancement

Comments

@johoelzl
Copy link
Collaborator

johoelzl commented Jul 16, 2018

Introduce disjoint on has_mem and unify the list, multiset, finset instances. The finset instance would be generalized by removing the requirement for decidable_eq

@spl
Copy link
Collaborator

spl commented Jul 16, 2018

Just curious what your idea is. This would be a different definition from the root disjoint in data/set/lattice.lean?

def disjoint (a b : α) : Prop := a ⊓ b = ⊥

Would you define something like this?

def disjoint [has_mem α γ] (s t : γ) : Prop := ∀ ⦃a : α⦄, a ∈ s → a ∈ t → false

How does this affect the finset disjoint?

@digama0
Copy link
Member

digama0 commented Jul 16, 2018

I changed the definition of disjoint in my local copy to s \cap t <= \bot, which works much better with existing definitions in list and multiset and set. I'll push it soonish and then we can fiddle some more if it's still not working well.

@johoelzl
Copy link
Collaborator Author

It would generalize disjoint on finset, as it would require anymore decidable_eq

@semorrison
Copy link
Collaborator

@digama0, did you ever push your change mentioned above?

1 similar comment
@jcommelin
Copy link
Member

@digama0, did you ever push your change mentioned above?

@eric-wieser
Copy link
Member

@eric-wieser
Copy link
Member

Perhaps we should leave this open as a "document why we use in the definition" issue

@eric-wieser eric-wieser reopened this Apr 12, 2022
@eric-wieser eric-wieser added the docs This PR is about documentation label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This PR is about documentation enhancement
Projects
None yet
Development

No branches or pull requests

6 participants