-
Notifications
You must be signed in to change notification settings - Fork 298
feat(order/minimal): Image of maximals
under a rel_embedding
#17017
Conversation
erdOne
commented
Oct 16, 2022
@@ -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 : α → β) |
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 the variables
line at the top of the file.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this hypothesis ought to be h
, and the hypothesis in the proof ought to be h'
or h₁
or hf
.
(t : set α) (h₁ : ∀ x y ∈ t, r x y ↔ s (f x) (f y)) : | |
(t : set α) (h : ∀ x y ∈ t, r x y ↔ s (f x) (f y)) : |
rintros _ ⟨y, hy, rfl⟩ e, | ||
exact (h₁ _ hy _ hx.1).mp (hx.2 hy ((h₁ _ hx.1 _ hy).mpr e)) }, |
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.
Here's a minor golf, up to you.
rintros _ ⟨y, hy, rfl⟩ e, | |
exact (h₁ _ hy _ hx.1).mp (hx.2 hy ((h₁ _ hx.1 _ hy).mpr e)) }, | |
rintros _ ⟨y, hy, rfl⟩, | |
exact (h₁ _ hy _ hx.1).mp ∘ hx.2 hy ∘ (h₁ _ hx.1 _ hy).mpr }, |
refine ⟨x, ⟨hx, _⟩, rfl⟩, | ||
rintros y hy e, | ||
exact (h₁ _ hy _ hx).mpr (h ⟨y, hy, rfl⟩ ((h₁ _ hx _ hy).mp e)) } |
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.
Here's a golf.
refine ⟨x, ⟨hx, _⟩, rfl⟩, | |
rintros y hy e, | |
exact (h₁ _ hy _ hx).mpr (h ⟨y, hy, rfl⟩ ((h₁ _ hx _ hy).mp e)) } | |
exact ⟨x, ⟨hx, λ y hy, (h₁ y hy x hx).mpr ∘ h ⟨y, hy, rfl⟩ ∘ (h₁ x hx y hy).mp⟩, rfl⟩ } |
maximals
under a rel_embedding
maximals
under a rel_embedding