Zulip Chat Archive

Stream: maths

Topic: ZFC pair rename


Violeta Hernández (Jan 26 2023 at 23:54):

I want to rename the Kuratowski pair docs#Set.pair to something like Set.kpair, since otherwise there's ambiguity in theorem names between {x, y} and pair x y. Is this ok?

Violeta Hernández (Jan 26 2023 at 23:54):

@Mario Carneiro

Mario Carneiro (Jan 26 2023 at 23:54):

IMO the name "pair" is better suited to the ordered pair than the unordered pair

Mario Carneiro (Jan 26 2023 at 23:55):

and this is a more important distinction than kuratowski pair (unless we want to have other kinds of ordered pair)

Violeta Hernández (Jan 26 2023 at 23:56):

Well, pair is used for {x, y} elsewhere in mathlib, such as docs#set.pair_comm or docs#set.image_pair

Violeta Hernández (Jan 26 2023 at 23:57):

To be clear this is entirely a theorem naming issue, I don't plan on adding other kinds of pairs atm

Violeta Hernández (Jan 27 2023 at 00:01):

I would argue that the Kuratowski ordered pair is somewhat less "fundamental" than the more general unordered pair, hence its renaming.

Violeta Hernández (Jan 27 2023 at 00:01):

The best alternative I have is to just add tildes on the Kuratowski theorems

Mario Carneiro (Jan 27 2023 at 00:03):

we don't even have a definition for the unordered pair, so I don't see how that is the case

Mario Carneiro (Jan 27 2023 at 00:03):

it's just insert insert empty

Yaël Dillies (Jan 27 2023 at 00:10):

{x, y} is sometimes also called doubleton

Patrick Johnson (Jan 27 2023 at 04:44):

I'd vote "pair" for ordered and "upair" for unordered.

Violeta Hernández (Jan 27 2023 at 06:10):

Let me give a concrete example of a name clash.

theorem sUnion_pair (x y : Set.{u}) : ⋃₀ ({x, y} : Set.{u}) = x  y := sorry

theorem sUnion_pair' (x y : Set.{u}) : ⋃₀ (pair x y) = {x, y} := sorry

Violeta Hernández (Jan 27 2023 at 06:11):

The former matches docs#set.sUnion_pair. The latter is a lemma I need to prove to define the projection functions.

Violeta Hernández (Jan 27 2023 at 06:18):

If renaming the Kuratowski pair is not an option, then I suggest we use tildes on the Kuratowski lemmas in case of name clashing.

Violeta Hernández (Jan 27 2023 at 06:18):

Renaming pair throughout Mathlib seems overkill

Violeta Hernández (Jan 27 2023 at 06:19):

(That said, I could get behind standardizing pair / doubleton)

Mario Carneiro (Jan 27 2023 at 06:32):

I don't see any reason to rename pair throughout mathlib

Patrick Johnson (Jan 27 2023 at 09:41):

⋃₀ (pair x y) = {x, y} does not hold for all models of ordered pair and the fact that we use Kuratowski's model seems arbitrary. If you need that specific model to prove something, why not define a new function (for example def kpair x y := pair x y)

Violeta Hernández (Jan 30 2023 at 00:34):

Patrick Johnson said:

If you need that specific model to prove something, why not define a new function (for example def kpair x y := pair x y)

Why not just rename pair directly?

Violeta Hernández (Jan 30 2023 at 00:36):

It's not that I want that specific model to prove something, but rather that I am proving something about that specific model, namely that the aforementioned projection functions work.

Patrick Johnson (Jan 30 2023 at 07:31):

I'm not against renaming pair to kpair, but I think we should have model agnostic definition of ordered pair such as this:

def pair : Set.{u}  Set.{u}  Set.{u} :=
classical.epsilon $ λ f,  a b c d, f a b = f c d  a = c  b = d

Patrick Johnson (Jan 30 2023 at 07:31):

That's just my opinion. Others may disagree.

Violeta Hernández (Jan 30 2023 at 18:47):

I don't really see what we would get out of this.

Violeta Hernández (Jan 30 2023 at 18:47):

Besides, to get things done, we'd still need to prove the existence of such a set function

Patrick Johnson (Jan 30 2023 at 20:14):

As I said, that's just my opinion. Personally, I dislike the idea of being able to prove statements that are true for some models of ordered pair, but not for the others, as the name pair should not imply any particular model. Just like I would be unhappy if I could prove 5 ∈ 7, since that would reveal the underlying model of natural numbers.

If you want to know what others think, try opening a poll.

Kevin Buzzard (Jan 30 2023 at 20:19):

I guess there are plenty of examples of people abusing definitional equality in mathlib, and those are also examples of statements which are true for some implementation of a concept but not for others. I'm not expressing an opinion about pair though.

Mario Carneiro (Jan 30 2023 at 21:14):

This is ZFC we're talking about. It is basically a theorem that every construction exposes implementation details (there are no nontrivial automorphisms of V)

Antoine Chambert-Loir (Feb 04 2023 at 17:55):

Everytime a French mathematician reads something about "ordered pair", a kitten dies in pain in the heart of their soul… (The French terminology is couple (ordered)/paire (unordered), but we'll have to cope with that.) On the other hand, whatever a pair is, preferably unordered, the other variant should have a clearly distinct name.


Last updated: Dec 20 2023 at 11:08 UTC