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

feat(order/monotone/monovary): Monovarying functions are jointly monotone #17932

Closed
wants to merge 8 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Dec 13, 2022

This PR justifies the understanding of monovary f g as "f and g are jointly monotone". Precisely, it shows that two functions monovary iff there is a linear order on their domain that makes them monotone simultaneously.


I've left a todo for the version of the lemma that replaces "two" by "an arbitrary number of". I don't need it, but it sure would be very fun to prove!

Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. t-order Order hierarchy labels Dec 13, 2022
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Dec 14, 2022
@mathlib-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

variables {f g}

lemma monovary_on_iff_exists_monotone_on :
monovary_on f g s ↔ ∃ [linear_order ι], by exactI monotone_on f s ∧ monotone_on g s :=
Copy link
Member

@eric-wieser eric-wieser Dec 14, 2022

Choose a reason for hiding this comment

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

This feels like it might be a pretty annoying spelling if ι already has an order.

What are your thoughts on making a with_mono_vary_order f g ι type synonym and instead stating this as something like

Suggested change
monovary_on f g s ↔ ∃ [linear_order ι], by exactI monotone_on f s ∧ monotone_on g s :=
monovary_on f g s ↔ monotone_on (f ∘ of_mvo f g) (of_mvo f g ⁻¹' s) ∧ monotone_on (g ∘ of_mvo f g) (of_mvo f g⁻¹' s) :=

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought about it too, but I would need four different type synonyms for the lemmas here, so I'm not convinced. The use case is deducing the Chebyshev sum inequality (pretty general and stated in terms of monovary in #13187) from the FKG inequality, where everything has an order (and is thus a priori less general). So the only point at which I will have this extra linear_order ι instance will be locally in the proof of Chebyshev, where there is no pre-existing order on ι.

Copy link
Member

Choose a reason for hiding this comment

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

Why do you need four type synonyms?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because the same type won't work for all four lemmas (I would need to insert order_dual in places).

Copy link
Member

Choose a reason for hiding this comment

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

I'd probably argue that at that point you don't need all four lemmas; only the two(?) that don't mention order_dual at all.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think that's an improvement over the current situation given my use case and the todo I am leaving (would you want yet another type synonym for families of functions?).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In fact, I see it as such:

  • If I provide a type synonym, I make the choice for the user on what order they want to use (regarding order_dual).
  • If the user expands out my ∃ [linear_order ι], ..., they are free to make it a local instance, or place it onto a type synonym (which you indeed can create locally using set and clear_value).

@YaelDillies YaelDillies changed the title feat(order/monovary): Monovarying functions are jointly monotone feat(order/monotone/monovary): Monovarying functions are jointly monotone Dec 16, 2022
@kim-em kim-em added the modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. label Mar 28, 2023
src/order/monotone/monovary.lean Show resolved Hide resolved
src/order/monotone/monovary.lean Outdated Show resolved Hide resolved
src/order/monotone/monovary.lean Show resolved Hide resolved
src/order/monotone/monovary.lean Show resolved Hide resolved
@Vierkantor Vierkantor 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 Mar 30, 2023
@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Mar 30, 2023
@eric-wieser eric-wieser added the not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 label Jul 15, 2023
@YaelDillies
Copy link
Collaborator Author

Ported to LeanCamCombi

@YaelDillies YaelDillies deleted the monovary_exists_monotone branch November 18, 2023 11:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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. not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants