Zulip Chat Archive

Stream: mathlib4

Topic: arbitrary relations


Anthony Bordg (Jul 17 2024 at 08:32):

Consider an arbitrary relation RT×SR \xhookrightarrow{} T\times S between a pair of sets (or classes) TT and SS. I have the impression that the philosophy behind mathlib is to use types instead of sets, like this.

universe u v

variable {α : Type u} {β : Type v}

variable (R : α  β  Prop)

Is it correct?

Ruben Van de Velde (Jul 17 2024 at 08:33):

If I understand the question correctly, yes

Anthony Bordg (Jul 17 2024 at 08:37):

And then to talk about an element of the set or class of subsets of TT, one directly consider an element I : Set α?

Anthony Bordg (Jul 17 2024 at 08:45):

Ruben Van de Velde said:

If I understand the question correctly, yes

Just to be clear, an alternative would be

universe u v

variable {α : Type u} {β : Type v} {T : Set α} {S : Set β}

variable (R : T  S  Prop)

and then to consider ITI \subset T or IP(T)I \in \mathcal{P}(T), but I don't think it's the correct way to proceed in mathlib.

Daniel Weber (Jul 17 2024 at 12:35):

Note that the first approach is more general thanks to the coercion from Set to Type


Last updated: May 02 2025 at 03:31 UTC