Commit 2024-11-11 13:54 79e17d0d

View on Github →

chore(Data/Finset): split Basic.lean into many smaller files (#18610) The purpose of this PR is to turn the unwieldy file Data/Finset/Basic.lean into a collection of smaller files. The splits happen mostly based on the sections of the original Basic.lean files, so the import structure can probably be organized in a nicer way. There are also some results in Basic.lean that can find a nicer home if we organize the imports further. Still, I expect these changes help to clean up the file a lot. The following new files are split off from Basic.lean:

  • Mathlib/Data/Finset/Attach.lean: Finset.attach and elementary results
  • Mathlib/Data/Finset/Dedup.lean: packages Multiset.dedup as Multiset.toFinset; some adjacent results for mapping between multisets, lists and finsets.
  • Mathlib/Data/Finset/Defs.lean: definition of the Finset type and its membership predicates
  • Mathlib/Data/Finset/Disjoint.lean: results on Disjoint applied to finsets; definition of disjUnion.
  • Mathlib/Data/Finset/Empty.lean: definition of and the Finset.Nonempty predicate
  • Mathlib/Data/Finset/Erase.lean: definition of Finset.erase
  • Mathlib/Data/Finset/Filter.lean: definition of Finset.filter and the {x ∈ s | p x} set builder notation
  • Mathlib/Data/Finset/Insert.lean: definition of Finset.cons, Finset.erase and the singleton finset {a}
  • Mathlib/Data/Finset/Lattice/Basic.lean: definition of union and intersection of finsets, lattice structure.
  • Mathlib/Data/Finset/Lattice/Lemmas.lean: results on union and intersection needed for the GeneralizedBooleanAlgebra instance in SDiff.lean
  • Mathlib/Data/Finset/Range.lean: definition of Finset.range
  • Mathlib/Data/Finset/SDiff.lean: definition of set difference on finsets, GeneralizedBooleanAlgebra instance
  • Mathlib/Data/Finset/SymmDiff.lean: basic results on the symmetric difference operator (derived from set difference). The following files have seen major changes:
  • Mathlib/Data/Finset/Basic.lean: most of its contents have been removed. Still contains a few lesser-used definitions and an assortment of results that didn't have an obvious home at first sight.
  • Mathlib/Data/Finset/Lattice/Fold.lean: renamed from Mathlib/Data/Finset/Lattice.lean

Estimated changes

deleted theorem Disjoint.forall_ne_finset
deleted theorem Finset.Finset.choose_mem
deleted theorem Finset.Finset.choose_spec
deleted theorem Finset.Finset.coe_filter
deleted theorem Finset.Finset.coe_range
deleted theorem Finset.Finset.coe_toList
deleted theorem Finset.Finset.filter_True
deleted theorem Finset.Finset.filter_and
deleted theorem Finset.Finset.filter_comm
deleted theorem Finset.Finset.filter_cons
deleted theorem Finset.Finset.filter_eq'
deleted theorem Finset.Finset.filter_eq
deleted theorem Finset.Finset.filter_inj'
deleted theorem Finset.Finset.filter_inj
deleted theorem Finset.Finset.filter_ne'
deleted theorem Finset.Finset.filter_ne
deleted theorem Finset.Finset.filter_not
deleted theorem Finset.Finset.filter_or
deleted theorem Finset.Finset.filter_val
deleted theorem Finset.Finset.mem_filter
deleted theorem Finset.Finset.mem_range
deleted theorem Finset.Finset.mem_toList
deleted def Finset.Finset.range
deleted theorem Finset.Finset.range_mono
deleted theorem Finset.Finset.range_one
deleted theorem Finset.Finset.range_succ
deleted theorem Finset.Finset.range_val
deleted theorem Finset.Finset.range_zero
deleted theorem Finset.Finset.toList_cons
deleted theorem Finset.Insert.comm
deleted theorem Finset.List.coe_toFinset
deleted theorem Finset.List.mem_toFinset
deleted theorem Finset.List.toFinset.ext
deleted theorem Finset.List.toFinset_coe
deleted theorem Finset.List.toFinset_cons
deleted theorem Finset.List.toFinset_eq
deleted theorem Finset.List.toFinset_nil
deleted theorem Finset.List.toFinset_val
deleted theorem Finset.Nonempty.inl
deleted theorem Finset.Nonempty.inr
deleted theorem Finset.Nonempty.mono
deleted theorem Finset.Nonempty.ne_empty
deleted theorem Finset.Nonempty.to_type
deleted theorem Finset.Subset.antisymm
deleted theorem Finset.Subset.refl
deleted theorem Finset.Subset.trans
deleted theorem Finset.Superset.trans
deleted def Finset.attach
deleted theorem Finset.attach_val
deleted theorem Finset.bot_eq_empty
added def Finset.choose
added def Finset.chooseX
added theorem Finset.choose_mem
added theorem Finset.choose_property
added theorem Finset.choose_spec
deleted def Finset.coeEmb
deleted theorem Finset.coe_coeEmb
deleted theorem Finset.coe_cons
deleted theorem Finset.coe_disjUnion
deleted theorem Finset.coe_empty
deleted theorem Finset.coe_eq_empty
deleted theorem Finset.coe_eq_pair
deleted theorem Finset.coe_eq_singleton
deleted theorem Finset.coe_erase
deleted theorem Finset.coe_inj
deleted theorem Finset.coe_injective
deleted theorem Finset.coe_insert
deleted theorem Finset.coe_inter
deleted theorem Finset.coe_mem
deleted theorem Finset.coe_nonempty
deleted theorem Finset.coe_pair
deleted theorem Finset.coe_sdiff
deleted theorem Finset.coe_singleton
deleted theorem Finset.coe_sort_coe
deleted theorem Finset.coe_ssubset
deleted theorem Finset.coe_subset
deleted theorem Finset.coe_symmDiff
deleted theorem Finset.coe_union
deleted def Finset.cons
deleted def Finset.consPiProd
deleted theorem Finset.cons_empty
deleted theorem Finset.cons_eq_insert
deleted theorem Finset.cons_induction
deleted theorem Finset.cons_induction_on
deleted theorem Finset.cons_ne_empty
deleted theorem Finset.cons_nonempty
deleted theorem Finset.cons_sdiff_cons
deleted theorem Finset.cons_subset
deleted theorem Finset.cons_subset_cons
deleted theorem Finset.cons_swap
deleted theorem Finset.cons_val
deleted theorem Finset.dedup_eq_self
deleted theorem Finset.default_singleton
deleted def Finset.disjUnion
deleted theorem Finset.disjUnion_comm
deleted theorem Finset.disjUnion_empty
deleted theorem Finset.disjoint_coe
added theorem Finset.disjoint_filter
deleted theorem Finset.disjoint_iff_ne
deleted theorem Finset.disjoint_left
deleted theorem Finset.disjoint_right
deleted theorem Finset.disjoint_singleton
deleted theorem Finset.disjoint_val
deleted theorem Finset.empty_disjUnion
deleted theorem Finset.empty_inter
deleted theorem Finset.empty_sdiff
deleted theorem Finset.empty_ssubset
deleted theorem Finset.empty_subset
added theorem Finset.empty_toList
deleted theorem Finset.empty_union
deleted theorem Finset.empty_val
deleted theorem Finset.eq_of_veq
deleted def Finset.erase
deleted theorem Finset.erase_eq_self
deleted theorem Finset.erase_idem
deleted theorem Finset.erase_inj
deleted theorem Finset.erase_injOn
deleted theorem Finset.erase_ne_self
deleted theorem Finset.erase_right_comm
deleted theorem Finset.erase_subset
deleted theorem Finset.erase_subset_erase
deleted theorem Finset.erase_val
deleted theorem Finset.exists_of_ssubset
deleted theorem Finset.ext
deleted def Finset.filter
added theorem Finset.filter_and
added theorem Finset.filter_and_not
added theorem Finset.filter_cons
added theorem Finset.filter_eq'
added theorem Finset.filter_eq
added theorem Finset.filter_erase
added theorem Finset.filter_insert
added theorem Finset.filter_inter
added theorem Finset.filter_ne'
added theorem Finset.filter_ne
added theorem Finset.filter_not
added theorem Finset.filter_or
added theorem Finset.filter_union
deleted theorem Finset.forall_mem_cons
deleted theorem Finset.forall_mem_not_eq'
deleted theorem Finset.forall_mem_not_eq
deleted theorem Finset.forall_mem_union
deleted theorem Finset.induction_on'
deleted theorem Finset.induction_on_union
deleted theorem Finset.inf_eq_inter
deleted def Finset.insertPiProd
deleted theorem Finset.insert_def
deleted theorem Finset.insert_empty
deleted theorem Finset.insert_eq
deleted theorem Finset.insert_eq_of_mem
deleted theorem Finset.insert_eq_self
deleted theorem Finset.insert_idem
deleted theorem Finset.insert_inj
deleted theorem Finset.insert_inj_on
deleted theorem Finset.insert_ne_empty
deleted theorem Finset.insert_ne_self
deleted theorem Finset.insert_nonempty
deleted theorem Finset.insert_subset
deleted theorem Finset.insert_subset_iff
deleted theorem Finset.insert_union
deleted theorem Finset.insert_union_comm
deleted theorem Finset.insert_val'
deleted theorem Finset.insert_val
deleted theorem Finset.inter_assoc
deleted theorem Finset.inter_comm
deleted theorem Finset.inter_congr_left
deleted theorem Finset.inter_congr_right
deleted theorem Finset.inter_empty
deleted theorem Finset.inter_eq_left
deleted theorem Finset.inter_eq_right
added theorem Finset.inter_filter
deleted theorem Finset.inter_left_comm
deleted theorem Finset.inter_left_idem
deleted theorem Finset.inter_right_comm
deleted theorem Finset.inter_right_idem
deleted theorem Finset.inter_sdiff
deleted theorem Finset.inter_sdiff_assoc
deleted theorem Finset.inter_sdiff_self
deleted theorem Finset.inter_self
deleted theorem Finset.inter_singleton
deleted theorem Finset.inter_subset_inter
deleted theorem Finset.inter_subset_ite
deleted theorem Finset.inter_subset_left
deleted theorem Finset.inter_subset_right
deleted theorem Finset.inter_subset_union
deleted theorem Finset.inter_union_self
deleted theorem Finset.inter_val
deleted theorem Finset.inter_val_nd
deleted theorem Finset.isEmpty_coe_sort
deleted theorem Finset.ite_subset_union
deleted theorem Finset.le_eq_subset
deleted theorem Finset.le_iff_subset
deleted theorem Finset.left_eq_union
deleted theorem Finset.lt_eq_subset
deleted theorem Finset.lt_iff_ssubset
deleted theorem Finset.mem_attach
deleted theorem Finset.mem_coe
deleted theorem Finset.mem_cons
deleted theorem Finset.mem_cons_of_mem
deleted theorem Finset.mem_cons_self
deleted theorem Finset.mem_def
deleted theorem Finset.mem_disjUnion
deleted theorem Finset.mem_erase
deleted theorem Finset.mem_insert
deleted theorem Finset.mem_insert_coe
deleted theorem Finset.mem_insert_of_mem
deleted theorem Finset.mem_insert_self
deleted theorem Finset.mem_inter
deleted theorem Finset.mem_inter_of_mem
deleted theorem Finset.mem_mk
deleted theorem Finset.mem_of_mem_erase
deleted theorem Finset.mem_of_subset
deleted theorem Finset.mem_sdiff
deleted theorem Finset.mem_singleton
deleted theorem Finset.mem_singleton_self
deleted theorem Finset.mem_symmDiff
deleted theorem Finset.mem_union
deleted theorem Finset.mem_union_left
deleted theorem Finset.mem_union_right
deleted theorem Finset.mem_val
deleted theorem Finset.mk_coe
deleted theorem Finset.mk_cons
deleted theorem Finset.mk_zero
deleted theorem Finset.ne_empty_of_mem
deleted theorem Finset.ne_of_mem_erase
deleted theorem Finset.nonempty_coe_sort
deleted theorem Finset.nonempty_mk
deleted theorem Finset.not_disjoint_iff
deleted theorem Finset.not_mem_empty
deleted theorem Finset.not_mem_erase
deleted theorem Finset.not_mem_mono
deleted theorem Finset.not_mem_singleton
deleted theorem Finset.not_mem_union
deleted theorem Finset.not_nonempty_empty
deleted theorem Finset.not_ssubset_empty
deleted theorem Finset.not_subset
deleted theorem Finset.pair_comm
deleted theorem Finset.pair_eq_singleton
deleted def Finset.prodPiCons
deleted def Finset.prodPiInsert
added theorem Finset.range_filter_eq
deleted theorem Finset.right_eq_union
deleted theorem Finset.sdiff_empty
added theorem Finset.sdiff_eq_filter
deleted theorem Finset.sdiff_idem
deleted theorem Finset.sdiff_inter_self
deleted theorem Finset.sdiff_nonempty
deleted theorem Finset.sdiff_sdiff_left'
deleted theorem Finset.sdiff_ssubset
deleted theorem Finset.sdiff_subset
deleted theorem Finset.sdiff_subset_sdiff
deleted theorem Finset.sdiff_union_inter
deleted theorem Finset.sdiff_val
deleted theorem Finset.setOf_mem
deleted theorem Finset.singleton_inj
deleted theorem Finset.singleton_inter
deleted theorem Finset.singleton_ne_empty
deleted theorem Finset.singleton_nonempty
deleted theorem Finset.singleton_val
deleted theorem Finset.ssubset_cons
deleted theorem Finset.ssubset_def
deleted theorem Finset.ssubset_iff
deleted theorem Finset.ssubset_insert
deleted theorem Finset.subset_cons
deleted theorem Finset.subset_def
deleted theorem Finset.subset_empty
deleted theorem Finset.subset_erase
deleted theorem Finset.subset_iff
deleted theorem Finset.subset_insert
deleted theorem Finset.subset_inter
deleted theorem Finset.subset_inter_iff
deleted theorem Finset.subset_sdiff
deleted theorem Finset.subset_union_left
deleted theorem Finset.subset_union_right
deleted theorem Finset.sup_eq_union
deleted theorem Finset.symmDiff_eq_empty
deleted theorem Finset.symmDiff_nonempty
added theorem Finset.toList_empty
added theorem Finset.toList_eq_nil
deleted def Finset.toSet
deleted theorem Finset.union_assoc
deleted theorem Finset.union_comm
deleted theorem Finset.union_congr_left
deleted theorem Finset.union_congr_right
deleted theorem Finset.union_empty
deleted theorem Finset.union_eq_empty
deleted theorem Finset.union_eq_left
deleted theorem Finset.union_eq_right
deleted theorem Finset.union_idempotent
deleted theorem Finset.union_insert
deleted theorem Finset.union_left_comm
deleted theorem Finset.union_left_idem
deleted theorem Finset.union_right_comm
deleted theorem Finset.union_right_idem
deleted theorem Finset.union_sdiff_left
deleted theorem Finset.union_sdiff_right
deleted theorem Finset.union_sdiff_self
deleted theorem Finset.union_sdiff_symm
deleted theorem Finset.union_self
deleted theorem Finset.union_subset
deleted theorem Finset.union_subset_iff
deleted theorem Finset.union_subset_left
deleted theorem Finset.union_subset_right
deleted theorem Finset.union_subset_union
deleted theorem Finset.union_val
deleted theorem Finset.union_val_nd
deleted theorem Finset.val_eq_zero
deleted theorem Finset.val_inj
deleted theorem Finset.val_injective
deleted theorem Finset.val_le_iff
deleted theorem Finset.val_lt_iff
deleted theorem Finset.val_strictMono
deleted structure Finset
added theorem List.toFinset_filter
added theorem List.toFinset_inter
deleted theorem List.toFinset_toList
added theorem List.toFinset_union
added theorem Multiset.toFinset_add
added theorem Finset.Subset.antisymm
added theorem Finset.Subset.refl
added theorem Finset.Subset.trans
added theorem Finset.Superset.trans
added def Finset.coeEmb
added theorem Finset.coe_coeEmb
added theorem Finset.coe_inj
added theorem Finset.coe_injective
added theorem Finset.coe_mem
added theorem Finset.coe_sort_coe
added theorem Finset.coe_ssubset
added theorem Finset.coe_subset
added theorem Finset.eq_of_veq
added theorem Finset.ext
added theorem Finset.le_eq_subset
added theorem Finset.le_iff_subset
added theorem Finset.lt_eq_subset
added theorem Finset.lt_iff_ssubset
added theorem Finset.mem_coe
added theorem Finset.mem_def
added theorem Finset.mem_mk
added theorem Finset.mem_of_subset
added theorem Finset.mem_val
added theorem Finset.mk_coe
added theorem Finset.not_mem_mono
added theorem Finset.not_subset
added theorem Finset.setOf_mem
added theorem Finset.ssubset_def
added theorem Finset.subset_def
added theorem Finset.subset_iff
added def Finset.toSet
added theorem Finset.val_inj
added theorem Finset.val_injective
added theorem Finset.val_le_iff
added theorem Finset.val_lt_iff
added theorem Finset.val_strictMono
added structure Finset
added theorem Finset.Insert.comm
added theorem Finset.coe_cons
added theorem Finset.coe_eq_pair
added theorem Finset.coe_insert
added theorem Finset.coe_pair
added theorem Finset.coe_singleton
added def Finset.cons
added theorem Finset.cons_empty
added theorem Finset.cons_eq_insert
added theorem Finset.cons_induction
added theorem Finset.cons_ne_empty
added theorem Finset.cons_nonempty
added theorem Finset.cons_subset
added theorem Finset.cons_swap
added theorem Finset.cons_val
added theorem Finset.forall_mem_cons
added theorem Finset.induction_on'
added theorem Finset.insert_def
added theorem Finset.insert_empty
added theorem Finset.insert_eq_self
added theorem Finset.insert_idem
added theorem Finset.insert_inj
added theorem Finset.insert_inj_on
added theorem Finset.insert_ne_empty
added theorem Finset.insert_ne_self
added theorem Finset.insert_nonempty
added theorem Finset.insert_subset
added theorem Finset.insert_val'
added theorem Finset.insert_val
added theorem Finset.mem_cons
added theorem Finset.mem_cons_of_mem
added theorem Finset.mem_cons_self
added theorem Finset.mem_insert
added theorem Finset.mem_insert_coe
added theorem Finset.mem_insert_self
added theorem Finset.mem_singleton
added theorem Finset.mk_cons
added theorem Finset.nonempty_mk
added theorem Finset.pair_comm
added theorem Finset.pairwise_cons'
added theorem Finset.pairwise_cons
added theorem Finset.singleton_inj
added theorem Finset.singleton_val
added theorem Finset.ssubset_cons
added theorem Finset.ssubset_iff
added theorem Finset.ssubset_insert
added theorem Finset.subset_cons
added theorem Finset.subset_insert
added theorem Finset.toList_cons
added theorem Finset.toList_insert
added theorem List.toFinset_cons
added theorem List.toFinset_nil
added theorem Multiset.toFinset_cons
added theorem Multiset.toFinset_zero
added theorem Finset.coe_inter
added theorem Finset.coe_union
added theorem Finset.inf_eq_inter
added theorem Finset.inter_assoc
added theorem Finset.inter_comm
added theorem Finset.inter_eq_left
added theorem Finset.inter_eq_right
added theorem Finset.inter_left_comm
added theorem Finset.inter_left_idem
added theorem Finset.inter_self
added theorem Finset.inter_val
added theorem Finset.inter_val_nd
added theorem Finset.left_eq_union
added theorem Finset.mem_inter
added theorem Finset.mem_union
added theorem Finset.mem_union_left
added theorem Finset.mem_union_right
added theorem Finset.not_mem_union
added theorem Finset.right_eq_union
added theorem Finset.subset_inter
added theorem Finset.sup_eq_union
added theorem Finset.union_assoc
added theorem Finset.union_comm
added theorem Finset.union_eq_left
added theorem Finset.union_eq_right
added theorem Finset.union_left_comm
added theorem Finset.union_left_idem
added theorem Finset.union_self
added theorem Finset.union_subset
added theorem Finset.union_val
added theorem Finset.union_val_nd
added theorem Finset.coe_sdiff
added theorem Finset.cons_sdiff_cons
added theorem Finset.empty_sdiff
added theorem Finset.inter_sdiff
added theorem Finset.mem_sdiff
added theorem Finset.sdiff_empty
added theorem Finset.sdiff_idem
added theorem Finset.sdiff_nonempty
added theorem Finset.sdiff_ssubset
added theorem Finset.sdiff_subset
added theorem Finset.sdiff_val
added theorem Finset.subset_sdiff