Skip to content

feat: Set.ReflOn, Set.SymmOn - #663

Merged
chenson2018 merged 7 commits into
mainfrom
chenson2018/rel-on-only
Jun 21, 2026
Merged

feat: Set.ReflOn, Set.SymmOn#663
chenson2018 merged 7 commits into
mainfrom
chenson2018/rel-on-only

Conversation

@chenson2018

Copy link
Copy Markdown
Collaborator

A first pass at adding definitions corresponding to the concept of having some property of a (homogeneous) relation over a set restriction, as discussed in this thread. I also add lemmas of_{cod,dom} for convenience of working in the "constructive" case where we explicitly are given the relation as evidence of the (co)domain.

@chenson2018
chenson2018 requested a review from fmontesi as a code owner June 19, 2026 10:45
Comment thread Cslib/Foundations/Relation/Defs.lean Outdated
/-- `RightQuasiRefl r` is true when a relation `r` is reflexive on its codomain. -/
abbrev RightQuasiRefl (r : α → α → Prop) := (cod r).ReflOn r

/-- `SymmOn s r` ts true when a relation `r` is symmetric on its restriction to a set `s`. -/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ts -> is.

Rest looks good to me.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'll wait a bit to merge in case there's any comments on Zulip.

@[simp, grind =] lemma mem_cod : b ∈ cod r ↔ ∃ a, r a b := .rfl

theorem of_dom (hab : r a b) : a ∈ dom r := by grind
theorem of_cod (hab : r a b) : b ∈ cod r := by grind

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this naming is a little confusing to me — doesn't the convention usually read "of_{hypothesis}" where here it's "of_{conclusion}" — otherwise lgtm :)

@chenson2018
chenson2018 added this pull request to the merge queue Jun 21, 2026
Merged via the queue into main with commit f03afdc Jun 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants