Skip to content

Commit

Permalink
feat: Filtering sups (#7254)
Browse files Browse the repository at this point in the history
Match leanprover-community/mathlib3#18612.

The lemmas were already added in #7382, though a slight difference in the statement means that we need a new `decidableExistsAndFinsetCoe` instance.
  • Loading branch information
YaelDillies committed Nov 1, 2023
1 parent e15cc5f commit 4bda10c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Mathlib/Data/Finset/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2672,6 +2672,9 @@ instance decidableExistsAndFinset {p : α → Prop} [_hp : ∀ (a), Decidable (p
Decidable (∃ a ∈ s, p a) :=
decidable_of_iff (∃ (a : _) (_ : a ∈ s), p a) (by simp)

instance decidableExistsAndFinsetCoe {p : α → Prop} [DecidablePred p] :
Decidable (∃ a ∈ (s : Set α), p a) := decidableExistsAndFinset

/-- decidable equality for functions whose domain is bounded by finsets -/
instance decidableEqPiFinset {β : α → Type*} [_h : ∀ a, DecidableEq (β a)] :
DecidableEq (∀ a ∈ s, β a) :=
Expand Down
9 changes: 8 additions & 1 deletion Mathlib/Data/Finset/Sups.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Mathlib.Data.Finset.NAry
import Mathlib.Data.Finset.Slice
import Mathlib.Data.Set.Sups

#align_import data.finset.sups from "leanprover-community/mathlib"@"20715f4ac6819ef2453d9e5106ecd086a5dc2a5e"
#align_import data.finset.sups from "leanprover-community/mathlib"@"8818fdefc78642a7e6afcd20be5c184f3c7d9699"

/-!
# Set family operations
Expand Down Expand Up @@ -37,6 +37,9 @@ We define the following notation in locale `FinsetFamily`:
[B. Bollobás, *Combinatorics*][bollobas1986]
-/

#align finset.decidable_pred_mem_upper_closure instDecidablePredMemUpperClosure
#align finset.decidable_pred_mem_lower_closure instDecidablePredMemLowerClosure

open Function

open SetFamily
Expand Down Expand Up @@ -223,6 +226,8 @@ theorem sups_sups_sups_comm : s ⊻ t ⊻ (u ⊻ v) = s ⊻ u ⊻ (t ⊻ v) :=
image₂_image₂_image₂_comm sup_sup_sup_comm
#align finset.sups_sups_sups_comm Finset.sups_sups_sups_comm

#align finset.filter_sups_le Finset.filter_sups_le

end Sups

section Infs
Expand Down Expand Up @@ -403,6 +408,8 @@ theorem infs_infs_infs_comm : s ⊼ t ⊼ (u ⊼ v) = s ⊼ u ⊼ (t ⊼ v) :=
image₂_image₂_image₂_comm inf_inf_inf_comm
#align finset.infs_infs_infs_comm Finset.infs_infs_infs_comm

#align finset.filter_infs_ge Finset.filter_infs_le

end Infs

open FinsetFamily
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Chris Hughes
-/
import Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity

#align_import number_theory.legendre_symbol.gauss_eisenstein_lemmas from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d"
#align_import number_theory.legendre_symbol.gauss_eisenstein_lemmas from "leanprover-community/mathlib"@"8818fdefc78642a7e6afcd20be5c184f3c7d9699"

/-!
# Lemmas of Gauss and Eisenstein
Expand Down

0 comments on commit 4bda10c

Please sign in to comment.