-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(Algebra/Order): maximally varying version of prod_le_prod_of_subset_of_one_le
#39646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
YaelDillies marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,14 +128,26 @@ theorem one_le_prod'' [MulLeftMono N] (h : ∀ i : ι, 1 ≤ f i) : 1 ≤ ∏ i | |
| theorem prod_le_one' [MulLeftMono N] (h : ∀ i ∈ s, f i ≤ 1) : ∏ i ∈ s, f i ≤ 1 := | ||
| (prod_le_prod' h).trans_eq (by rw [prod_const_one]) | ||
|
|
||
| @[to_additive (attr := gcongr) sum_le_sum_of_subset_of_nonneg] | ||
| theorem prod_le_prod_of_subset_of_one_le' [MulLeftMono N] (h : s ⊆ t) | ||
| (hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i) : ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i := by | ||
| @[to_additive (attr := gcongr)] | ||
| lemma prod_mono_of_subset_of_one_le [MulLeftMono N] (h : s ⊆ t) (hfg : ∀ i ∈ s, f i ≤ g i) | ||
|
Contributor
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. This one should have a prime in the name, since that's the established naming convention for these lemmas.
Contributor
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. In addition, the renames are clearly scope-creep!
Contributor
Author
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. See #39692 |
||
| (hg : ∀ i ∈ t, i ∉ s → 1 ≤ g i) : ∏ i ∈ s, f i ≤ ∏ i ∈ t, g i := by | ||
| classical calc | ||
| ∏ i ∈ s, f i ≤ (∏ i ∈ t \ s, f i) * ∏ i ∈ s, f i := | ||
| le_mul_of_one_le_left' <| one_le_prod' <| by simpa only [mem_sdiff, and_imp] | ||
| _ = ∏ i ∈ t \ s ∪ s, f i := (prod_union sdiff_disjoint).symm | ||
| _ = ∏ i ∈ t, f i := by rw [sdiff_union_of_subset h] | ||
| ∏ i ∈ s, f i | ||
| _ ≤ ∏ i ∈ s, g i := by gcongr with i hi; exact hfg i hi | ||
| _ ≤ (∏ i ∈ t \ s, g i) * ∏ i ∈ s, g i := | ||
| le_mul_of_one_le_left' <| one_le_prod' <| by simpa only [mem_sdiff, and_imp] | ||
| _ = ∏ i ∈ t \ s ∪ s, g i := (prod_union sdiff_disjoint).symm | ||
| _ = ∏ i ∈ t, g i := by rw [sdiff_union_of_subset h] | ||
|
|
||
| @[to_additive] | ||
| lemma prod_mono_of_subset_of_le_one [MulLeftMono N] (h : s ⊆ t) (hfg : ∀ i ∈ s, f i ≤ g i) | ||
| (hf : ∀ i ∈ t, i ∉ s → f i ≤ 1) : ∏ i ∈ t, f i ≤ ∏ i ∈ s, g i := | ||
| prod_mono_of_subset_of_one_le (N := Nᵒᵈ) h hfg hf | ||
|
|
||
| @[to_additive sum_le_sum_of_subset_of_nonneg] | ||
| theorem prod_le_prod_of_subset_of_one_le' [MulLeftMono N] (h : s ⊆ t) | ||
| (hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i) : ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i := | ||
| prod_mono_of_subset_of_one_le h (by simp) hf | ||
|
|
||
| @[to_additive] | ||
| theorem prod_le_prod_of_subset_of_le_one' | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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'm not entirely sure where this PR stands because of @b-mehta's comments in both here and #39692, so I'm not sure what to do.
But the golf here looks fine and doesn't use anything else in the PR, so
splice-bot maintainer merge
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.
Unknown splice-bot command
No label command matched keyword 'maintainer-merge'.
Failed step(s): Resolve configured trigger command.
Advice:
label_commands.Run logs: https://github.com/leanprover-community/mathlib4/actions/runs/27756166287/attempts/1
Step outcomes
successsuccessfailuresuccessskippedskippedskippedskippedskippedskippedskippedToken diagnostics
inputs.tokeninputs.branch_tokeninputs.authz_tokenmaintainer-mergeinputs.authz_tokenThere 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.
Don't think editing worked, might have to do this again:
splice-bot maintainer merge
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.
Split PR created and commented
Split off the changes to Mathlib/Algebra/Module/ZLattice/Summable.lean in #40752 and posted a comment via splice-bot command
maintainer.