Zulip Chat Archive
Stream: Is there code for X?
Topic: Equivalence Relation on a subset
Floris van Doorn (Jul 12 2024 at 13:26):
Do we have something like this?
/-- An equivalence relation on the set `s`. -/
structure EquivalenceOn {α : Type*} (r : α → α → Prop) (s : Set α) : Prop where
/-- An equivalence relation is reflexive: `x ~ x` -/
refl : ∀ x ∈ s, r x x
/-- An equivalence relation is symmetric: `x ~ y` implies `y ~ x` -/
symm : ∀ {x y}, x ∈ s → y ∈ s → r x y → r y x
/-- An equivalence relation is transitive: `x ~ y` and `y ~ z` implies `x ~ z` -/
trans : ∀ {x y z}, x ∈ s → y ∈ s → z ∈ s → r x y → r y z → r x z
Yaël Dillies (Jul 12 2024 at 13:29):
Pretty sure that we don't. If we did, then probably docs#JoinedIn would be using it
Last updated: May 02 2025 at 03:31 UTC