Zulip Chat Archive

Stream: general

Topic: Function inequalities


Bhavik Mehta (Jun 23 2022 at 21:59):

Do we have a convention on whether p ≤ q or ∀ a, p a ≤ q a is the preferred spelling? Of course I think we should have both in most cases, but is there something written down somewhere, and if not do people have an idea which is used more commonly in mathlib? (This came up in https://github.com/leanprover-community/mathlib/pull/14827#discussion_r904064035)
(edited to clarify what I'm actually interested in asking)

Eric Wieser (Jun 23 2022 at 22:04):

The fact that we have three different notations for le (→, ⊆, ≤) makes it all a bit unclear regarding which spelling is preferred

Eric Wieser (Jun 23 2022 at 22:05):

Although I think the elaborator often struggles for le on pi types, as f ≤ g is a function in a way that x ≤ y usually isn't

Bhavik Mehta (Jun 23 2022 at 22:06):

True, I suppose what I'm actually interested in is the case p ≤ q vs ∀ a, p a ≤ q a; the linked PR talks about p ≤ q vs ∀ a, p a ⊆ q a, which itself here can be written ∀ a x, x ∈ p a → x ∈ q a

Eric Wieser (Jun 23 2022 at 22:07):

That last spelling (with p a x →q a x) is banned, it abuses sets

Eric Wieser (Jun 23 2022 at 22:08):

∀ a x, x ∈ p a → x ∈ q a is ok

Bhavik Mehta (Jun 23 2022 at 22:08):

oops, corrected

Eric Wieser (Jun 23 2022 at 22:09):

I think for sets it's pretty clear that ⊆ is preferred vs unfolding all the way

Eric Wieser (Jun 23 2022 at 22:10):

The problem with using h : p ≤ q is that it expands as h a : p a ≤ q a instead of p a ⊆ q a, which isn't the form we normally use. Now, if we eliminated ⊆ notation...

Bhavik Mehta (Jun 23 2022 at 22:11):

In the case of sets or finsets, at least

Eric Wieser (Jun 23 2022 at 22:12):

To be clear, your example above is p q : α → set β, right?

Bhavik Mehta (Jun 23 2022 at 22:13):

Exactly, yes


Last updated: Dec 20 2023 at 11:08 UTC