Zulip Chat Archive
Stream: Is there code for X?
Topic: specializing forall to a set
Eric Rodriguez (Sep 14 2021 at 09:47):
example {α} (s : set α) {p : α → Prop} : (∀ a, p a) → ∀ a ∈ s, p a
I know by tauto will obviously do it, but I feel like this would be nice to apply without having to have ... by [some annoying rws], tauto and so on
Yaël Dillies (Sep 14 2021 at 09:51):
Note that you can view this as getting α → γ from α → β → γ by dropping the second argument.
Yaël Dillies (Sep 14 2021 at 09:52):
λ h a b, h a is, I think, a reasonable solution.
Eric Rodriguez (Sep 14 2021 at 09:54):
hmm, but what if s and p are fairly long? just judicious use of underscores?
Yaël Dillies (Sep 14 2021 at 09:54):
Yes :smiling_face:
Eric Wieser (Sep 14 2021 at 10:44):
Can you give more of a mwe? I can't see how the length of s and p would matter here
Last updated: May 02 2025 at 03:31 UTC