Zulip Chat Archive

Stream: general

Topic: set.preimage notation trouble


Kevin Buzzard (Jul 14 2020 at 10:17):

import data.set.basic

example (X Y : Type) (f : X  Y) (S : set (set Y)) : set (set X) :=
--(f⁻¹')'' S -- doesn't work
-- set.image (set.preimage f) S -- works
-- (set.preimage f) '' S -- works
sorry

I can't get the set.preimage notation to work with this set-up, even with type ascriptions: set.image ((f⁻¹') : (set Y → set X)) S doesn't work for me. What am I doing wrong?

Mario Carneiro (Jul 14 2020 at 10:18):

This just came up with the conversation about sections. Use (⁻¹') f '' S

Mario Carneiro (Jul 14 2020 at 10:19):

although I personally find set.preimage f '' S easier to follow

Patrick Massot (Jul 14 2020 at 10:36):

and even easier with parentheses

Mario Carneiro (Jul 14 2020 at 10:38):

I guess I'm used to application having higher precedence than binary operators :shrug:


Last updated: Dec 20 2023 at 11:08 UTC