This repository was archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 294
feat(order/minimal): Image of maximals
under a rel_embedding
#17017
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -140,6 +140,35 @@ begin | |||||||||
rwa of_not_not (λ hab, ht ha (h hb) hab hr), | ||||||||||
end | ||||||||||
|
||||||||||
lemma image_maximals {α β : Type*} {r : α → α → Prop} {s : β → β → Prop} (f : α → β) | ||||||||||
(t : set α) (h₁ : ∀ x y ∈ t, r x y ↔ s (f x) (f y)) : | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this hypothesis ought to be
Suggested change
|
||||||||||
f '' maximals r t = maximals s (f '' t) := | ||||||||||
begin | ||||||||||
ext, | ||||||||||
split, | ||||||||||
{ rintros ⟨x, hx, rfl⟩, | ||||||||||
refine ⟨⟨_, hx.1, rfl⟩, _⟩, | ||||||||||
rintros _ ⟨y, hy, rfl⟩ e, | ||||||||||
exact (h₁ _ hy _ hx.1).mp (hx.2 hy ((h₁ _ hx.1 _ hy).mpr e)) }, | ||||||||||
Comment on lines
+151
to
+152
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's a minor golf, up to you.
Suggested change
|
||||||||||
{ rintros ⟨⟨x, hx, rfl⟩, h⟩, | ||||||||||
refine ⟨x, ⟨hx, _⟩, rfl⟩, | ||||||||||
rintros y hy e, | ||||||||||
exact (h₁ _ hy _ hx).mpr (h ⟨y, hy, rfl⟩ ((h₁ _ hx _ hy).mp e)) } | ||||||||||
Comment on lines
+154
to
+156
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's a golf.
Suggested change
|
||||||||||
end | ||||||||||
|
||||||||||
lemma image_minimals {α β : Type*} {r : α → α → Prop} {s : β → β → Prop} (f : α → β) | ||||||||||
(t : set α) (h₁ : ∀ x y ∈ t, r x y ↔ s (f x) (f y)) : | ||||||||||
f '' minimals r t = minimals s (f '' t) := | ||||||||||
image_maximals f t (λ x hx y hy, h₁ y hy x hx) | ||||||||||
|
||||||||||
lemma rel_embedding.image_maximals {α β : Type*} {r : α → α → Prop} {s : β → β → Prop} | ||||||||||
(f : r ↪r s) (t : set α) : f '' maximals r t = maximals s (f '' t) := | ||||||||||
image_maximals f t (λ _ _ _ _, f.map_rel_iff.symm) | ||||||||||
|
||||||||||
lemma rel_embedding.image_minimals {α β : Type*} {r : α → α → Prop} {s : β → β → Prop} | ||||||||||
(f : r ↪r s) (t : set α) : f '' minimals r t = minimals s (f '' t) := | ||||||||||
f.swap.image_maximals t | ||||||||||
|
||||||||||
variables [partial_order α] | ||||||||||
|
||||||||||
lemma is_least.mem_minimals (h : is_least s a) : a ∈ minimals (≤) s := ⟨h.1, λ b hb _, h.2 hb⟩ | ||||||||||
|
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.
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.
You can take advantage of existing
variables
, and it might even make sense to move some more of these to thevariables
line at the top of the file.