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

Create library note explaining seemingly redundant fintype and decidable arguments. #14275

Open
kmill opened this issue May 20, 2022 · 1 comment

Comments

@kmill
Copy link
Collaborator

kmill commented May 20, 2022

Although fintype and decidable are (sub)singletons, since different instances are not definitionally equal, it's useful to have instance arguments that are seemingly redundant. For example:

lemma to_finset_inter {α : Type*} [decidable_eq α] (s t : set α) [fintype (s ∩ t : set α)]
  [fintype s] [fintype t] : (s ∩ t).to_finset = s.to_finset ∩ t.to_finset

The [fintype (s ∩ t : set α)] instance is inferrable from either of the other two, but to make sure this lemma is maximally applicable each fintype instance should be its own parameter.

This pattern should be documented somewhere, possibly as a library note.

@vihdzp
Copy link
Collaborator

vihdzp commented May 24, 2022

Surely it's still a good idea to have the stronger variants separately as lemmas rather than instances, right?

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

2 participants