Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

feat(order/minimal): Image of maximals under a rel_embedding #17017

Closed
wants to merge 3 commits into from

Conversation

erdOne
Copy link
Member

@erdOne erdOne commented Oct 16, 2022


Open in Gitpod

@erdOne erdOne added awaiting-review The author would like community review of the PR t-order Order hierarchy labels Oct 16, 2022
@erdOne erdOne requested a review from YaelDillies October 18, 2022 20:03
@@ -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 : α → β)
Copy link
Collaborator

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)) :
Copy link
Collaborator

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.

Suggested change
(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)) :

Comment on lines +151 to +152
rintros _ ⟨y, hy, rfl⟩ e,
exact (h₁ _ hy _ hx.1).mp (hx.2 hy ((h₁ _ hx.1 _ hy).mpr e)) },
Copy link
Collaborator

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.

Suggested change
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 },

Comment on lines +154 to +156
refine ⟨x, ⟨hx, _⟩, rfl⟩,
rintros y hy e,
exact (h₁ _ hy _ hx).mpr (h ⟨y, hy, rfl⟩ ((h₁ _ hx _ hy).mp e)) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here's a golf.

Suggested change
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⟩ }

@tb65536 tb65536 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 Dec 12, 2022
@YaelDillies YaelDillies changed the title feat(src/order/minimal): Image of maximals under a rel_embedding feat(order/minimal): Image of maximals under a rel_embedding Dec 15, 2022
@kim-em kim-em added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
@erdOne erdOne closed this Dec 31, 2023
@YaelDillies YaelDillies deleted the image_maximals branch December 31, 2023 07:05
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 t-order Order hierarchy too-late This PR was ready too late for inclusion in mathlib3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants