This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 298
feat(logic/relation): auxiliary forall_exists_rel
relation
#18713
Open
vihdzp
wants to merge
3
commits into
master
Choose a base branch
from
forall_exists_rel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vihdzp
added
awaiting-review
The author would like community review of the PR
modifies-synchronized-file
This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR.
labels
Apr 2, 2023
YaelDillies
reviewed
Apr 2, 2023
Comment on lines
+658
to
+666
/-- | ||
`forall_exists_rel r s t` says that for every `s i` there is some `t j` such that `r (s i) (t j)`, | ||
and for every `t j` there is some `s i` such that `r (s i) (t j)`. | ||
|
||
This finds use as an auxilary definition when defining relations on quotients of families `ι → α` by | ||
extensionality. | ||
-/ | ||
def forall_exists_rel {ι₁ ι₂ α₁ α₂ : Type*} (r : α₁ → α₂ → Prop) (s : ι₁ → α₁) (t : ι₂ → α₂) := | ||
(∀ i, ∃ j, r (s i) (t j)) ∧ ∀ j, ∃ i, r (s i) (t j) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know about relator.bi_total
?
Suggested change
/-- | |
`forall_exists_rel r s t` says that for every `s i` there is some `t j` such that `r (s i) (t j)`, | |
and for every `t j` there is some `s i` such that `r (s i) (t j)`. | |
This finds use as an auxilary definition when defining relations on quotients of families `ι → α` by | |
extensionality. | |
-/ | |
def forall_exists_rel {ι₁ ι₂ α₁ α₂ : Type*} (r : α₁ → α₂ → Prop) (s : ι₁ → α₁) (t : ι₂ → α₂) := | |
(∀ i, ∃ j, r (s i) (t j)) ∧ ∀ j, ∃ i, r (s i) (t j) | |
/-- | |
`forall_exists_rel r s t` says that for every `s i` there is some `t j` such that `r (s i) (t j)`, | |
and for every `t j` there is some `s i` such that `r (s i) (t j)`. | |
This finds use as an auxilary definition when defining relations on quotients of families `ι → α` by | |
extensionality. | |
-/ | |
def forall_exists_rel {ι₁ ι₂ α₁ α₂ : Type*} (r : α₁ → α₂ → Prop) (s : ι₁ → α₁) (t : ι₂ → α₂) := | |
relator.bi_total $ λ i j, r (s i) (t j) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about it. All of these lemmas could probably be turned into simpler lemmas for bi_total
. I'll try to clean up the file and add these results.
YaelDillies
reviewed
Apr 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't need to introduce a new definition.
eric-wieser
added
awaiting-author
A reviewer has asked the author a question or requested changes
and removed
awaiting-review
The author would like community review of the PR
labels
Apr 2, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
awaiting-author
A reviewer has asked the author a question or requested changes
modifies-synchronized-file
This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR.
too-late
This PR was ready too late for inclusion in mathlib3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This can be used to golf both the pre-game API and the ZFC set API.
Co-authored-by: @negiizhao egresf@gmail.com