Skip to content
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

[Merged by Bors] - feat: Finset.nsmul_inf' #9838

Closed
wants to merge 6 commits into from
Closed

[Merged by Bors] - feat: Finset.nsmul_inf' #9838

wants to merge 6 commits into from

Conversation

madvorak
Copy link
Collaborator


I didn't really know where to put it.

When I paste

lemma Finset.nsmul_inf' {α β : Type*} [LinearOrderedAddCommMonoid β] {s : Finset α}
    (hs : s.Nonempty) (f : α → β) (n : ℕ) :
    s.inf' hs (fun a => n • f a) = n • s.inf' hs f := by
  if nz : n = 0 then
    rw [nz]
    simp_rw [zero_smul]
    apply Finset.inf'_const
  else
    obtain ⟨d, hd, hfd⟩ := Finset.exists_mem_eq_inf' hs f
    obtain ⟨dₙ, hnₙ, hfdₙ⟩ := Finset.exists_mem_eq_inf' hs (fun a => n • f a)
    have key : n • f dₙ = n • f d
    · apply eq_of_ge_of_not_gt
      · rw [← hfd]
        exact nsmul_le_nsmul_right (Finset.inf'_le f hnₙ) n
      · rw [not_lt, ← hfdₙ]
        exact Finset.inf'_le (fun a => n • f a) hd
    rw [hfd, hfdₙ, key]

into the root then #find_home gives me:

[Mathlib.Algebra.BigOperators.Finprod,
 Mathlib.Algebra.Periodic,
 Mathlib.SetTheory.Cardinal.Basic,
 Mathlib.Dynamics.BirkhoffSum.Average,
 Mathlib.GroupTheory.Submonoid.Pointwise,
 Mathlib.Order.Filter.Pointwise,
 Mathlib.Algebra.Module.BigOperators,
 Mathlib.RingTheory.Multiplicity,
 Mathlib.Algebra.Tropical.BigOperators,
 Mathlib.Algebra.BigOperators.Intervals,
 Mathlib.Algebra.Module.Submodule.Basic,
 Mathlib.Deprecated.Subgroup,
 Mathlib.Order.Filter.Germ,
 Mathlib.Topology.Support,
 Mathlib.Data.Finsupp.Basic,
 Mathlib.Topology.Bornology.Absorbs,
 Mathlib.Algebra.Order.Rearrangement,
 Mathlib.MeasureTheory.MeasurableSpace.Basic,
 Mathlib.Data.Rat.Star,
 Mathlib.Algebra.GroupWithZero.NonZeroDivisors,
 Mathlib.CategoryTheory.Galois.Basic,
 Mathlib.Data.DFinsupp.Basic,
 Mathlib.Data.Set.Pointwise.Finite,
 Mathlib.GroupTheory.Subgroup.Finite,
 Mathlib.Combinatorics.SimpleGraph.Regularity.Energy,
 Mathlib.Data.Finsupp.Pointwise,
 Mathlib.RingTheory.NonUnitalSubring.Basic,
 Mathlib.GroupTheory.Coprod.Basic,
 Mathlib.Data.Holor,
 Mathlib.CategoryTheory.Preadditive.Basic,
 Mathlib.RingTheory.Subsemiring.Basic]

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@eric-wieser
Copy link
Member

I think with the new proof you can probably find a better home for the lemma.

@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes t-order Order theory and removed awaiting-review labels Jan 18, 2024
@madvorak madvorak added awaiting-review awaiting-CI and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jan 19, 2024
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Feb 13, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 13, 2024
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 13, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Feb 13, 2024
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 13, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Feb 13, 2024
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 13, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Feb 14, 2024
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 14, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: Finset.nsmul_inf' [Merged by Bors] - feat: Finset.nsmul_inf' Feb 14, 2024
@mathlib-bors mathlib-bors bot closed this Feb 14, 2024
@mathlib-bors mathlib-bors bot deleted the nsmulf branch February 14, 2024 02:40
riccardobrasca pushed a commit that referenced this pull request Feb 18, 2024
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors. t-order Order theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants