Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants