Skip to content

Commit

Permalink
feat: Finset.nsmul_inf' (#9838)
Browse files Browse the repository at this point in the history
  • Loading branch information
madvorak authored and dagurtomas committed Mar 22, 2024
1 parent 547031c commit 5e91daa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Mathlib/Data/Finset/Lattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,12 @@ theorem _root_.map_finset_sup' [SemilatticeSup β] [FunLike F α β] [SupHomClas
refine' hs.cons_induction _ _ <;> intros <;> simp [*]
#align map_finset_sup' map_finset_sup'

lemma nsmul_sup' [LinearOrderedAddCommMonoid β] {s : Finset α}
(hs : s.Nonempty) (f : α → β) (n : ℕ) :
s.sup' hs (fun a => n • f a) = n • s.sup' hs f :=
let ns : SupHom β β := { toFun := (n • ·), map_sup' := fun _ _ => (nsmul_right_mono n).map_max }
(map_finset_sup' ns hs _).symm

/-- To rewrite from right to left, use `Finset.sup'_comp_eq_image`. -/
@[simp]
theorem sup'_image [DecidableEq β] {s : Finset γ} {f : γ → β} (hs : (s.image f).Nonempty)
Expand Down Expand Up @@ -1092,6 +1098,12 @@ theorem _root_.map_finset_inf' [SemilatticeInf β] [FunLike F α β] [InfHomClas
refine' hs.cons_induction _ _ <;> intros <;> simp [*]
#align map_finset_inf' map_finset_inf'

lemma nsmul_inf' [LinearOrderedAddCommMonoid β] {s : Finset α}
(hs : s.Nonempty) (f : α → β) (n : ℕ) :
s.inf' hs (fun a => n • f a) = n • s.inf' hs f :=
let ns : InfHom β β := { toFun := (n • ·), map_inf' := fun _ _ => (nsmul_right_mono n).map_min }
(map_finset_inf' ns hs _).symm

/-- To rewrite from right to left, use `Finset.inf'_comp_eq_image`. -/
@[simp]
theorem inf'_image [DecidableEq β] {s : Finset γ} {f : γ → β} (hs : (s.image f).Nonempty)
Expand Down

0 comments on commit 5e91daa

Please sign in to comment.