This repository was archived by the owner on Jul 24, 2024. It is now read-only.
feat(logic/relation): auxiliary forall_exists_rel relation - #18713
Open
vihdzp wants to merge 3 commits into
Open
feat(logic/relation): auxiliary forall_exists_rel relation#18713vihdzp wants to merge 3 commits into
forall_exists_rel relation#18713vihdzp wants to merge 3 commits into
Conversation
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) |
Collaborator
There was a problem hiding this comment.
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) |
Collaborator
Author
There was a problem hiding this comment.
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
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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